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