diff --git a/apps/common/main/lib/component/ComboBorderSize.js b/apps/common/main/lib/component/ComboBorderSize.js index 2cf1efa2e..d03c4c1b4 100644 --- a/apps/common/main/lib/component/ComboBorderSize.js +++ b/apps/common/main/lib/component/ComboBorderSize.js @@ -122,6 +122,7 @@ define([ render : function(parentEl) { Common.UI.ComboBox.prototype.render.call(this, parentEl); + this._formControl = this.cmpEl.find('.form-control'); return this; }, @@ -172,6 +173,10 @@ define([ } }, + focus: function() { + this._formControl && this._formControl.focus(); + }, + txtNoBorders: 'No Borders' }, Common.UI.ComboBorderSize || {})); diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 166906b5c..e007314cd 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -748,6 +748,11 @@ width: 28px; height: 28px; } + + &:focus:not(.disabled) { + box-shadow: inset 0 0 0 @scaled-one-px-value-ie @border-control-focus-ie; + box-shadow: inset 0 0 0 @scaled-one-px-value @border-control-focus; + } } .btn-text-default { diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 0ec4e69c2..f5c1c0a57 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -366,7 +366,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbBorderSize = new Common.UI.ComboBorderSize({ el: $('#paragraphadv-combo-border-size'), - style: "width: 93px;" + style: "width: 93px;", + takeFocusOnClose: true }); var rec = this.cmbBorderSize.store.at(2); this.BorderSize = {ptValue: rec.get('value'), pxValue: rec.get('pxValue')}; @@ -377,7 +378,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem parentEl: $('#paragraphadv-border-color-btn'), additionalAlign: this.menuAddAlign, color: 'auto', - auto: true + auto: true, + takeFocusOnClose: true }); this.colorsBorder = this.btnBorderColor.getPicker(); this.btnBorderColor.on('color:select', _.bind(this.onColorsBorderSelect, this)); @@ -420,7 +422,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.btnBackColor = new Common.UI.ColorButton({ parentEl: $('#paragraphadv-back-color-btn'), transparent: true, - additionalAlign: this.menuAddAlign + additionalAlign: this.menuAddAlign, + takeFocusOnClose: true }); this.colorsBack = this.btnBackColor.getPicker(); this.btnBackColor.on('color:select', _.bind(this.onColorsBackSelect, this)); @@ -682,10 +685,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbTextAlignment, this.cmbOutlinelevel, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy, this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, this.chAddInterval, // 0 tab this.chBreakBefore, this.chKeepLines, this.chOrphan, this.chKeepNext, this.chLineNumbers, // 1 tab + this.cmbBorderSize, this.btnBorderColor, this.btnBackColor, // 2 tab this.chStrike, this.chSubscript, this.chDoubleStrike, this.chSmallCaps, this.chSuperscript, this.chAllCaps, this.numSpacing, this.numPosition, // 3 tab this.numDefaultTab, this.numTab, this.cmbAlign, this.cmbLeader, this.tabList, this.btnAddTab, this.btnRemoveTab, this.btnRemoveAll,// 4 tab this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 5 tab - ]; + ].concat(this._btnsBorderPosition); }, onCategoryClick: function(btn, index, cmp, e) { @@ -700,6 +704,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem case 1: me.chBreakBefore.focus(); break; + case 2: + me.cmbBorderSize.focus(); + break; case 3: me.chStrike.focus(); if (e && (e instanceof jQuery.Event))