[SSE] Add spellcheck to the left menu
This commit is contained in:
parent
66ba422e05
commit
640ceb6e09
|
@ -152,6 +152,7 @@ require([
|
|||
'Print',
|
||||
'Toolbar',
|
||||
'Statusbar',
|
||||
'Spellcheck',
|
||||
'RightMenu',
|
||||
'LeftMenu',
|
||||
'Main',
|
||||
|
@ -174,6 +175,7 @@ require([
|
|||
'spreadsheeteditor/main/app/controller/CellEditor',
|
||||
'spreadsheeteditor/main/app/controller/Toolbar',
|
||||
'spreadsheeteditor/main/app/controller/Statusbar',
|
||||
'spreadsheeteditor/main/app/controller/Spellcheck',
|
||||
'spreadsheeteditor/main/app/controller/RightMenu',
|
||||
'spreadsheeteditor/main/app/controller/LeftMenu',
|
||||
'spreadsheeteditor/main/app/controller/Main',
|
||||
|
|
|
@ -202,6 +202,9 @@ define([
|
|||
this.leftMenu.btnChat.hide();
|
||||
this.leftMenu.btnComments.hide();
|
||||
}
|
||||
|
||||
this.leftMenu.setOptionsPanel('spellcheck', this.getApplication().getController('Spellcheck').getView('Spellcheck'));
|
||||
|
||||
this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode);
|
||||
/** coauthoring end **/
|
||||
Common.util.Shortcuts.resumeEvents();
|
||||
|
@ -646,6 +649,7 @@ define([
|
|||
this.leftMenu.btnChat.setDisabled(true);
|
||||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(true);
|
||||
this.leftMenu.btnSpellcheck.setDisabled(true);
|
||||
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true, enableDownload: !!enableDownload});
|
||||
if ( this.dlgSearch ) {
|
||||
|
@ -844,6 +848,7 @@ define([
|
|||
|
||||
this.leftMenu.btnAbout.setDisabled(isRangeSelection);
|
||||
this.leftMenu.btnSearch.setDisabled(isRangeSelection);
|
||||
this.leftMenu.btnSpellcheck.setDisabled(isRangeSelection);
|
||||
if (this.mode.canPlugins && this.leftMenu.panelPlugins) {
|
||||
this.leftMenu.panelPlugins.setLocked(isRangeSelection);
|
||||
this.leftMenu.panelPlugins.disableControls(isRangeSelection);
|
||||
|
@ -855,6 +860,7 @@ define([
|
|||
|
||||
this.leftMenu.btnAbout.setDisabled(isEditFormula);
|
||||
this.leftMenu.btnSearch.setDisabled(isEditFormula);
|
||||
this.leftMenu.btnSpellcheck.setDisabled(isEditFormula);
|
||||
if (this.mode.canPlugins && this.leftMenu.panelPlugins) {
|
||||
this.leftMenu.panelPlugins.setLocked(isEditFormula);
|
||||
this.leftMenu.panelPlugins.disableControls(isEditFormula);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><i class="icon img-toolbarmenu btn-menu-chat"> </i></button>
|
||||
<!-- /** coauthoring end **/ -->
|
||||
<button id="left-btn-plugins" class="btn btn-category" content-target=""><i class="icon img-toolbarmenu btn-menu-plugin"> </i></button>
|
||||
<button id="left-btn-spellcheck" class="btn btn-category" content-target=""><i class="icon img-toolbarmenu btn-menu-spellcheck"> </i></button>
|
||||
<button id="left-btn-support" class="btn btn-category" content-target=""><i class="icon img-toolbarmenu btn-menu-support"> </i></button>
|
||||
<button id="left-btn-about" class="btn btn-category" content-target=""><i class="icon img-toolbarmenu btn-menu-about"> </i></button>
|
||||
</div>
|
||||
|
@ -13,6 +14,7 @@
|
|||
<!-- /** coauthoring begin **/ -->
|
||||
<div id="left-panel-comments" class="" style="display: none;" />
|
||||
<div id="left-panel-chat" class="" style="display: none;" />
|
||||
<div id="left-panel-spellcheck" class="" style="display: none; height: 100%;" />
|
||||
<!-- /** coauthoring end **/ -->
|
||||
<div id="left-panel-plugins" class="" style="display: none; height: 100%; position: relative;" />
|
||||
</div>
|
||||
|
|
|
@ -63,6 +63,7 @@ define([
|
|||
'click #left-btn-chat': _.bind(this.onCoauthOptions, this),
|
||||
/** coauthoring end **/
|
||||
'click #left-btn-plugins': _.bind(this.onCoauthOptions, this),
|
||||
'click #left-btn-spellcheck': _.bind(this.onCoauthOptions, this),
|
||||
'click #left-btn-support': function() {
|
||||
var config = this.mode.customization;
|
||||
config && !!config.feedback && !!config.feedback.url ?
|
||||
|
@ -141,6 +142,15 @@ define([
|
|||
this.btnPlugins.hide();
|
||||
this.btnPlugins.on('click', _.bind(this.onBtnMenuClick, this));
|
||||
|
||||
this.btnSpellcheck = new Common.UI.Button({
|
||||
el: $('#left-btn-spellcheck'),
|
||||
hint: this.tipSpellcheck,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
});
|
||||
this.btnSpellcheck.on('click', _.bind(this.onBtnMenuClick, this));
|
||||
|
||||
this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this));
|
||||
this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this));
|
||||
|
||||
|
@ -210,6 +220,12 @@ define([
|
|||
this.panelChat['hide']();
|
||||
}
|
||||
}
|
||||
if (this.panelSpellcheck) {
|
||||
if (this.btnSpellcheck.pressed) {
|
||||
this.panelSpellcheck.show();
|
||||
} else
|
||||
this.panelSpellcheck['hide']();
|
||||
}
|
||||
// if (this.mode.canPlugins && this.panelPlugins) {
|
||||
// if (this.btnPlugins.pressed) {
|
||||
// this.panelPlugins.show();
|
||||
|
@ -226,6 +242,9 @@ define([
|
|||
} else
|
||||
if (name == 'plugins' && !this.panelPlugins) {
|
||||
this.panelPlugins = panel.render('#left-panel-plugins');
|
||||
} else
|
||||
if (name == 'spellcheck' && !this.panelSpellcheck) {
|
||||
this.panelSpellcheck = panel.render('#left-panel-spellcheck');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -263,6 +282,10 @@ define([
|
|||
this.panelPlugins['hide']();
|
||||
this.btnPlugins.toggle(false, true);
|
||||
}
|
||||
if (this.panelSpellcheck) {
|
||||
this.panelSpellcheck['hide']();
|
||||
this.btnSpellcheck.toggle(false, true);
|
||||
}
|
||||
},
|
||||
|
||||
isOpened: function() {
|
||||
|
@ -282,6 +305,7 @@ define([
|
|||
this.btnChat.setDisabled(false);
|
||||
/** coauthoring end **/
|
||||
this.btnPlugins.setDisabled(false);
|
||||
this.btnSpellcheck.setDisabled(false);
|
||||
},
|
||||
|
||||
showMenu: function(menu) {
|
||||
|
@ -356,6 +380,7 @@ define([
|
|||
tipSearch : 'Search',
|
||||
tipPlugins : 'Plugins',
|
||||
txtDeveloper: 'DEVELOPER MODE',
|
||||
txtTrial: 'TRIAL MODE'
|
||||
txtTrial: 'TRIAL MODE',
|
||||
tipSpellcheck: 'Spell Checking'
|
||||
}, SSE.Views.LeftMenu || {}));
|
||||
});
|
||||
|
|
|
@ -142,6 +142,7 @@ require([
|
|||
'Print',
|
||||
'Toolbar',
|
||||
'Statusbar',
|
||||
'Spellcheck',
|
||||
'RightMenu',
|
||||
'LeftMenu',
|
||||
'Main',
|
||||
|
@ -164,6 +165,7 @@ require([
|
|||
'spreadsheeteditor/main/app/controller/CellEditor',
|
||||
'spreadsheeteditor/main/app/controller/Toolbar',
|
||||
'spreadsheeteditor/main/app/controller/Statusbar',
|
||||
'spreadsheeteditor/main/app/controller/Spellcheck',
|
||||
'spreadsheeteditor/main/app/controller/RightMenu',
|
||||
'spreadsheeteditor/main/app/controller/LeftMenu',
|
||||
'spreadsheeteditor/main/app/controller/Main',
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
.toolbar-btn-icon(btn-menu-about, 58, @toolbar-icon-size);
|
||||
.toolbar-btn-icon(btn-menu-support, 75, @toolbar-icon-size);
|
||||
.toolbar-btn-icon(btn-menu-plugin, 81, @toolbar-icon-size);
|
||||
.toolbar-btn-icon(btn-menu-spellcheck, 81, @toolbar-icon-size);
|
||||
|
||||
button.notify .btn-menu-chat,
|
||||
button.notify.over > .btn-menu-chat {background-position: -0*@toolbar-icon-size -60*@toolbar-icon-size;}
|
||||
|
|
Loading…
Reference in a new issue