Merge pull request #1517 from ONLYOFFICE/fix/bug-54910
[DE forms] Bug 54910
This commit is contained in:
commit
041354c5da
|
@ -103,6 +103,8 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onCountPages', this.onCountPages.bind(this));
|
this.api.asc_registerCallback('asc_onCountPages', this.onCountPages.bind(this));
|
||||||
this.api.asc_registerCallback('asc_onCurrentPage', this.onCurrentPage.bind(this));
|
this.api.asc_registerCallback('asc_onCurrentPage', this.onCurrentPage.bind(this));
|
||||||
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
|
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
|
||||||
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this));
|
||||||
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this));
|
||||||
|
|
||||||
// Initialize api gateway
|
// Initialize api gateway
|
||||||
Common.Gateway.on('init', this.loadConfig.bind(this));
|
Common.Gateway.on('init', this.loadConfig.bind(this));
|
||||||
|
@ -671,7 +673,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.canFillForms) {
|
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.canFillForms) {
|
||||||
this.disableEditing(true);
|
Common.NotificationCenter.trigger('api:disconnect');
|
||||||
}
|
}
|
||||||
|
|
||||||
var value = Common.localStorage.getItem("de-license-warning");
|
var value = Common.localStorage.getItem("de-license-warning");
|
||||||
|
@ -1775,9 +1777,21 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
disableEditing: function(state) {
|
onApiServerDisconnect: function(enableDownload) {
|
||||||
this.view && this.view.btnClear && this.view.btnClear.setDisabled(state);
|
this._state.isDisconnected = true;
|
||||||
this._isDisabled = state;
|
this._isDisabled = true;
|
||||||
|
this.view && this.view.btnClear && this.view.btnClear.setDisabled(true);
|
||||||
|
if (!enableDownload) {
|
||||||
|
this.appOptions.canPrint = this.appOptions.canDownload = false;
|
||||||
|
this.view && this.view.btnDownload.setDisabled(true);
|
||||||
|
this.view && this.view.btnSubmit.setDisabled(true);
|
||||||
|
if (this.view && this.view.btnOptions && this.view.btnOptions.menu) {
|
||||||
|
this.view.btnOptions.menu.items[0].setDisabled(true); // print
|
||||||
|
this.view.btnOptions.menu.items[2].setDisabled(true); // download
|
||||||
|
this.view.btnOptions.menu.items[3].setDisabled(true); // download docx
|
||||||
|
this.view.btnOptions.menu.items[4].setDisabled(true); // download pdf
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
errorDefaultMessage : 'Error code: %1',
|
errorDefaultMessage : 'Error code: %1',
|
||||||
|
|
Loading…
Reference in a new issue