Skip to content

Commit

Permalink
优化消息提示
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Jul 4, 2019
1 parent b347dc4 commit 73fe342
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
15 changes: 9 additions & 6 deletions BTPanel/static/js/public_backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,15 @@ var bt =
if(!config.hasOwnProperty('time')) config.time = 2000;
if(typeof config.msg=='string' && bt.contains(config.msg,'ERROR')) config.time = 0;

if(config.hasOwnProperty('icon')){
if(typeof config.icon=='boolean') config.icon = config.icon?1:2;
}
else if(config.hasOwnProperty('status')){
config.icon=config.status?1:2;
}
if (config.hasOwnProperty('icon')) {
if (typeof config.icon == 'boolean') config.icon = config.icon ? 1 : 2;
}
else if (config.hasOwnProperty('status')) {
config.icon = config.status ? 1 : 2;
if (!config.status) {
btnObj.time = 0;
}
}
if(config.icon) btnObj.icon = config.icon;
btnObj.time = config.time;
var msg = ''
Expand Down
12 changes: 9 additions & 3 deletions BTPanel/static/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,10 @@ var site = {
})
},
reload: function (index) {
site.reload(7);
$('#ssl_tabs span:eq(' + index + ')').trigger('click');
if (index == undefined) index = 0
var _sel = $('#ssl_tabs .on');
if (_sel.length == 0) _sel = $('#ssl_tabs span:eq(0)');
_sel.trigger('click');
}
},
edit: {
Expand Down Expand Up @@ -2341,7 +2343,11 @@ var site = {
})
},
reload: function (index) {
$('.site-menu p:eq(' + index + ')').trigger('click');
if (index == undefined) index = 0

var _sel = $('.site-menu p.bgw');
if (_sel.length == 0) _sel = $('.site-menu p:eq(0)');
_sel.trigger('click');
},
plugin_firewall: function () {
var typename = bt.get_cookie('serverType');
Expand Down

0 comments on commit 73fe342

Please sign in to comment.