[SSE] Added collaboration tab.

This commit is contained in:
Julia Radzhabova 2017-10-12 13:43:23 +03:00
parent aec113963d
commit 5178858833
10 changed files with 80 additions and 9 deletions

View file

@ -526,12 +526,14 @@ define([
if (this.api) {
this.api.asc_SetFastCollaborative(item.value==1);
if (this.api.SetCollaborativeMarksShowType) {
var value = Common.localStorage.getItem(item.value ? this.view.appPrefix + "settings-showchanges-fast" : this.view.appPrefix + "settings-showchanges-strict");
if (value !== null)
this.api.SetCollaborativeMarksShowType(value == 'all' ? Asc.c_oAscCollaborativeMarksShowType.All :
value == 'none' ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
else
this.api.SetCollaborativeMarksShowType(item.value ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
}
value = Common.localStorage.getItem(this.view.appPrefix + "settings-autosave");
if (value===null && this.appConfig.customization && this.appConfig.customization.autosave===false)

View file

@ -159,6 +159,7 @@ require([
'Common.Controllers.Chat',
'Common.Controllers.Comments',
'Common.Controllers.Plugins'
,'Common.Controllers.ReviewChanges'
]
});
@ -186,6 +187,7 @@ require([
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
], function() {
app.start();
});

View file

@ -86,6 +86,9 @@ define([
'search:next': _.bind(this.onQuerySearch, this, 'next'),
'search:replace': _.bind(this.onQueryReplace, this),
'search:replaceall': _.bind(this.onQueryReplaceAll, this)
},
'Common.Views.ReviewChanges': {
'collaboration:chat': _.bind(this.onShowHideChat, this)
}
});
Common.NotificationCenter.on('app:comment:add', _.bind(this.onAppAddComment, this));
@ -759,6 +762,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',
textItemEntireCell : 'Entire cell contents',

View file

@ -913,7 +913,8 @@ define([
toolbarController = application.getController('Toolbar'),
statusbarController = application.getController('Statusbar'),
rightmenuController = application.getController('RightMenu'),
fontsControllers = application.getController('Common.Controllers.Fonts');
fontsControllers = application.getController('Common.Controllers.Fonts'),
reviewController = application.getController('Common.Controllers.ReviewChanges');
fontsControllers && fontsControllers.setApi(me.api);
toolbarController && toolbarController.setApi(me.api);
@ -921,6 +922,8 @@ define([
rightmenuController && rightmenuController.setApi(me.api);
reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api);
if (statusbarController) {
statusbarController.getView('Statusbar').changeViewMode(true);
}

View file

@ -2911,6 +2911,15 @@ define([
if ( config.isEdit )
me.toolbar.setApi(me.api);
if (!config.isEditDiagram && !config.isEditMailMerge) {
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
var $panel = SSE.getController('Common.Controllers.ReviewChanges').createToolbarPanel();
if ( $panel ) {
me.toolbar.addTab(tab, $panel, 3);
}
}
});
},

View file

@ -1117,6 +1117,8 @@ define([
});
}
Common.NotificationCenter.on('collaboration:sharing', _.bind(this.changeAccessRights, this));
return this;
},

View file

@ -255,7 +255,7 @@ define([
}
if (this.mode.canChat) {
this.panelChat['hide']();
this.btnChat.toggle(false, true);
this.btnChat.toggle(false);
}
}
/** coauthoring end **/

View file

@ -2078,6 +2078,7 @@ define([
textTabFile: 'File',
textTabHome: 'Home',
textTabInsert: 'Insert',
textSurface: 'Surface'
textSurface: 'Surface',
textTabCollaboration: 'Collaboration'
}, SSE.Views.Toolbar || {}));
});

View file

@ -149,6 +149,7 @@ require([
'Common.Controllers.Chat',
'Common.Controllers.Comments',
'Common.Controllers.Plugins'
,'Common.Controllers.ReviewChanges'
]
});
@ -176,6 +177,7 @@ require([
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
], function() {
window.compareVersions = true;
app.start();

View file

@ -112,6 +112,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",
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
"SSE.Controllers.DocumentHolder.centerText": "Center",
"SSE.Controllers.DocumentHolder.deleteColumnText": "Delete Column",
@ -1649,6 +1683,7 @@
"SSE.Views.Toolbar.textTabFile": "File",
"SSE.Views.Toolbar.textTabHome": "Home",
"SSE.Views.Toolbar.textTabInsert": "Insert",
"SSE.Views.Toolbar.textTabCollaboration": "Collaboration",
"SSE.Views.Toolbar.textTopBorders": "Top Borders",
"SSE.Views.Toolbar.textUnderline": "Underline",
"SSE.Views.Toolbar.textWinLossSpark": "Win/Loss",