/** * _ ___ Another * / |/ (_)______ __ _____ * / / / __(_- o.role == 'comply').button.loading = true; this.actions.find(o => o.role == 'cancel').button.disabled = true; if(this.options.okPromise){ this.options.okPromise(data).then( this.onSuccess.bind(this,data), this.onFailed.bind(this) ) } else { this.onSuccess(data) } } onSuccess(data) { this.actions.find(o => o.role == 'comply').button.loading = false; this.actions.find(o => o.role == 'cancel').button.disabled = false; this.commit(data); } onFailed() { this.actions.find(o => o.role == 'comply').button.loading = false; this.actions.find(o => o.role == 'cancel').button.disabled = false; this.abort(); } } app.registerClass('ConfirmDialog',ConfirmDialog);