mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-03 07:08:49 +03:00
luci: tools: Fix show and close modal dialog for NFQWS_OPT
This commit is contained in:
@@ -575,13 +575,17 @@ return baseclass.extend({
|
||||
},
|
||||
|
||||
show: function() {
|
||||
//ui.showModal(null, E('p', { 'class': 'spinning' }, _('Loading')) );
|
||||
let content = this.load();
|
||||
//ui.hideModal();
|
||||
if (content === null) {
|
||||
return this.error('Cannot load parameter');
|
||||
}
|
||||
return this.render(content);
|
||||
ui.showModal(null,
|
||||
E('p', { 'class': 'spinning' }, _('Loading'))
|
||||
);
|
||||
L.resolveDefault(this.load(), null)
|
||||
.then(content => {
|
||||
ui.hideModal();
|
||||
return this.render(content);
|
||||
}).catch(e => {
|
||||
ui.hideModal();
|
||||
return this.error(e);
|
||||
})
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user