[DE] Support focus in paragraph settings (preset and color buttons, border combobox)
This commit is contained in:
parent
a520792c55
commit
1ca9c3d6a1
|
@ -122,6 +122,7 @@ define([
|
||||||
|
|
||||||
render : function(parentEl) {
|
render : function(parentEl) {
|
||||||
Common.UI.ComboBox.prototype.render.call(this, parentEl);
|
Common.UI.ComboBox.prototype.render.call(this, parentEl);
|
||||||
|
this._formControl = this.cmpEl.find('.form-control');
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -172,6 +173,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
focus: function() {
|
||||||
|
this._formControl && this._formControl.focus();
|
||||||
|
},
|
||||||
|
|
||||||
txtNoBorders: 'No Borders'
|
txtNoBorders: 'No Borders'
|
||||||
}, Common.UI.ComboBorderSize || {}));
|
}, Common.UI.ComboBorderSize || {}));
|
||||||
|
|
||||||
|
|
|
@ -748,6 +748,11 @@
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 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 {
|
.btn-text-default {
|
||||||
|
|
|
@ -366,7 +366,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
|
|
||||||
this.cmbBorderSize = new Common.UI.ComboBorderSize({
|
this.cmbBorderSize = new Common.UI.ComboBorderSize({
|
||||||
el: $('#paragraphadv-combo-border-size'),
|
el: $('#paragraphadv-combo-border-size'),
|
||||||
style: "width: 93px;"
|
style: "width: 93px;",
|
||||||
|
takeFocusOnClose: true
|
||||||
});
|
});
|
||||||
var rec = this.cmbBorderSize.store.at(2);
|
var rec = this.cmbBorderSize.store.at(2);
|
||||||
this.BorderSize = {ptValue: rec.get('value'), pxValue: rec.get('pxValue')};
|
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'),
|
parentEl: $('#paragraphadv-border-color-btn'),
|
||||||
additionalAlign: this.menuAddAlign,
|
additionalAlign: this.menuAddAlign,
|
||||||
color: 'auto',
|
color: 'auto',
|
||||||
auto: true
|
auto: true,
|
||||||
|
takeFocusOnClose: true
|
||||||
});
|
});
|
||||||
this.colorsBorder = this.btnBorderColor.getPicker();
|
this.colorsBorder = this.btnBorderColor.getPicker();
|
||||||
this.btnBorderColor.on('color:select', _.bind(this.onColorsBorderSelect, this));
|
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({
|
this.btnBackColor = new Common.UI.ColorButton({
|
||||||
parentEl: $('#paragraphadv-back-color-btn'),
|
parentEl: $('#paragraphadv-back-color-btn'),
|
||||||
transparent: true,
|
transparent: true,
|
||||||
additionalAlign: this.menuAddAlign
|
additionalAlign: this.menuAddAlign,
|
||||||
|
takeFocusOnClose: true
|
||||||
});
|
});
|
||||||
this.colorsBack = this.btnBackColor.getPicker();
|
this.colorsBack = this.btnBackColor.getPicker();
|
||||||
this.btnBackColor.on('color:select', _.bind(this.onColorsBackSelect, this));
|
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.cmbTextAlignment, this.cmbOutlinelevel, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy,
|
||||||
this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, this.chAddInterval, // 0 tab
|
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.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.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.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
|
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 5 tab
|
||||||
];
|
].concat(this._btnsBorderPosition);
|
||||||
},
|
},
|
||||||
|
|
||||||
onCategoryClick: function(btn, index, cmp, e) {
|
onCategoryClick: function(btn, index, cmp, e) {
|
||||||
|
@ -700,6 +704,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
case 1:
|
case 1:
|
||||||
me.chBreakBefore.focus();
|
me.chBreakBefore.focus();
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
me.cmbBorderSize.focus();
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
me.chStrike.focus();
|
me.chStrike.focus();
|
||||||
if (e && (e instanceof jQuery.Event))
|
if (e && (e instanceof jQuery.Event))
|
||||||
|
|
Loading…
Reference in a new issue