Browse Source

Merge branch 'master' of github.com:jrtechs/github-graphs

pull/11/head
Bryce Murphy 5 years ago
parent
commit
af2e11397b
7 changed files with 49 additions and 18 deletions
  1. +20
    -1
      public/GraphGenerator.html
  2. +2
    -1
      public/OrgRepoGraph.html
  3. +7
    -2
      public/js/createOrgInfo.js
  4. +0
    -1
      public/js/createOrgRepoGraph.js
  5. +4
    -1
      public/js/createOrgTable.js
  6. +2
    -1
      public/js/profileGen.js
  7. +14
    -11
      public/js/profileTimeLine.js

+ 20
- 1
public/GraphGenerator.html View File

@ -121,7 +121,26 @@
</body>
</html>
<script>
function fetchUserInput() {
$('#txtOrgname').keydown(function(event)
{
if(event.keyCode == 13)
{
event.preventDefault();
toOrgRepos();
}
});
$('#txtUsername').keydown(function(event)
{
if(event.keyCode == 13)
{
event.preventDefault();
toFriends();
}
});
function fetchUserInput()
{
const inputedName = $("#txtUsername").val();
if(inputedName === "")

+ 2
- 1
public/OrgRepoGraph.html View File

@ -100,7 +100,8 @@
createOrgInfo(orgname, 'organizationInfo')
}
if(findGetParameter("name") !== null) {
if(findGetParameter("name") !== null)
{
createGraphs(findGetParameter("name"))
}

+ 7
- 2
public/js/createOrgInfo.js View File

@ -13,8 +13,13 @@ function createOrgInfo(orgName, container) {
</div>"
$("#" + container).html(html);
$('#dataTable').DataTable();
setTimeout(function() {
$('#dataTable').DataTable();
}, 1500);
}, function(error) {
console.log("Unable to load table data");
alert("Organization Does Not Exist");
window.location.href = "./GraphGenerator.html";
});
}

+ 0
- 1
public/js/createOrgRepoGraph.js View File

@ -52,7 +52,6 @@ function alreadyInGraph(userID)
*/
function edgeInGraph(id1, id2)
{
console.log("edge check");
for(var i = 0;i < edges.length; i++)
{
if(edges[i].from === id1 && edges[i].to === id2)

+ 4
- 1
public/js/createOrgTable.js View File

@ -52,7 +52,10 @@ function createOrgTable(orgName, tableContainer)
}
$("#" + tableContainer).html(html);
$('#dataTable').DataTable();
$(document).ready(function() {
$('#dataTable').DataTable();
} );
}).catch(function(error)
{
//console.log("Unable to create table");

+ 2
- 1
public/js/profileGen.js View File

@ -65,7 +65,8 @@ function profileGen(username, container)
$("#"+container).html(html);
})
}, () => {
console.error("error getting user info");
alert("User Does Not Exist");
window.location.href = "./GraphGenerator.html";
});
}

+ 14
- 11
public/js/profileTimeLine.js View File

@ -74,18 +74,21 @@ function timeLineClickEvent(properties)
" <div class=\"col-md-6\"><b>Liscense</b></div>\n" +
" <div class=\"col-md-6\">" +
item.license.name +
"</div>\n" +
" </li>\n" +
" <li class=\"row\">\n" +
" <div class=\"col-md-6\"><b>Home Page</b></div>\n" +
" <div class=\"col-md-6\">" +
"<a href='" + item.homepage + "'>" +item.homepage + "</a>" +
"</div>\n" +
" </li>\n" +
" </ul>\n" +
" </div>";
"</div></li>";
if(item.homepage !== null)
{
html +=
" <li class=\"row\">\n" +
" <div class=\"col-md-6\"><b>Home Page</b></div>\n" +
" <div class=\"col-md-6\">" +
"<a href='" + item.homepage + "'>" +item.homepage + "</a>" +
"</div>\n" +
" </li>\n" +
" </ul>\n";
}
html += "<div class=\"col-6\">\n" +
html += "</div><div class=\"col-6\">\n" +
" <ul class=\"list-group\">\n" +
" <li class=\"row\">\n" +
" <div class=\"col-md-6\"><b>Repository URL</b></div>\n" +

Loading…
Cancel
Save