|
|
@ -3,6 +3,40 @@ var updateTimerID;
|
|
|
|
var updateText;
|
|
|
|
var updateText;
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function restartTimer() {
|
|
|
|
|
|
|
|
$("#spinner").addClass("hidden");
|
|
|
|
|
|
|
|
$("#RestartDialog").modal("hide");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updateTimer() {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
dataType: "json",
|
|
|
|
|
|
|
|
url: window.location.pathname+"/../../get_updater_status",
|
|
|
|
|
|
|
|
success: function(data) {
|
|
|
|
|
|
|
|
// console.log(data.status);
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[data.status]);
|
|
|
|
|
|
|
|
if (data.status >6){
|
|
|
|
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
|
|
|
|
$("#spinner2").hide();
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #updateFinished").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error() {
|
|
|
|
|
|
|
|
// console.log('Done');
|
|
|
|
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
|
|
|
|
$("#spinner2").hide();
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[7]);
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #updateFinished").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
timeout:2000
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(".discover .row").isotope({
|
|
|
|
$(".discover .row").isotope({
|
|
|
|
// options
|
|
|
|
// options
|
|
|
|
itemSelector : ".book",
|
|
|
|
itemSelector : ".book",
|
|
|
@ -33,7 +67,7 @@ $(function() {
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
url: window.location.pathname+"/../../shutdown",
|
|
|
|
url: window.location.pathname+"/../../shutdown",
|
|
|
|
data: {"parameter":0},
|
|
|
|
data: {"parameter":0},
|
|
|
|
success: function(data) {
|
|
|
|
success(data) {
|
|
|
|
$("#spinner").show();
|
|
|
|
$("#spinner").show();
|
|
|
|
displaytext=data.text;
|
|
|
|
displaytext=data.text;
|
|
|
|
setTimeout(restartTimer, 3000);}
|
|
|
|
setTimeout(restartTimer, 3000);}
|
|
|
@ -44,7 +78,7 @@ $(function() {
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
url: window.location.pathname+"/../../shutdown",
|
|
|
|
url: window.location.pathname+"/../../shutdown",
|
|
|
|
data: {"parameter":1},
|
|
|
|
data: {"parameter":1},
|
|
|
|
success: function(data) {
|
|
|
|
success(data) {
|
|
|
|
return alert(data.text);}
|
|
|
|
return alert(data.text);}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -54,7 +88,7 @@ $(function() {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
url: window.location.pathname+"/../../get_update_status",
|
|
|
|
url: window.location.pathname+"/../../get_update_status",
|
|
|
|
success: function(data) {
|
|
|
|
success(data) {
|
|
|
|
$("#check_for_update").html(buttonText);
|
|
|
|
$("#check_for_update").html(buttonText);
|
|
|
|
if (data.status === true) {
|
|
|
|
if (data.status === true) {
|
|
|
|
$("#check_for_update").addClass("hidden");
|
|
|
|
$("#check_for_update").addClass("hidden");
|
|
|
@ -79,7 +113,7 @@ $(function() {
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
data: { start: "True"},
|
|
|
|
data: { start: "True"},
|
|
|
|
url: window.location.pathname+"/../../get_updater_status",
|
|
|
|
url: window.location.pathname+"/../../get_updater_status",
|
|
|
|
success: function(data) {
|
|
|
|
success(data) {
|
|
|
|
updateText=data.text;
|
|
|
|
updateText=data.text;
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[data.status]);
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[data.status]);
|
|
|
|
// console.log(data.status);
|
|
|
|
// console.log(data.status);
|
|
|
@ -87,40 +121,6 @@ $(function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function restartTimer() {
|
|
|
|
|
|
|
|
$("#spinner").addClass("hidden");
|
|
|
|
|
|
|
|
$("#RestartDialog").modal("hide");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updateTimer() {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
dataType: "json",
|
|
|
|
|
|
|
|
url: window.location.pathname+"/../../get_updater_status",
|
|
|
|
|
|
|
|
success: function(data) {
|
|
|
|
|
|
|
|
// console.log(data.status);
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[data.status]);
|
|
|
|
|
|
|
|
if (data.status >6){
|
|
|
|
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
|
|
|
|
$("#spinner2").hide();
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #updateFinished").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function() {
|
|
|
|
|
|
|
|
// console.log('Done');
|
|
|
|
|
|
|
|
clearInterval(updateTimerID);
|
|
|
|
|
|
|
|
$("#spinner2").hide();
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #Updatecontent").html(updateText[7]);
|
|
|
|
|
|
|
|
$("#UpdateprogressDialog #updateFinished").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#check_for_update").removeClass("hidden");
|
|
|
|
|
|
|
|
$("#perform_update").addClass("hidden");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
timeout:2000
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(window).resize(function(event) {
|
|
|
|
$(window).resize(function(event) {
|
|
|
|
$(".discover .row").isotope("reLayout");
|
|
|
|
$(".discover .row").isotope("reLayout");
|
|
|
|
});
|
|
|
|
});
|
|
|
|