[DE] revert dc6db03de9 (Fixed bug with closing menus and combo-boxes from toolbar and right panel, closing left panel and comments)

This commit is contained in:
Julia Radzhabova 2016-07-08 12:12:09 +03:00
parent dc6db03de9
commit 1ccae8d386
13 changed files with 46 additions and 56 deletions

View file

@ -232,7 +232,7 @@ define([
}, },
onBeforeShowMenu: function(e) { onBeforeShowMenu: function(e) {
Common.NotificationCenter.trigger('menu:show', this); Common.NotificationCenter.trigger('menu:show');
this.trigger('show:before', this, e); this.trigger('show:before', this, e);
if (this.options.hint) { if (this.options.hint) {
var tip = this.cmpEl.data('bs.tooltip'); var tip = this.cmpEl.data('bs.tooltip');
@ -274,7 +274,7 @@ define([
onAfterHideMenu: function(e) { onAfterHideMenu: function(e) {
this.cmpEl.find('.dropdown-toggle').blur(); this.cmpEl.find('.dropdown-toggle').blur();
this.trigger('hide:after', this, e); this.trigger('hide:after', this, e);
Common.NotificationCenter.trigger('menu:hide', this); Common.NotificationCenter.trigger('menu:hide');
}, },
onAfterKeydownMenu: function(e) { onAfterKeydownMenu: function(e) {

View file

@ -147,7 +147,7 @@ define([
}, },
template: _.template([ template: _.template([
'<ul class="dropdown-menu <%= options.cls %>" style="<%= options.style %>" role="menu"></ul>' '<ul class="dropdown-menu <%= options.cls %>" oo_editor_input="true" style="<%= options.style %>" role="menu"></ul>'
].join('')), ].join('')),
initialize : function(options) { initialize : function(options) {
@ -410,7 +410,7 @@ define([
}, },
onBeforeShowMenu: function(e) { onBeforeShowMenu: function(e) {
Common.NotificationCenter.trigger('menu:show', this); Common.NotificationCenter.trigger('menu:show');
if (this.mustLayout) { if (this.mustLayout) {
delete this.mustLayout; delete this.mustLayout;
@ -441,7 +441,7 @@ define([
onAfterHideMenu: function(e) { onAfterHideMenu: function(e) {
this.trigger('hide:after', this, e); this.trigger('hide:after', this, e);
Common.NotificationCenter.trigger('menu:hide', this); Common.NotificationCenter.trigger('menu:hide');
}, },
onAfterKeydownMenu: function(e) { onAfterKeydownMenu: function(e) {

View file

@ -1079,6 +1079,7 @@ define([
if (dialog) { if (dialog) {
if (this.popoverComments.length) { if (this.popoverComments.length) {
_.delay(function() { _.delay(function() {
me.api.asc_enableKeyEvents(false);
dialog.commentsView.setFocusToTextBox(); dialog.commentsView.setFocusToTextBox();
}, 200); }, 200);
return; return;
@ -1233,6 +1234,7 @@ define([
var panel = $('.new-comment-ct', this.view.el); var panel = $('.new-comment-ct', this.view.el);
if (panel && panel.length) { if (panel && panel.length) {
if ('none' !== panel.css('display')) { if ('none' !== panel.css('display')) {
this.api.asc_enableKeyEvents(false);
this.view.txtComment.focus(); this.view.txtComment.focus();
} }

View file

@ -155,11 +155,18 @@ define([
// Syncronize focus with api // Syncronize focus with api
$(document.body).on('focus', 'input, textarea', function(e) { $(document.body).on('focus', 'input, textarea', function(e) {
if (!/area_id/.test(e.target.id)) { if (!/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(false);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
} }
}); });
$("#editor_sdk").focus(function (e) {
if (!me.isModalShowed) {
me.api.asc_enableKeyEvents(true);
}
});
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed) { if (!me.isModalShowed) {
/* /*
@ -199,13 +206,21 @@ define([
} }
}, },
'settings:unitschanged':_.bind(this.unitsChanged, this), 'settings:unitschanged':_.bind(this.unitsChanged, this),
'dataview:blur': function(e){ 'dataview:focus': function(e){
if (!me.isModalShowed) me.api.asc_enableKeyEvents(false);
me.onEditComplete();
}, },
'menu:hide': function(menu){ 'dataview:blur': function(e){
if (!me.isModalShowed && menu.options.allowEditComplete) if (!me.isModalShowed) {
me.api.asc_enableKeyEvents(true);
me.onEditComplete(); me.onEditComplete();
}
},
'menu:show': function(e){
me.api.asc_enableKeyEvents(false);
},
'menu:hide': function(e){
if (!me.isModalShowed)
me.api.asc_enableKeyEvents(true);
}, },
'edit:complete': _.bind(me.onEditComplete, me) 'edit:complete': _.bind(me.onEditComplete, me)
}); });

View file

@ -201,6 +201,7 @@ define([
toolbar.btnNumbers.on('click', _.bind(this.onNumbers, this)); toolbar.btnNumbers.on('click', _.bind(this.onNumbers, this));
toolbar.cmbFontName.on('selected', _.bind(this.onFontNameSelect, this)); toolbar.cmbFontName.on('selected', _.bind(this.onFontNameSelect, this));
toolbar.cmbFontName.on('show:after', _.bind(this.onComboOpen, this, true)); toolbar.cmbFontName.on('show:after', _.bind(this.onComboOpen, this, true));
toolbar.cmbFontName.on('hide:after', _.bind(this.onHideMenus, this));
toolbar.cmbFontName.on('combo:blur', _.bind(this.onComboBlur, this)); toolbar.cmbFontName.on('combo:blur', _.bind(this.onComboBlur, this));
toolbar.cmbFontName.on('combo:focusin', _.bind(this.onComboOpen, this, false)); toolbar.cmbFontName.on('combo:focusin', _.bind(this.onComboOpen, this, false));
toolbar.cmbFontSize.on('selected', _.bind(this.onFontSizeSelect, this)); toolbar.cmbFontSize.on('selected', _.bind(this.onFontSizeSelect, this));
@ -209,6 +210,7 @@ define([
toolbar.cmbFontSize.on('combo:blur', _.bind(this.onComboBlur, this)); toolbar.cmbFontSize.on('combo:blur', _.bind(this.onComboBlur, this));
toolbar.cmbFontSize.on('combo:focusin', _.bind(this.onComboOpen, this, false)); toolbar.cmbFontSize.on('combo:focusin', _.bind(this.onComboOpen, this, false));
toolbar.cmbFontSize.on('show:after', _.bind(this.onComboOpen, this, true)); toolbar.cmbFontSize.on('show:after', _.bind(this.onComboOpen, this, true));
toolbar.cmbFontSize.on('hide:after', _.bind(this.onHideMenus, this));
toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers)); toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers));
toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers)); toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers));
toolbar.mnuMultilevelPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMultilevels)); toolbar.mnuMultilevelPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMultilevels));
@ -1105,6 +1107,7 @@ define([
msg: this.textFontSizeErr, msg: this.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
me.api.asc_enableKeyEvents(false);
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }
@ -2551,6 +2554,10 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color'); Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color');
}, },
onHideMenus: function(e){
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
onSetupCopyStyleButton: function () { onSetupCopyStyleButton: function () {
this.modeAlwaysSetStyle = false; this.modeAlwaysSetStyle = false;

View file

@ -110,6 +110,9 @@ define([
menu.alignPosition(); menu.alignPosition();
} }
_.delay(function() { _.delay(function() {
var value = Common.localStorage.getItem("de-settings-inputmode"); // only for hieroglyphs mode
if (value!==null && parseInt(value) == 1)
me.api.asc_enableKeyEvents(false);
menu.cmpEl.focus(); menu.cmpEl.focus();
}, 10); }, 10);
@ -1613,6 +1616,7 @@ define([
addComment: function(item, e, eOpt){ addComment: function(item, e, eOpt){
if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) {
this.suppressEditComplete = true; this.suppressEditComplete = true;
this.api.asc_enableKeyEvents(false);
var controller = DE.getController('Common.Controllers.Comments'); var controller = DE.getController('Common.Controllers.Comments');
if (controller) { if (controller) {

View file

@ -108,7 +108,6 @@ define([
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'min-width: 190px;max-width: 400px;', style: 'min-width: 190px;max-width: 400px;',
maxHeight: 200, maxHeight: 200,
allowEditComplete: true,
items: [] items: []
}).on('render:after', function(mnu) { }).on('render:after', function(mnu) {
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller({
@ -221,7 +220,6 @@ define([
menuStyle: 'min-width: 190px;', menuStyle: 'min-width: 190px;',
editable: false, editable: false,
data: this._arrMergeSrc, data: this._arrMergeSrc,
allowEditComplete: true,
lock: [_set.noRecipients, _set.lostConnect] lock: [_set.noRecipients, _set.lostConnect]
}); });
this.cmbMergeTo.setValue(this._arrMergeSrc[0].value); this.cmbMergeTo.setValue(this._arrMergeSrc[0].value);

View file

@ -100,7 +100,6 @@ define([
menuStyle: 'min-width: 85px;', menuStyle: 'min-width: 85px;',
editable: false, editable: false,
data: this._arrLineRule, data: this._arrLineRule,
allowEditComplete: true,
disabled: this._locked disabled: this._locked
}); });
this.cmbLineRule.setValue(''); this.cmbLineRule.setValue('');
@ -159,7 +158,6 @@ define([
style: "width:45px;", style: "width:45px;",
disabled: this._locked, disabled: this._locked,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -201,6 +199,7 @@ define([
this.numSpacingAfter.on('change', _.bind(this.onNumSpacingAfterChange, this)); this.numSpacingAfter.on('change', _.bind(this.onNumSpacingAfterChange, this));
this.chAddInterval.on('change', _.bind(this.onAddIntervalChange, this)); this.chAddInterval.on('change', _.bind(this.onAddIntervalChange, this));
this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this));
this.cmbLineRule.on('hide:after', _.bind(this.onHideMenus, this));
$(this.el).on('click', '#paragraph-advanced-link', _.bind(this.openAdvancedSettings, this)); $(this.el).on('click', '#paragraph-advanced-link', _.bind(this.openAdvancedSettings, this));
$(this.el).on('click', '#paragraph-color-new', _.bind(this.addNewColor, this)); $(this.el).on('click', '#paragraph-color-new', _.bind(this.addNewColor, this));
this.TextOnlySettings = $('.text-only'); this.TextOnlySettings = $('.text-only');
@ -479,6 +478,10 @@ define([
this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
}, },
onHideMenus: function(e){
this.fireEvent('editcomplete', this);
},
setLocked: function (locked) { setLocked: function (locked) {
this._locked = locked; this._locked = locked;
}, },

View file

@ -141,7 +141,6 @@ define([
style: 'width: 100%;', style: 'width: 100%;',
menuStyle: 'min-width: 190px;', menuStyle: 'min-width: 190px;',
editable: false, editable: false,
allowEditComplete: true,
data: this._arrFillSrc data: this._arrFillSrc
}); });
this.cmbFillSrc.setValue(this._arrFillSrc[0].value); this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
@ -151,7 +150,6 @@ define([
this.btnBackColor = new Common.UI.ColorButton({ this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -219,7 +217,6 @@ define([
this.btnFGColor = new Common.UI.ColorButton({ this.btnFGColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -261,7 +258,6 @@ define([
this.btnBGColor = new Common.UI.ColorButton({ this.btnBGColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -326,7 +322,6 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 90px;', menuStyle: 'min-width: 90px;',
editable: false, editable: false,
allowEditComplete: true,
data: this._arrFillType data: this._arrFillType
}); });
this.cmbFillType.setValue(this._arrFillType[0].value); this.cmbFillType.setValue(this._arrFillType[0].value);
@ -387,7 +382,6 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 90px;', menuStyle: 'min-width: 90px;',
editable: false, editable: false,
allowEditComplete: true,
data: this._arrGradType data: this._arrGradType
}); });
this.cmbGradType.setValue(this._arrGradType[0].value); this.cmbGradType.setValue(this._arrGradType[0].value);
@ -437,7 +431,6 @@ define([
this.btnGradColor = new Common.UI.ColorButton({ this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -498,7 +491,6 @@ define([
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({ this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#shape-combo-border-size'), el: $('#shape-combo-border-size'),
style: "width: 93px;", style: "width: 93px;",
allowEditComplete: true,
txtNoBorders: this.txtNoBorders txtNoBorders: this.txtNoBorders
}) })
.on('selected', _.bind(this.onBorderSizeSelect, this)) .on('selected', _.bind(this.onBorderSizeSelect, this))
@ -512,7 +504,6 @@ define([
this.btnBorderColor = new Common.UI.ColorButton({ this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -554,7 +545,6 @@ define([
this.cmbBorderType = new Common.UI.ComboBorderType({ this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#shape-combo-border-type'), el: $('#shape-combo-border-type'),
style: "width: 93px;", style: "width: 93px;",
allowEditComplete: true,
menuStyle: 'min-width: 93px;' menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this)) }).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false)); .on('combo:blur', _.bind(this.onComboBlur, this, false));
@ -599,7 +589,6 @@ define([
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
menuAlign: 'tr-br', menuAlign: 'tr-br',
cls: 'menu-shapes', cls: 'menu-shapes',
allowEditComplete: true,
items: [] items: []
}) })
}); });

View file

@ -208,6 +208,7 @@ define([
this.btnLanguage.cmpEl.on({ this.btnLanguage.cmpEl.on({
'show.bs.dropdown': function () { 'show.bs.dropdown': function () {
_.defer(function(){ _.defer(function(){
me.api.asc_enableKeyEvents(false);
me.btnLanguage.cmpEl.find('ul').focus(); me.btnLanguage.cmpEl.find('ul').focus();
}, 100); }, 100);
}, },
@ -233,6 +234,7 @@ define([
}); });
this.cntZoom.cmpEl.on('show.bs.dropdown', function () { this.cntZoom.cmpEl.on('show.bs.dropdown', function () {
_.defer(function(){ _.defer(function(){
me.api.asc_enableKeyEvents(false);
me.cntZoom.cmpEl.find('ul').focus(); me.cntZoom.cmpEl.find('ul').focus();
}, 100); }, 100);
} }
@ -349,6 +351,7 @@ define([
if (me.api && box) { if (me.api && box) {
box.focus(); // for IE box.focus(); // for IE
box.parent().removeClass('open'); box.parent().removeClass('open');
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
} }
} }

View file

@ -216,7 +216,6 @@ define([
this.cmbBorderSize = new Common.UI.ComboBorderSize({ this.cmbBorderSize = new Common.UI.ComboBorderSize({
el: $('#table-combo-border-size'), el: $('#table-combo-border-size'),
allowEditComplete: true,
style: "width: 93px;" style: "width: 93px;"
}); });
this.BorderSize = this.cmbBorderSize.store.at(1).get('value'); this.BorderSize = this.cmbBorderSize.store.at(1).get('value');
@ -227,7 +226,6 @@ define([
this.btnBorderColor = new Common.UI.ColorButton({ this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -268,7 +266,6 @@ define([
this.btnBackColor = new Common.UI.ColorButton({ this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -309,7 +306,6 @@ define([
cls: 'btn-icon-default', cls: 'btn-icon-default',
iconCls: 'btn-edit-table', iconCls: 'btn-edit-table',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
menuAlign: 'tr-br', menuAlign: 'tr-br',
items: [ items: [
{ caption: this.selectRowText, value: 0 }, { caption: this.selectRowText, value: 0 },

View file

@ -139,7 +139,6 @@ define([
style: 'width: 100%;', style: 'width: 100%;',
menuStyle: 'min-width: 190px;', menuStyle: 'min-width: 190px;',
editable: false, editable: false,
allowEditComplete: true,
data: this._arrFillSrc data: this._arrFillSrc
}); });
this.cmbFillSrc.setValue(this._arrFillSrc[0].value); this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
@ -149,7 +148,6 @@ define([
this.btnBackColor = new Common.UI.ColorButton({ this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -224,7 +222,6 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 90px;', menuStyle: 'min-width: 90px;',
editable: false, editable: false,
allowEditComplete: true,
data: this._arrGradType data: this._arrGradType
}); });
this.cmbGradType.setValue(this._arrGradType[0].value); this.cmbGradType.setValue(this._arrGradType[0].value);
@ -273,7 +270,6 @@ define([
this.btnGradColor = new Common.UI.ColorButton({ this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -334,7 +330,6 @@ define([
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({ this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#textart-combo-border-size'), el: $('#textart-combo-border-size'),
style: "width: 93px;", style: "width: 93px;",
allowEditComplete: true,
txtNoBorders: this.txtNoBorders txtNoBorders: this.txtNoBorders
}) })
.on('selected', _.bind(this.onBorderSizeSelect, this)) .on('selected', _.bind(this.onBorderSizeSelect, this))
@ -348,7 +343,6 @@ define([
this.btnBorderColor = new Common.UI.ColorButton({ this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') } { template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
@ -390,7 +384,6 @@ define([
this.cmbBorderType = new Common.UI.ComboBorderType({ this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#textart-combo-border-type'), el: $('#textart-combo-border-type'),
style: "width: 93px;", style: "width: 93px;",
allowEditComplete: true,
menuStyle: 'min-width: 93px;' menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this)) }).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false)); .on('combo:blur', _.bind(this.onComboBlur, this, false));

View file

@ -244,7 +244,6 @@ define([
split : true, split : true,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'min-width: 100px;', style: 'min-width: 100px;',
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="id-toolbar-menu-highlight" style="width: 120px; height: 120px; margin: 10px;"></div>') }, { template: _.template('<div id="id-toolbar-menu-highlight" style="width: 120px; height: 120px; margin: 10px;"></div>') },
{ caption: '--' }, { caption: '--' },
@ -265,7 +264,6 @@ define([
hint : this.tipFontColor, hint : this.tipFontColor,
split : true, split : true,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ {
id : 'id-toolbar-menu-auto-fontcolor', id : 'id-toolbar-menu-auto-fontcolor',
@ -287,7 +285,6 @@ define([
hint : this.tipPrColor, hint : this.tipPrColor,
split : true, split : true,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 165px; height: 220px; margin: 10px;"></div>') }, { template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + this.textNewColor + '</a>') } { template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
@ -349,7 +346,6 @@ define([
icls : 'btn-align-left', icls : 'btn-align-left',
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
allowEditComplete: true,
items: [ items: [
{ {
caption: this.tipAlignLeft + Common.Utils.String.platformKey('Ctrl+L'), caption: this.tipAlignLeft + Common.Utils.String.platformKey('Ctrl+L'),
@ -412,7 +408,6 @@ define([
hint : this.tipLineSpace, hint : this.tipLineSpace,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'min-width: 60px;', style: 'min-width: 60px;',
allowEditComplete: true,
items: [ items: [
{ caption: '1.0', value: 1.0, checkable: true, toggleGroup: 'linesize' }, { caption: '1.0', value: 1.0, checkable: true, toggleGroup: 'linesize' },
{ caption: '1.15', value: 1.15, checkable: true, toggleGroup: 'linesize' }, { caption: '1.15', value: 1.15, checkable: true, toggleGroup: 'linesize' },
@ -434,7 +429,6 @@ define([
split : true, split : true,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
style: 'min-width: 60px;', style: 'min-width: 60px;',
allowEditComplete: true,
items: [ items: [
{ caption: this.mniHiddenChars, value: 'characters', checkable: true }, { caption: this.mniHiddenChars, value: 'characters', checkable: true },
{ caption: this.mniHiddenBorders, value: 'table', checkable: true } { caption: this.mniHiddenBorders, value: 'table', checkable: true }
@ -497,7 +491,6 @@ define([
iconCls : 'btn-inserttable', iconCls : 'btn-inserttable',
hint : this.tipInsertTable, hint : this.tipInsertTable,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>') }, { template: _.template('<div id="id-toolbar-menu-tablepicker" class="dimension-picker" style="margin: 5px 10px;"></div>') },
{ caption: this.mniCustomTable, value: 'custom' } { caption: this.mniCustomTable, value: 'custom' }
@ -512,7 +505,6 @@ define([
iconCls : 'btn-insertimage', iconCls : 'btn-insertimage',
hint : this.tipInsertImage, hint : this.tipInsertImage,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ caption: this.mniImageFromFile, value: 'file' }, { caption: this.mniImageFromFile, value: 'file' },
{ caption: this.mniImageFromUrl, value: 'url' } { caption: this.mniImageFromUrl, value: 'url' }
@ -568,7 +560,6 @@ define([
hint : this.tipPageBreak, hint : this.tipPageBreak,
split : true, split : true,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items : [ items : [
{caption: this.textInsPageBreak}, {caption: this.textInsPageBreak},
{caption: this.textInsColumnBreak, value: 'column'}, {caption: this.textInsColumnBreak, value: 'column'},
@ -604,7 +595,6 @@ define([
iconCls : 'btn-editheader', iconCls : 'btn-editheader',
hint : this.tipEditHeader, hint : this.tipEditHeader,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ caption: this.mniEditHeader, value: 'header' }, { caption: this.mniEditHeader, value: 'header' },
{ caption: this.mniEditFooter, value: 'footer' }, { caption: this.mniEditFooter, value: 'footer' },
@ -655,7 +645,6 @@ define([
hint : this.tipDropCap, hint : this.tipDropCap,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
allowEditComplete: true,
items: [ items: [
{ caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.None, checked: true }, { caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.None, checked: true },
{ caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Drop }, { caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Drop },
@ -674,7 +663,6 @@ define([
hint : this.tipColumns, hint : this.tipColumns,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
allowEditComplete: true,
items: [ items: [
{ caption: this.textColumnsOne, iconCls: 'mnu-columns-one', checkable: true, toggleGroup: 'menuColumns', value: 0 }, { caption: this.textColumnsOne, iconCls: 'mnu-columns-one', checkable: true, toggleGroup: 'menuColumns', value: 0 },
{ caption: this.textColumnsTwo, iconCls: 'mnu-columns-two', checkable: true, toggleGroup: 'menuColumns', value: 1 }, { caption: this.textColumnsTwo, iconCls: 'mnu-columns-two', checkable: true, toggleGroup: 'menuColumns', value: 1 },
@ -693,7 +681,6 @@ define([
hint : this.tipPageOrient, hint : this.tipPageOrient,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
allowEditComplete: true,
items: [ items: [
{ caption: this.textPortrait, iconCls: 'mnu-orient-portrait', checkable: true, toggleGroup: 'menuOrient', value: true }, { caption: this.textPortrait, iconCls: 'mnu-orient-portrait', checkable: true, toggleGroup: 'menuOrient', value: true },
{ caption: this.textLandscape, iconCls: 'mnu-orient-landscape', checkable: true, toggleGroup: 'menuOrient', value: false } { caption: this.textLandscape, iconCls: 'mnu-orient-landscape', checkable: true, toggleGroup: 'menuOrient', value: false }
@ -717,7 +704,6 @@ define([
iconCls : 'btn-pagemargins', iconCls : 'btn-pagemargins',
hint : this.tipPageMargins, hint : this.tipPageMargins,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ caption: this.textMarginsLast, checkable: true, template: pageMarginsTemplate, toggleGroup: 'menuPageMargins'}, //top,left,bottom,right { caption: this.textMarginsLast, checkable: true, template: pageMarginsTemplate, toggleGroup: 'menuPageMargins'}, //top,left,bottom,right
{ caption: this.textMarginsNormal, checkable: true, template: pageMarginsTemplate, toggleGroup: 'menuPageMargins', value: [20, 30, 20, 15] }, { caption: this.textMarginsNormal, checkable: true, template: pageMarginsTemplate, toggleGroup: 'menuPageMargins', value: [20, 30, 20, 15] },
@ -742,7 +728,6 @@ define([
iconCls : 'btn-pagesize', iconCls : 'btn-pagesize',
hint : this.tipPageSize, hint : this.tipPageSize,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [ items: [
{ caption: 'US Letter', subtitle: '21,59cm x 27,94cm', template: pageSizeTemplate, checkable: true, toggleGroup: 'menuPageSize', value: [215.9, 279.4] }, { caption: 'US Letter', subtitle: '21,59cm x 27,94cm', template: pageSizeTemplate, checkable: true, toggleGroup: 'menuPageSize', value: [215.9, 279.4] },
{ caption: 'US Legal', subtitle: '21,59cm x 35,56cm', template: pageSizeTemplate, checkable: true, toggleGroup: 'menuPageSize', value: [215.9, 355.6] }, { caption: 'US Legal', subtitle: '21,59cm x 35,56cm', template: pageSizeTemplate, checkable: true, toggleGroup: 'menuPageSize', value: [215.9, 355.6] },
@ -787,7 +772,6 @@ define([
iconCls : 'btn-colorschemas', iconCls : 'btn-colorschemas',
hint : this.tipColorSchemas, hint : this.tipColorSchemas,
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
allowEditComplete: true,
items: [], items: [],
maxHeight : 600, maxHeight : 600,
restoreHeight: 600 restoreHeight: 600
@ -834,7 +818,6 @@ define([
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'pull-right', cls: 'pull-right',
style: 'min-width: 180px;', style: 'min-width: 180px;',
allowEditComplete: true,
items: [ items: [
this.mnuitemCompactToolbar = new Common.UI.MenuItem({ this.mnuitemCompactToolbar = new Common.UI.MenuItem({
caption : this.textCompactView, caption : this.textCompactView,
@ -1121,7 +1104,6 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 55px;', menuStyle: 'min-width: 55px;',
hint: this.tipFontSize, hint: this.tipFontSize,
allowEditComplete: true,
data: [ data: [
{ value: 8, displayValue: "8" }, { value: 8, displayValue: "8" },
{ value: 9, displayValue: "9" }, { value: 9, displayValue: "9" },
@ -1148,7 +1130,6 @@ define([
menuCls: 'scrollable-menu', menuCls: 'scrollable-menu',
menuStyle: 'min-width: 325px;', menuStyle: 'min-width: 325px;',
hint: this.tipFontName, hint: this.tipFontName,
allowEditComplete: true,
store: new Common.Collections.Fonts() store: new Common.Collections.Fonts()
}); });
this.paragraphControls.push(this.cmbFontName); this.paragraphControls.push(this.cmbFontName);
@ -1567,7 +1548,6 @@ define([
if (this.mnuColorSchema == null) { if (this.mnuColorSchema == null) {
this.mnuColorSchema = new Common.UI.Menu({ this.mnuColorSchema = new Common.UI.Menu({
allowEditComplete: true,
maxHeight : 600, maxHeight : 600,
restoreHeight: 600 restoreHeight: 600
}).on('render:after', function(mnu) { }).on('render:after', function(mnu) {