Delete unused method "applyEditRights" from api.
This commit is contained in:
parent
3e6bbee3e3
commit
321eb290c4
|
@ -270,7 +270,7 @@
|
|||
res;
|
||||
|
||||
if (msg.event === 'onRequestEditRights' && !handler) {
|
||||
_applyEditRights(false, 'handler is\'n defined');
|
||||
_applyEditRights(false, 'handler isn\'t defined');
|
||||
} else if (msg.event === 'onInternalMessage' && msg.data && msg.data.type == 'localstorage') {
|
||||
_callLocalStorage(msg.data.data);
|
||||
} else {
|
||||
|
@ -546,7 +546,6 @@
|
|||
return {
|
||||
showError : _showError,
|
||||
showMessage : _showMessage,
|
||||
applyEditRights : _applyEditRights,
|
||||
processSaveResult : _processSaveResult,
|
||||
processRightsChange : _processRightsChange,
|
||||
denyEditingRights : _denyEditingRights,
|
||||
|
|
|
@ -704,64 +704,13 @@ define([
|
|||
},
|
||||
|
||||
onApplyEditRights: function(data) {
|
||||
var application = this.getApplication();
|
||||
application.getController('Statusbar').setStatusCaption('');
|
||||
this.getApplication().getController('Statusbar').setStatusCaption('');
|
||||
|
||||
if (data) {
|
||||
if (data.allowed) {
|
||||
data.requestrights = true;
|
||||
this.appOptions.isEdit= true;
|
||||
|
||||
this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
|
||||
|
||||
var me = this;
|
||||
setTimeout(function(){
|
||||
me.applyModeCommonElements();
|
||||
me.applyModeEditorElements();
|
||||
me.api.asc_setViewMode(false);
|
||||
|
||||
var timer_rp = setInterval(function(){
|
||||
clearInterval(timer_rp);
|
||||
|
||||
var toolbarController = application.getController('Toolbar'),
|
||||
rightmenuController = application.getController('RightMenu'),
|
||||
leftmenuController = application.getController('LeftMenu'),
|
||||
documentHolderController = application.getController('DocumentHolder'),
|
||||
fontsControllers = application.getController('Common.Controllers.Fonts');
|
||||
|
||||
leftmenuController.setMode(me.appOptions).createDelayedElements();
|
||||
|
||||
rightmenuController.createDelayedElements();
|
||||
|
||||
Common.NotificationCenter.trigger('layout:changed', 'main');
|
||||
|
||||
var timer_sl = setInterval(function(){
|
||||
if (window.styles_loaded) {
|
||||
clearInterval(timer_sl);
|
||||
|
||||
documentHolderController.getView().createDelayedElements();
|
||||
documentHolderController.getView().changePosition();
|
||||
me.loadLanguages();
|
||||
|
||||
var shapes = me.api.asc_getPropertyEditorShapes();
|
||||
if (shapes)
|
||||
me.fillAutoShapes(shapes[0], shapes[1]);
|
||||
|
||||
me.fillTextArt(me.api.asc_getTextArtPreviews());
|
||||
me.updateThemeColors();
|
||||
toolbarController.activateControls();
|
||||
|
||||
me.api.UpdateInterfaceState();
|
||||
}
|
||||
}, 50);
|
||||
},50);
|
||||
}, 100);
|
||||
} else {
|
||||
Common.UI.info({
|
||||
title: this.requestEditFailedTitleText,
|
||||
msg: data.message || this.requestEditFailedMessageText
|
||||
});
|
||||
}
|
||||
if (data && !data.allowed) {
|
||||
Common.UI.info({
|
||||
title: this.requestEditFailedTitleText,
|
||||
msg: data.message || this.requestEditFailedMessageText
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue