Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Add Exam #5
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezL committed Dec 6, 2018
1 parent d702207 commit 2d8d9df
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions web/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h5>ID: ${currentTest.id}</h5>
document.getElementById('newExamName').value ="";
$('#addTestAlert').collapse('hide');

reloadJSON();
reloadJSON(!showingGrid);
}
},
error: function (jqXHR, textStatus, errorThrown)
Expand All @@ -407,7 +407,7 @@ <h5>ID: ${currentTest.id}</h5>
}
}

function reloadJSON(){
function reloadJSON(pageToLoad){
console.log("reloadJSON called");
$.ajax(
{
Expand All @@ -422,20 +422,37 @@ <h5>ID: ${currentTest.id}</h5>
{
console.log("reloadJSON success")
userJSON = data;

if(userMode)
{
outer=userJSON;
console.log("showing Grid" + showingGrid);
if(showingGrid)
if(pageToLoad === 0)
{
clearPage();
outer = userJSON()
fillGrid(userJSON);
$('#sidebar').hide();
$('#pageContent').hide();
}
else
else if(pageToLoad === 1) // leave currently selected exam
{
outer = outer.inner.find(item => item.id === userJSON.id);
loadTerminal(userJSON, outer);
}

}
else
{
if(pageToLoad === 0)
{
outer = userJSON;
fillNavBar(userJSON.inner);
$('#pageContent').hide();
}
}






console.log("userMode: " + userMode);
console.log(userJSON);

Expand Down

0 comments on commit 2d8d9df

Please sign in to comment.