| // In a CBI.js style view, this _works_ but I don't get any of the UI styling with spinners and de-activated buttons?
p = s.option(form.Button, "_test_settings", _("Test settings"), _("might take a while to validate"))
p.inputstyle = "apply";
p.onclick = ui.createHandlerFn(this, function(blah, ev) {
console.log("hit clicky click: ", blah, ev);
return new Promise(function(resolve, reject) {
setTimeout(function() {
console.log("resolving with pleasure");
resolve("hoho joy");
}, 1000);
});
}, "some string");
// as opposed to this raw style, which _does_ restyle the button, but now you've lost the nice CBI style building up the UI?
//....
E('div', { 'class': 'cbi-page-actions' }, [
E('button', {
'class': 'btn cbi-button-save',
'click': ui.createHandlerFn(this, 'handleMaster', true, table, initList),
'disabled': isReadonlyView
}, _('Enable and start all')),
|