Browse Source

Updated org preview to include the org's image.

pull/11/head
Jeffery Russell 5 years ago
parent
commit
8f90526e55
3 changed files with 7 additions and 12 deletions
  1. +5
    -8
      public/js/createOrgInfo.js
  2. +0
    -2
      public/js/createOrgRepoGraph.js
  3. +2
    -2
      public/js/createOrgTable.js

+ 5
- 8
public/js/createOrgInfo.js View File

@ -1,23 +1,20 @@
function createOrgInfo(orgName, container) { function createOrgInfo(orgName, container) {
queryAPIByOrg("", orgName, (orgData) => { queryAPIByOrg("", orgName, (orgData) => {
console.log("called"); console.log("called");
var html =
"<div class=\"card\" style=\"w-100;\"> \
var html = "<div class=\"card\" style=\"w-100;\"><div class='row m-0'><div class='col-2 col-centered p-auto'>"+
"<img src='" + orgData.avatar_url + "' width='100%'/>" +
"</div><div class='col-10'>\
<div class=\"card-body\"> \ <div class=\"card-body\"> \
<div class=\"card-header\"><h3 class=\"card-title\">"+orgData.name+"</h3></div> " +
<center><b><h3 class=\"card-title\">"+orgData.name+"</h3><b><center> " +
(orgData.description != null ? "<div class=\"card-text\"><p>"+orgData.description+"</p></div>" : "") + " \ (orgData.description != null ? "<div class=\"card-text\"><p>"+orgData.description+"</p></div>" : "") + " \
</div> \ </div> \
<ul class=\"list-group list-group-flush\">"+ <ul class=\"list-group list-group-flush\">"+
(orgData.location !=null ? "<li class=\"list-group-item\">Location: "+orgData.location+"</li>" : "") + " \ (orgData.location !=null ? "<li class=\"list-group-item\">Location: "+orgData.location+"</li>" : "") + " \
</ul> \ </ul> \
</div>"
</div></div></div>";
$("#" + container).html(html); $("#" + container).html(html);
setTimeout(function() {
$('#dataTable').DataTable();
}, 1500);
}, function(error) { }, function(error) {
alert("Organization Does Not Exist"); alert("Organization Does Not Exist");
window.location.href = "./GraphGenerator.html"; window.location.href = "./GraphGenerator.html";

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

@ -259,8 +259,6 @@ function updateProgress()
$("#graphLoading").html("<div class=\"progress\">\n" + $("#graphLoading").html("<div class=\"progress\">\n" +
" <div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" style=\"width: " + percent + "%\" aria-valuenow=\"" + percent + "\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n" + " <div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" style=\"width: " + percent + "%\" aria-valuenow=\"" + percent + "\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n" +
"</div>"); "</div>");
console.log();
} }
/** /**

+ 2
- 2
public/js/createOrgTable.js View File

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

Loading…
Cancel
Save