Submit form
This commit is contained in:
parent
e37b10ea23
commit
5308f61223
|
@ -70,6 +70,8 @@ define([
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
this.api.asc_registerCallback('asc_onChangeSpecialFormsGlobalSettings', _.bind(this.onChangeSpecialFormsGlobalSettings, this));
|
this.api.asc_registerCallback('asc_onChangeSpecialFormsGlobalSettings', _.bind(this.onChangeSpecialFormsGlobalSettings, this));
|
||||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||||
|
this.api.asc_registerCallback('asc_onStartAction', _.bind(this.onLongActionBegin, this));
|
||||||
|
this.api.asc_registerCallback('asc_onEndAction', _.bind(this.onLongActionEnd, this));
|
||||||
|
|
||||||
// this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
|
// this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
|
||||||
// this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
|
// this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
|
||||||
|
@ -256,6 +258,29 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onLongActionBegin: function(type, id) {
|
||||||
|
if (id==Asc.c_oAscAsyncAction['Submit'] && this.view.btnSubmit) {
|
||||||
|
this.view.btnSubmit.setDisabled(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onLongActionEnd: function(type, id) {
|
||||||
|
if (id==Asc.c_oAscAsyncAction['Submit'] && this.view.btnSubmit) {
|
||||||
|
this.view.btnSubmit.setDisabled(false);
|
||||||
|
if (!this.submitedTooltip) {
|
||||||
|
this.submitedTooltip = new Common.UI.SynchronizeTip({
|
||||||
|
text: this.view.textSubmited,
|
||||||
|
extCls: 'no-arrow',
|
||||||
|
target: $(document.body)
|
||||||
|
});
|
||||||
|
this.submitedTooltip.on('closeclick', function () {
|
||||||
|
this.submitedTooltip.hide();
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
this.submitedTooltip.show();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onAppReady: function (config) {
|
onAppReady: function (config) {
|
||||||
var me = this;
|
var me = this;
|
||||||
(new Promise(function (accept, reject) {
|
(new Promise(function (accept, reject) {
|
||||||
|
|
|
@ -386,7 +386,8 @@ define([
|
||||||
capBtnSubmit: 'Submit',
|
capBtnSubmit: 'Submit',
|
||||||
tipPrevForm: 'Go to the previous field',
|
tipPrevForm: 'Go to the previous field',
|
||||||
tipNextForm: 'Go to the next field',
|
tipNextForm: 'Go to the next field',
|
||||||
tipSubmit: 'Submit form'
|
tipSubmit: 'Submit form',
|
||||||
|
textSubmited: 'Form submitted successfully'
|
||||||
}
|
}
|
||||||
}()), DE.Views.FormsTab || {}));
|
}()), DE.Views.FormsTab || {}));
|
||||||
});
|
});
|
Loading…
Reference in a new issue