[DE] Ограничения для light-версии (сокращенная версия тулбара + скрыты чат, комментарии, плагины, рецензирование).
This commit is contained in:
parent
2993bbd38d
commit
2d1b5ea522
|
@ -158,11 +158,11 @@ define([
|
|||
createDelayedElements: function() {
|
||||
/** coauthoring begin **/
|
||||
if ( this.mode.canCoAuthoring ) {
|
||||
this.leftMenu.btnComments[this.mode.isEdit&&this.mode.canComments ? 'show' : 'hide']();
|
||||
this.leftMenu.btnComments[(this.mode.isEdit && this.mode.canComments && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canComments)
|
||||
this.leftMenu.setOptionsPanel('comment', this.getApplication().getController('Common.Controllers.Comments').getView('Common.Views.Comments'));
|
||||
|
||||
this.leftMenu.btnChat[this.mode.canChat ? 'show' : 'hide']();
|
||||
this.leftMenu.btnChat[(this.mode.canChat && !this.mode.isLightVersion) ? 'show' : 'hide']();
|
||||
if (this.mode.canChat)
|
||||
this.leftMenu.setOptionsPanel('chat', this.getApplication().getController('Common.Controllers.Chat').getView('Common.Views.Chat'));
|
||||
} else {
|
||||
|
@ -574,13 +574,13 @@ define([
|
|||
break;
|
||||
/** coauthoring begin **/
|
||||
case 'chat':
|
||||
if (this.mode.canCoAuthoring && this.mode.canChat) {
|
||||
if (this.mode.canCoAuthoring && this.mode.canChat && !this.mode.isLightVersion) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
this.leftMenu.showMenu('chat');
|
||||
}
|
||||
return false;
|
||||
case 'comments':
|
||||
if (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) {
|
||||
if (this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments && !this.mode.isLightVersion) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
this.leftMenu.showMenu('comments');
|
||||
this.getApplication().getController('Common.Controllers.Comments').onAfterShow();
|
||||
|
|
|
@ -829,9 +829,11 @@ define([
|
|||
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
||||
application.getController('Common.Controllers.ExternalMergeEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
||||
|
||||
pluginsController.setApi(this.api);
|
||||
this.updatePluginsList(this.plugins);
|
||||
this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.updatePluginsList, this));
|
||||
if (!me.appOptions.isLightVersion) {
|
||||
pluginsController.setApi(me.api);
|
||||
me.updatePluginsList(me.plugins);
|
||||
me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me));
|
||||
}
|
||||
|
||||
documentHolderController.setApi(me.api);
|
||||
documentHolderController.createDelayedElements();
|
||||
|
@ -930,6 +932,7 @@ define([
|
|||
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
|
||||
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
|
||||
this.appOptions.isLightVersion = params.asc_getIsLight();
|
||||
this.appOptions.isOffline = this.api.asc_isOffline();
|
||||
this.appOptions.isReviewOnly = (this.permissions.review === true) && (this.permissions.edit === false);
|
||||
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
|
||||
|
|
|
@ -181,10 +181,10 @@ define([
|
|||
});
|
||||
|
||||
value = Common.localStorage.getItem("de-track-changes-tip");
|
||||
this.showTrackChangesTip = !(value && parseInt(value) == 1);
|
||||
this.showTrackChangesTip = !(value && parseInt(value) == 1) && !this.statusbar.mode.isLightVersion;
|
||||
|
||||
value = Common.localStorage.getItem("de-new-changes");
|
||||
this.showNewChangesTip = !(value && parseInt(value) == 1);
|
||||
this.showNewChangesTip = !(value && parseInt(value) == 1) && !this.statusbar.mode.isLightVersion;
|
||||
|
||||
if (this.statusbar.mode.isReviewOnly) {
|
||||
var iconEl = $('.btn-icon', this.statusbar.btnReview.cmpEl);
|
||||
|
@ -207,7 +207,7 @@ define([
|
|||
var iconEl = $('.btn-icon', this.statusbar.btnReview.cmpEl);
|
||||
(this.api.asc_HaveRevisionsChanges()) ? iconEl.removeClass(this.statusbar.btnReviewCls).addClass('btn-ic-changes') : iconEl.removeClass('btn-ic-changes').addClass(this.statusbar.btnReviewCls);
|
||||
if (value!==null && parseInt(value) == 1) {
|
||||
this.changeReviewStatus(true);
|
||||
this.changeReviewStatus(!this.statusbar.mode.isLightVersion);
|
||||
// show tooltip "track changes in this document" and change icon
|
||||
if (this.showTrackChangesTip && !statusbarIsHidden){
|
||||
this.statusbar.btnReview.updateHint('');
|
||||
|
@ -300,7 +300,7 @@ define([
|
|||
if (this.api) {
|
||||
this.api.asc_SetTrackRevisions(state);
|
||||
}
|
||||
this.showHideReviewChangesPanel(state);
|
||||
this.showHideReviewChangesPanel(state && !this.statusbar.mode.isLightVersion);
|
||||
},
|
||||
|
||||
showHideReviewChangesPanel: function(state) {
|
||||
|
|
|
@ -380,7 +380,7 @@ define([
|
|||
setMode: function(mode) {
|
||||
this.mode = mode;
|
||||
this.$el.find('.el-edit')[mode.isEdit?'show':'hide']();
|
||||
this.$el.find('.el-review')[mode.canReview?'show':'hide']();
|
||||
this.$el.find('.el-review')[(mode.canReview && !mode.isLightVersion)?'show':'hide']();
|
||||
this.lblChangeRights[(!this.mode.isOffline && !this.mode.isReviewOnly && this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length)?'show':'hide']();
|
||||
this.panelUsers[(!this.mode.isOffline && !this.mode.isReviewOnly && this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length)?'show':'hide']();
|
||||
},
|
||||
|
|
|
@ -1237,7 +1237,7 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
render: function () {
|
||||
render: function (mode) {
|
||||
var me = this;
|
||||
|
||||
/**
|
||||
|
@ -1247,7 +1247,7 @@ define([
|
|||
this.trigger('render:before', this);
|
||||
|
||||
var value = Common.localStorage.getItem("de-compact-toolbar");
|
||||
var valueCompact = (value !== null && parseInt(value) == 1);
|
||||
var valueCompact = (mode.isLightVersion || value !== null && parseInt(value) == 1);
|
||||
|
||||
value = Common.localStorage.getItem("de-hidden-title");
|
||||
var valueTitle = (value !== null && parseInt(value) == 1);
|
||||
|
@ -1258,6 +1258,7 @@ define([
|
|||
value = Common.localStorage.getItem("de-hidden-rulers");
|
||||
var valueRulers = (value !== null && parseInt(value) == 1);
|
||||
|
||||
this.mnuitemCompactToolbar.setVisible(!mode.isLightVersion);
|
||||
this.mnuitemCompactToolbar.setChecked(valueCompact, true);
|
||||
this.mnuitemHideTitleBar.setChecked(valueTitle, true);
|
||||
this.mnuitemHideStatusBar.setChecked(valueStatus, true);
|
||||
|
|
|
@ -140,7 +140,7 @@ define([
|
|||
rightMenuView = DE.getController('RightMenu').getView('RightMenu'),
|
||||
statusBarView = DE.getController('Statusbar').getView('Statusbar');
|
||||
|
||||
me._toolbar = toolbarView.render();
|
||||
me._toolbar = toolbarView.render(this.mode);
|
||||
me._rightMenu = rightMenuView.render(this.mode);
|
||||
|
||||
var value = Common.localStorage.getItem('de-hidden-status');
|
||||
|
|
Loading…
Reference in a new issue