Skip to content

Commit a1035f4

Browse files
committed
Created default enter actions for the text boxes on the graphs page.
1 parent 2bae794 commit a1035f4

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

public/GraphGenerator.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,26 @@ <h1 class="m-title">Interactive Organization Chart</h1>
121121
</body>
122122
</html>
123123
<script>
124-
function fetchUserInput() {
124+
$('#txtOrgname').keydown(function(event)
125+
{
126+
if(event.keyCode == 13)
127+
{
128+
event.preventDefault();
129+
toOrgRepos();
130+
}
131+
});
132+
133+
$('#txtUsername').keydown(function(event)
134+
{
135+
if(event.keyCode == 13)
136+
{
137+
event.preventDefault();
138+
toFriends();
139+
}
140+
});
141+
142+
function fetchUserInput()
143+
{
125144
const inputedName = $("#txtUsername").val();
126145

127146
if(inputedName === "")

public/js/createOrgRepoGraph.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ function alreadyInGraph(userID)
5252
*/
5353
function edgeInGraph(id1, id2)
5454
{
55-
console.log("edge check");
5655
for(var i = 0;i < edges.length; i++)
5756
{
5857
if(edges[i].from === id1 && edges[i].to === id2)

0 commit comments

Comments
 (0)