mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 21:50:24 -06:00
Added confirmation question before upgrading unRAID OS
This commit is contained in:
@@ -177,7 +177,7 @@ function showNotice(data,plugin) {
|
||||
$('#user-notice').html(data.replace(/<a>(.*)<\/a>/,"<a "+href+">$1</a>"));
|
||||
}
|
||||
function showUpgrade(data,plugin) {
|
||||
var href = "href=\"#\" onclick=\"hideUpgrade();openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2="+plugin+".plg','Update Plugin',600,900,true)\"";
|
||||
var href = "href=\"#\" onclick=\"hideUpgrade();openUpgrade('"+plugin+"')\"";
|
||||
if ($.cookie('os_upgrade')==null)
|
||||
$('.upgrade_notice').html(data.replace(/<a(.*)>(.*)<\/a>/,"<a "+href+"$1>$2</a>")+"<i class='fa fa-close' title='Close' onclick='hideUpgrade(true)'></i>").show();
|
||||
}
|
||||
@@ -188,6 +188,11 @@ function hideUpgrade(set) {
|
||||
else
|
||||
$.removeCookie('os_upgrade',{path:'/'});
|
||||
}
|
||||
function openUpgrade(plugin) {
|
||||
swal({title:'Upgrade unRAID OS',text:'Do you want to download and install the new version?',type:'warning',showCancelButton:true},function(){
|
||||
openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2='+plugin+'.plg','Update Plugin',600,900,true);
|
||||
});
|
||||
}
|
||||
function notifier() {
|
||||
var tub1 = 0, tub2 = 0, tub3 = 0;
|
||||
$.post('/webGui/include/Notify.php',{cmd:'get'},function(json) {
|
||||
|
||||
Reference in New Issue
Block a user