[DE] Hide adding content controls (#314)

This commit is contained in:
Julia Radzhabova 2020-01-24 16:39:08 +03:00 committed by Alexey Golubev
parent 904ebcdc0c
commit 55c8f61a17
3 changed files with 7 additions and 0 deletions

View file

@ -359,6 +359,7 @@ define([
this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings;
this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures;
this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison");
this.appOptions.canFeatureContentControl = !!this.api.asc_isSupportFeature("content-сontrols");
this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false));
appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header');

View file

@ -1761,6 +1761,8 @@ define([
},
onControlsSelect: function(menu, item) {
if (!(this.mode && this.mode.canFeatureContentControl)) return;
if (item.value == 'settings' || item.value == 'remove') {
if (this.api.asc_IsContentControl()) {
var props = this.api.asc_GetContentControlProperties();

View file

@ -1538,6 +1538,10 @@ define([
}));
me.btnWatermark.updateHint(me.tipWatermark);
if (!config.canFeatureContentControl && me.btnContentControls.cmpEl) {
me.btnContentControls.cmpEl.parents('.group').hide().prev('.separator').hide();
}
});
},