Commit 6a745665 authored by Franco Fichtner's avatar Franco Fichtner

firmware: spinner for major upgrade button

parent 321c46c4
...@@ -113,8 +113,12 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -113,8 +113,12 @@ POSSIBILITY OF SUCH DAMAGE.
$('#updatetab > a').tab('show'); $('#updatetab > a').tab('show');
$('#updatestatus').html("{{ lang._('Upgrading...') }}"); $('#updatestatus').html("{{ lang._('Upgrading...') }}");
$("#audit").attr("style","display:none"); $("#audit").attr("style","display:none");
$("#upgrade").attr("style",""); maj_suffix = '';
$("#upgrade_progress").addClass("fa fa-spinner fa-pulse"); if ($.upgrade_action == 'maj') {
maj_suffix = '_maj';
}
$("#upgrade" + maj_suffix).attr("style","");
$("#upgrade_progress" + maj_suffix).addClass("fa fa-spinner fa-pulse");
ajaxCall('/api/core/firmware/upgrade',{upgrade:$.upgrade_action},function() { ajaxCall('/api/core/firmware/upgrade',{upgrade:$.upgrade_action},function() {
$('#updatelist').empty(); $('#updatelist').empty();
...@@ -487,7 +491,6 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -487,7 +491,6 @@ POSSIBILITY OF SUCH DAMAGE.
// empty call refreshes changelogs in the background // empty call refreshes changelogs in the background
ajaxCall('/api/core/firmware/changelog/update', {}, function () { ajaxCall('/api/core/firmware/changelog/update', {}, function () {
$("#checkupdate_progress_maj").removeClass("fa fa-spinner fa-pulse"); $("#checkupdate_progress_maj").removeClass("fa fa-spinner fa-pulse");
packagesInfo(true);
BootstrapDialog.show({ BootstrapDialog.show({
type:BootstrapDialog.TYPE_WARNING, type:BootstrapDialog.TYPE_WARNING,
title: "{{ lang._('Upgrade instructions') }}", title: "{{ lang._('Upgrade instructions') }}",
...@@ -498,7 +501,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -498,7 +501,7 @@ POSSIBILITY OF SUCH DAMAGE.
cssClass: 'btn-warning', cssClass: 'btn-warning',
action: function (dialogRef) { action: function (dialogRef) {
dialogRef.close(); dialogRef.close();
$("#upgrade").attr("style",""); $("#upgrade_maj").attr("style","");
} }
},{ },{
<?php endif ?> <?php endif ?>
...@@ -508,6 +511,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -508,6 +511,7 @@ POSSIBILITY OF SUCH DAMAGE.
} }
}] }]
}); });
packagesInfo(true);
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment