Skip to content

Commit af2e113

Browse files
author
Bryce Murphy
committed
Merge branch 'master' of github.com:jrtechs/github-graphs
2 parents 7ba4d5e + a1035f4 commit af2e113

7 files changed

Lines changed: 49 additions & 18 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/OrgRepoGraph.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
createOrgInfo(orgname, 'organizationInfo')
101101
}
102102

103-
if(findGetParameter("name") !== null) {
103+
if(findGetParameter("name") !== null)
104+
{
104105
createGraphs(findGetParameter("name"))
105106
}
106107

public/js/createOrgInfo.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ function createOrgInfo(orgName, container) {
1313
</div>"
1414

1515
$("#" + container).html(html);
16-
$('#dataTable').DataTable();
16+
17+
setTimeout(function() {
18+
$('#dataTable').DataTable();
19+
}, 1500);
20+
1721
}, function(error) {
18-
console.log("Unable to load table data");
22+
alert("Organization Does Not Exist");
23+
window.location.href = "./GraphGenerator.html";
1924
});
2025
}

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)

public/js/createOrgTable.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ function createOrgTable(orgName, tableContainer)
5252
}
5353

5454
$("#" + tableContainer).html(html);
55-
$('#dataTable').DataTable();
55+
56+
$(document).ready(function() {
57+
$('#dataTable').DataTable();
58+
} );
5659
}).catch(function(error)
5760
{
5861
//console.log("Unable to create table");

public/js/profileGen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ function profileGen(username, container)
6565
$("#"+container).html(html);
6666
})
6767
}, () => {
68-
console.error("error getting user info");
68+
alert("User Does Not Exist");
69+
window.location.href = "./GraphGenerator.html";
6970
});
7071
}
7172

public/js/profileTimeLine.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,21 @@ function timeLineClickEvent(properties)
7474
" <div class=\"col-md-6\"><b>Liscense</b></div>\n" +
7575
" <div class=\"col-md-6\">" +
7676
item.license.name +
77-
"</div>\n" +
78-
" </li>\n" +
79-
" <li class=\"row\">\n" +
80-
" <div class=\"col-md-6\"><b>Home Page</b></div>\n" +
81-
" <div class=\"col-md-6\">" +
82-
"<a href='" + item.homepage + "'>" +item.homepage + "</a>" +
83-
"</div>\n" +
84-
" </li>\n" +
85-
" </ul>\n" +
86-
" </div>";
77+
"</div></li>";
78+
if(item.homepage !== null)
79+
{
80+
html +=
81+
" <li class=\"row\">\n" +
82+
" <div class=\"col-md-6\"><b>Home Page</b></div>\n" +
83+
" <div class=\"col-md-6\">" +
84+
"<a href='" + item.homepage + "'>" +item.homepage + "</a>" +
85+
"</div>\n" +
86+
" </li>\n" +
87+
" </ul>\n";
88+
}
89+
8790

88-
html += "<div class=\"col-6\">\n" +
91+
html += "</div><div class=\"col-6\">\n" +
8992
" <ul class=\"list-group\">\n" +
9093
" <li class=\"row\">\n" +
9194
" <div class=\"col-md-6\"><b>Repository URL</b></div>\n" +

0 commit comments

Comments
 (0)