diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index 9efdf4486..21d9e8a70 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -277,6 +277,7 @@ .button-normal-icon(~'x-huge .btn-ic-reviewview', 30, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-ic-history', 30, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-ic-chat', 30, @toolbar-big-icon-size); +.button-normal-icon(~'x-huge .btn-ic-sharing', 30, @toolbar-big-icon-size); .button-normal-icon(review-save, 14, @toolbar-big-icon-size); .button-normal-icon(review-deny, 15, @toolbar-big-icon-size); .button-normal-icon(review-next, 16, @toolbar-big-icon-size); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 75e4d9be1..4716ae078 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1618,6 +1618,7 @@ "DE.Views.Toolbar.textTabInsert": "Insert", "DE.Views.Toolbar.textTabLayout": "Layout", "DE.Views.Toolbar.textTabReview": "Review", + "DE.Views.Toolbar.textTabCollaboration": "Collaboration", "DE.Views.Toolbar.textTitleError": "Error", "DE.Views.Toolbar.textToCurrent": "To current position", "DE.Views.Toolbar.textTop": "Top: ", diff --git a/apps/presentationeditor/main/app.js b/apps/presentationeditor/main/app.js index 0cb25efb3..03d2bac45 100644 --- a/apps/presentationeditor/main/app.js +++ b/apps/presentationeditor/main/app.js @@ -155,6 +155,7 @@ require([ /** coauthoring end **/ ,'Common.Controllers.Plugins' ,'Common.Controllers.ExternalDiagramEditor' + ,'Common.Controllers.ReviewChanges' ] }); @@ -185,6 +186,7 @@ require([ 'common/main/lib/controller/Plugins', 'presentationeditor/main/app/view/ChartSettings', 'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ReviewChanges' ], function() { app.start(); }); diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index d41162cdd..01b8752cb 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -94,6 +94,9 @@ define([ 'hide': _.bind(this.onSearchDlgHide, this), 'search:back': _.bind(this.onQuerySearch, this, 'back'), 'search:next': _.bind(this.onQuerySearch, this, 'next') + }, + 'Common.Views.ReviewChanges': { + 'collaboration:chat': _.bind(this.onShowHideChat, this) } }); }, @@ -540,6 +543,18 @@ define([ } }, + onShowHideChat: function(state) { + if (this.mode.canCoAuthoring && this.mode.canChat && !this.mode.isLightVersion) { + if (state) { + Common.UI.Menu.Manager.hideAll(); + this.leftMenu.showMenu('chat'); + } else { + this.leftMenu.btnChat.toggle(false, true); + this.leftMenu.onBtnMenuClick(this.leftMenu.btnChat); + } + } + }, + textNoTextFound : 'Text not found', newDocumentTitle : 'Unnamed document', requestEditRightsText : 'Requesting editing rights...' diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 9031b0b86..8a0cfdccf 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -846,7 +846,8 @@ define([ application = this.getApplication(), toolbarController = application.getController('Toolbar'), rightmenuController = application.getController('RightMenu'), - fontsControllers = application.getController('Common.Controllers.Fonts'); + fontsControllers = application.getController('Common.Controllers.Fonts'), + reviewController = application.getController('Common.Controllers.ReviewChanges'); // me.getStore('SlideLayouts'); fontsControllers && fontsControllers.setApi(me.api); @@ -854,6 +855,8 @@ define([ rightmenuController && rightmenuController.setApi(me.api); + reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api); + var viewport = this.getApplication().getController('Viewport').getView('Viewport'); viewport.applyEditorMode(); diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 087d8e6e2..e82acb2b0 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -2071,6 +2071,15 @@ define([ } me.toolbar.render(_.extend({compactview: compactview}, config)); + + if ( config.isEdit ) { + var tab = {action: 'review', caption: me.toolbar.textTabCollaboration}; + var $panel = PE.getController('Common.Controllers.ReviewChanges').createToolbarPanel(); + + if ( $panel ) { + me.toolbar.addTab(tab, $panel, 3); + } + } }, onAppReady: function (config) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 75547a46d..9f1b5ad74 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -656,6 +656,8 @@ define([ }); } + Common.NotificationCenter.on('collaboration:sharing', _.bind(this.changeAccessRights, this)); + return this; }, diff --git a/apps/presentationeditor/main/app/view/LeftMenu.js b/apps/presentationeditor/main/app/view/LeftMenu.js index 24b70ed54..cf850daf2 100644 --- a/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/apps/presentationeditor/main/app/view/LeftMenu.js @@ -282,7 +282,7 @@ define([ } if (this.mode.canChat) { this.panelChat['hide'](); - this.btnChat.toggle(false, true); + this.btnChat.toggle(false); } } /** coauthoring end **/ diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 7ff3f9e0a..a56e1f7f1 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1853,7 +1853,8 @@ define([ textTabHome: 'Home', textTabInsert: 'Insert', textSurface: 'Surface', - textShowPresenterView: 'Show presenter view' + textShowPresenterView: 'Show presenter view', + textTabCollaboration: 'Collaboration' } }()), PE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/app_dev.js b/apps/presentationeditor/main/app_dev.js index af1cdf9fa..36dbe9e3f 100644 --- a/apps/presentationeditor/main/app_dev.js +++ b/apps/presentationeditor/main/app_dev.js @@ -146,6 +146,7 @@ require([ /** coauthoring end **/ ,'Common.Controllers.Plugins' ,'Common.Controllers.ExternalDiagramEditor' + ,'Common.Controllers.ReviewChanges' ] }); @@ -176,6 +177,7 @@ require([ 'common/main/lib/controller/Plugins', 'presentationeditor/main/app/view/ChartSettings', 'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ReviewChanges' ], function() { window.compareVersions = true; app.start(); diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ef2ba3b31..c880414ad 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -126,6 +126,40 @@ "Common.Views.RenameDialog.okButtonText": "Ok", "Common.Views.RenameDialog.textName": "File name", "Common.Views.RenameDialog.txtInvalidName": "The file name cannot contain any of the following characters: ", + "Common.Views.ReviewChanges.hintNext": "To next change", + "Common.Views.ReviewChanges.hintPrev": "To previous change", + "Common.Views.ReviewChanges.tipAcceptCurrent": "Accept current change", + "Common.Views.ReviewChanges.tipRejectCurrent": "Reject current change", + "Common.Views.ReviewChanges.tipReview": "Track changes", + "Common.Views.ReviewChanges.tipReviewView": "Select the mode you want the changes to be displayed", + "Common.Views.ReviewChanges.tipSetDocLang": "Set document language", + "Common.Views.ReviewChanges.tipSetSpelling": "Spell checking", + "Common.Views.ReviewChanges.txtAccept": "Accept", + "Common.Views.ReviewChanges.txtAcceptAll": "Accept All Changes", + "Common.Views.ReviewChanges.txtAcceptChanges": "Accept changes", + "Common.Views.ReviewChanges.txtAcceptCurrent": "Accept Current Change", + "Common.Views.ReviewChanges.txtClose": "Close", + "Common.Views.ReviewChanges.txtDocLang": "Language", + "Common.Views.ReviewChanges.txtFinal": "All changes accepted (Preview)", + "Common.Views.ReviewChanges.txtMarkup": "All changes (Editing)", + "Common.Views.ReviewChanges.txtNext": "Next", + "Common.Views.ReviewChanges.txtOriginal": "All changes rejected (Preview)", + "Common.Views.ReviewChanges.txtPrev": "Previous", + "Common.Views.ReviewChanges.txtReject": "Reject", + "Common.Views.ReviewChanges.txtRejectAll": "Reject All Changes", + "Common.Views.ReviewChanges.txtRejectChanges": "Reject changes", + "Common.Views.ReviewChanges.txtRejectCurrent": "Reject Current Change", + "Common.Views.ReviewChanges.txtSpelling": "Spell Checking", + "Common.Views.ReviewChanges.txtTurnon": "Track Changes", + "Common.Views.ReviewChanges.txtView": "Display Mode", + "Common.Views.ReviewChanges.txtSharing": "Sharing", + "Common.Views.ReviewChanges.tipSharing": "Manage document access rights", + "Common.Views.ReviewChanges.txtCoAuthMode": "Co-editing Mode", + "Common.Views.ReviewChanges.tipCoAuthMode": "Set co-editing mode", + "Common.Views.ReviewChanges.strFast": "Fast", + "Common.Views.ReviewChanges.strStrict": "Strict", + "Common.Views.ReviewChanges.txtHistory": "Version History", + "Common.Views.ReviewChanges.tipHistory": "Show version history", "PE.Controllers.LeftMenu.newDocumentTitle": "Unnamed presentation", "PE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...", "PE.Controllers.LeftMenu.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.", @@ -1312,6 +1346,7 @@ "PE.Views.Toolbar.textTabFile": "File", "PE.Views.Toolbar.textTabHome": "Home", "PE.Views.Toolbar.textTabInsert": "Insert", + "PE.Views.Toolbar.textTabCollaboration": "Collaboration", "PE.Views.Toolbar.textTitleError": "Error", "PE.Views.Toolbar.textUnderline": "Underline", "PE.Views.Toolbar.textZoom": "Zoom",