[DE] Added Chat button to the collaborative tab in the toolbar.
This commit is contained in:
parent
1577c8a26e
commit
cae3819434
|
@ -616,6 +616,14 @@ define([
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (me.view && me.view.btnChat) {
|
||||
me.getApplication().getController('LeftMenu').leftMenu.btnChat.on('toggle', function(btn, state){
|
||||
if (state !== me.view.btnChat.pressed)
|
||||
me.view.turnChat(state);
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
applySettings: function(menu) {
|
||||
|
|
|
@ -434,6 +434,10 @@ define([
|
|||
'<span id="btn-change-reject" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long"/>' +
|
||||
'<div class="group no-group-mask">' +
|
||||
'<span id="slot-btn-chat" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long"/>' +
|
||||
'<div class="group no-group-mask">' +
|
||||
'<span id="slot-btn-history" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
|
@ -507,6 +511,10 @@ define([
|
|||
this.btnHistory && this.btnHistory.on('click', function (btn, e) {
|
||||
Common.NotificationCenter.trigger('collaboration:history');
|
||||
});
|
||||
|
||||
this.btnChat && this.btnChat.on('click', function (btn, e) {
|
||||
me.fireEvent('collaboration:chat', [btn.pressed]);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -592,6 +600,15 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
if (this.appConfig.canCoAuthoring && this.appConfig.canChat) {
|
||||
this.btnChat = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-ic-chat',
|
||||
caption: this.txtChat,
|
||||
enableToggle: true
|
||||
});
|
||||
}
|
||||
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
},
|
||||
|
||||
|
@ -688,8 +705,8 @@ define([
|
|||
}
|
||||
|
||||
me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
|
||||
|
||||
me.btnHistory && me.btnHistory.updateHint(me.tipHistory);
|
||||
me.btnChat && me.btnChat.updateHint(me.txtChat + Common.Utils.String.platformKey('Alt+Q'));
|
||||
|
||||
if (me.btnCoAuthMode) {
|
||||
me.btnCoAuthMode.setMenu(
|
||||
|
@ -741,6 +758,7 @@ define([
|
|||
this.btnSharing && this.btnSharing.render(this.$el.find('#slot-btn-sharing'));
|
||||
this.btnCoAuthMode && this.btnCoAuthMode.render(this.$el.find('#slot-btn-coauthmode'));
|
||||
this.btnHistory && this.btnHistory.render(this.$el.find('#slot-btn-history'));
|
||||
this.btnChat && this.btnChat.render(this.$el.find('#slot-btn-chat'));
|
||||
|
||||
return this.$el;
|
||||
},
|
||||
|
@ -837,6 +855,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
turnChat: function (state) {
|
||||
this.btnChat && this.btnChat.toggle(state, true);
|
||||
},
|
||||
|
||||
SetDisabled: function (state, langs) {
|
||||
this.btnsSpelling && this.btnsSpelling.forEach(function(button) {
|
||||
if ( button ) {
|
||||
|
@ -853,6 +875,7 @@ define([
|
|||
button.setDisabled(state);
|
||||
}
|
||||
}, this);
|
||||
this.btnChat && this.btnChat.setDisabled(state);
|
||||
},
|
||||
|
||||
onLostEditRights: function() {
|
||||
|
@ -895,7 +918,8 @@ define([
|
|||
strFast: 'Fast',
|
||||
strStrict: 'Strict',
|
||||
txtHistory: 'Version History',
|
||||
tipHistory: 'Show version history'
|
||||
tipHistory: 'Show version history',
|
||||
txtChat: 'Chat'
|
||||
}
|
||||
}()), Common.Views.ReviewChanges || {}));
|
||||
|
||||
|
|
|
@ -276,6 +276,7 @@
|
|||
.button-normal-icon(~'x-huge .btn-ic-review', 13, @toolbar-big-icon-size);
|
||||
.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(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);
|
||||
|
|
|
@ -99,6 +99,9 @@ define([
|
|||
'search:replace': _.bind(this.onQueryReplace, this),
|
||||
'search:replaceall': _.bind(this.onQueryReplaceAll, this),
|
||||
'search:highlight': _.bind(this.onSearchHighlight, this)
|
||||
},
|
||||
'Common.Views.ReviewChanges': {
|
||||
'collaboration:chat': _.bind(this.onShowHideChat, this)
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -675,6 +678,18 @@ define([
|
|||
Common.Gateway.requestHistory();
|
||||
},
|
||||
|
||||
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...',
|
||||
|
|
|
@ -276,7 +276,7 @@ define([
|
|||
}
|
||||
if (this.mode.canChat) {
|
||||
this.panelChat['hide']();
|
||||
this.btnChat.toggle(false, true);
|
||||
this.btnChat.toggle(false);
|
||||
}
|
||||
}
|
||||
/** coauthoring end **/
|
||||
|
|
Loading…
Reference in a new issue