Delete unused method "applyEditRights" from api.
This commit is contained in:
parent
3e6bbee3e3
commit
321eb290c4
|
@ -270,7 +270,7 @@
|
||||||
res;
|
res;
|
||||||
|
|
||||||
if (msg.event === 'onRequestEditRights' && !handler) {
|
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') {
|
} else if (msg.event === 'onInternalMessage' && msg.data && msg.data.type == 'localstorage') {
|
||||||
_callLocalStorage(msg.data.data);
|
_callLocalStorage(msg.data.data);
|
||||||
} else {
|
} else {
|
||||||
|
@ -546,7 +546,6 @@
|
||||||
return {
|
return {
|
||||||
showError : _showError,
|
showError : _showError,
|
||||||
showMessage : _showMessage,
|
showMessage : _showMessage,
|
||||||
applyEditRights : _applyEditRights,
|
|
||||||
processSaveResult : _processSaveResult,
|
processSaveResult : _processSaveResult,
|
||||||
processRightsChange : _processRightsChange,
|
processRightsChange : _processRightsChange,
|
||||||
denyEditingRights : _denyEditingRights,
|
denyEditingRights : _denyEditingRights,
|
||||||
|
|
|
@ -704,64 +704,13 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApplyEditRights: function(data) {
|
onApplyEditRights: function(data) {
|
||||||
var application = this.getApplication();
|
this.getApplication().getController('Statusbar').setStatusCaption('');
|
||||||
application.getController('Statusbar').setStatusCaption('');
|
|
||||||
|
|
||||||
if (data) {
|
if (data && !data.allowed) {
|
||||||
if (data.allowed) {
|
Common.UI.info({
|
||||||
data.requestrights = true;
|
title: this.requestEditFailedTitleText,
|
||||||
this.appOptions.isEdit= true;
|
msg: data.message || this.requestEditFailedMessageText
|
||||||
|
});
|
||||||
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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue