[DE] Add focus for checkbox

This commit is contained in:
Julia Radzhabova 2021-04-13 16:51:24 +03:00
parent a6f7d17261
commit 9509869377
15 changed files with 56 additions and 25 deletions

View file

@ -337,6 +337,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.btnsCategory[0].on('click', _.bind(this.onMathCategoryClick, this, false)); this.btnsCategory[0].on('click', _.bind(this.onMathCategoryClick, this, false));
this.btnsCategory[1].on('click', _.bind(this.onRecCategoryClick, this, false)); this.btnsCategory[1].on('click', _.bind(this.onRecCategoryClick, this, false));
this.btnsCategory[2].on('click', _.bind(this.onAutoformatCategoryClick, this, false));
this.afterRender(); this.afterRender();
}, },
@ -351,10 +352,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [ var arr = [
this.inputReplace, this.inputBy, {cmp: this.mathList, selector: '.listview'}, // 0 tab this.chReplaceType, this.inputReplace, this.inputBy, this.mathList, // 0 tab
this.inputRecFind, {cmp: this.mathRecList, selector: '.listview'} // 1 tab this.inputRecFind, this.mathRecList // 1 tab
]; ];
arr = arr.concat(this.chNewRows ? [this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
return arr;
}, },
getSettings: function() { getSettings: function() {
@ -395,6 +398,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
var value = this.getActiveCategory(); var value = this.getActiveCategory();
if (value==0) this.onMathCategoryClick(true); if (value==0) this.onMathCategoryClick(true);
else if (value==1) this.onRecCategoryClick(true); else if (value==1) this.onRecCategoryClick(true);
else if (value==2) this.onAutoformatCategoryClick(true);
}, },
close: function() { close: function() {
@ -417,6 +421,13 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
} }
}, },
onAutoformatCategoryClick: function(delay) {
var me = this;
_.delay(function(){
me.chNewRows ? me.chNewRows.focus() : me.chQuotes.focus();
},delay ? 50 : 0);
},
onDelete: function() { onDelete: function() {
var rec = this.mathList.getSelectedRec(); var rec = this.mathList.getSelectedRec();
if (rec) { if (rec) {

View file

@ -143,7 +143,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions]; return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions, this.chDate];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {

View file

@ -71,7 +71,7 @@
} }
} }
&:focus { &:focus:not(.disabled) {
input[type=checkbox] { input[type=checkbox] {
+ label { + label {
border-color: @border-control-focus-ie; border-color: @border-control-focus-ie;

View file

@ -249,7 +249,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.txtName, {cmp: this.bookmarksList, selector: '.listview'}]; return [this.txtName, this.bookmarksList, this.chHidden];
}, },
afterRender: function() { afterRender: function() {

View file

@ -353,7 +353,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.txtCaption, this.cmbPosition, this.cmbLabel, this.cmbNumbering, this.cmbChapter, this.cmbSeparator]; return [this.txtCaption, this.cmbPosition, this.cmbLabel, this.chExclude, this.cmbNumbering, this.chChapter, this.cmbChapter, this.cmbSeparator];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {

View file

@ -358,8 +358,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
getFocusedComponents: function() { getFocusedComponents: function() {
return [ return [
this.txtName, this.txtTag, this.txtPlaceholder, this.cmbShow, // 0 tab this.txtName, this.txtTag, this.txtPlaceholder, this.cmbShow, // 0 tab
{cmp: this.list, selector: '.listview'}, // 2 tab this.chLockDelete , this.chLockEdit, // 1 tab
this.txtDate, {cmp: this.listFormats, selector: '.listview'}, this.cmbLang // 3 tab this.list, // 2 tab
this.txtDate, this.listFormats, this.cmbLang // 3 tab
]; ];
}, },
@ -370,6 +371,8 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
setTimeout(function(){ setTimeout(function(){
if (index==0) { if (index==0) {
me.txtName.focus(); me.txtName.focus();
} else if (index==1) {
me.chLockDelete.focus();
} else if (index==2) { } else if (index==2) {
me.list.focus(); me.list.focus();
} else if (index==3) } else if (index==3)

View file

@ -131,7 +131,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.spnColumns, this.spnSpacing]; return [this.spnColumns, this.spnSpacing, this.chSeparator];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {

View file

@ -176,7 +176,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.cmbLang, {cmp: this.listFormats, selector: '.listview'}]; return [this.cmbLang, this.listFormats, this.chUpdate];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {

View file

@ -718,7 +718,7 @@ define([
getFocusedComponents: function() { getFocusedComponents: function() {
return [ return [
this.cmbWidth, this.spnWidth, this.cmbHeight, this.spnHeight, this.cmbHAlign, this.cmbHRelative, this.spnX, this.cmbVAlign, this.cmbVRelative, this.spnY, // 0 tab this.cmbWidth, this.spnWidth, this.cmbHeight, this.spnHeight, this.cmbHAlign, this.cmbHRelative, this.spnX, this.cmbVAlign, this.cmbVRelative, this.spnY, this.chMove, // 0 tab
this.cmbFonts, this.spnRowHeight, this.numDistance, // 1 tab this.cmbFonts, this.spnRowHeight, this.numDistance, // 1 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 3 tab this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight // 3 tab
]; ];

View file

@ -1155,13 +1155,13 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
getFocusedComponents: function() { getFocusedComponents: function() {
return [ return [
this.spnWidth, this.spnHeight, // 0 tab this.spnWidth, this.spnHeight, // 0 tab
this.spnShapeWidth , this.spnShapeWidthPc, this.cmbWidthPc, this.spnShapeHeight, this.spnShapeHeightPc, this.cmbHeightPc, // 1 tab this.spnShapeWidth , this.spnShapeWidthPc, this.cmbWidthPc, this.spnShapeHeight, this.spnShapeHeightPc, this.cmbHeightPc, this.chRatio, // 1 tab
this.spnAngle, // 2 tab this.spnAngle, this.chFlipHor, this.chFlipVert, // 2 tab
this.spnTop, this.spnLeft, this.spnBottom, this.spnRight, // 3 tab this.spnTop, this.spnLeft, this.spnBottom, this.spnRight, // 3 tab
this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition, this.spnXPc, this.cmbHPositionPc, this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition, this.spnXPc, this.cmbHPositionPc,
this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, this.spnYPc, this.cmbVPositionPc, // 4 tab this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, this.spnYPc, this.cmbVPositionPc, this.chMove, this.chOverlap, // 4 tab
this.cmbCapType, this.cmbJoinType, // 5 tab this.cmbCapType, this.cmbJoinType, // 5 tab
this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 6 tab this.chAutofit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 6 tab
this.inputAltTitle, this.textareaAltDescription // 7 tab this.inputAltTitle, this.textareaAltDescription // 7 tab
]; ];
}, },
@ -1196,7 +1196,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
me.cmbCapType.focus(); me.cmbCapType.focus();
break; break;
case 6: case 6:
me.spnMarginTop.focus(); me.chAutofit.focus();
break; break;
case 7: case 7:
me.inputAltTitle.focus(); me.inputAltTitle.focus();

View file

@ -163,6 +163,7 @@ define([
el: $('#line-numbers-combo-apply'), el: $('#line-numbers-combo-apply'),
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 150px;', menuStyle: 'min-width: 150px;',
takeFocusOnClose: true,
editable: false, editable: false,
data: [ data: [
{ displayValue: this.textSection, value: Asc.c_oAscSectionApplyType.Current }, { displayValue: this.textSection, value: Asc.c_oAscSectionApplyType.Current },
@ -177,6 +178,14 @@ define([
this.updateMetricUnit(); this.updateMetricUnit();
}, },
getFocusedComponents: function() {
return [this.chAddLineNumbering, this.spnStartAt, this.spnFromText, this.spnCountBy, this.cmbApply];
},
getDefaultFocusableComponent: function () {
return this.chAddLineNumbering;
},
afterRender: function() { afterRender: function() {
}, },

View file

@ -340,7 +340,7 @@ define([
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [this.cmbFormat, this.cmbAlign, this.cmbSize, {cmp: this.levelsList, selector: '.listview'}]; return [this.cmbFormat, this.cmbAlign, this.cmbSize, this.levelsList];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {

View file

@ -88,6 +88,14 @@ define([
}); });
}, },
getFocusedComponents: function() {
return [this.chFootnote, this.chEndnote];
},
getDefaultFocusableComponent: function () {
return this.chFootnote;
},
_handleInput: function(state) { _handleInput: function(state) {
if (this.options.handler) { if (this.options.handler) {
this.options.handler.call(this, this, state); this.options.handler.call(this, this, state);

View file

@ -1010,10 +1010,10 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
getFocusedComponents: function() { getFocusedComponents: function() {
return [ return [
this.nfWidth, this.cmbUnit, this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, this.nfSpacing, // 0 tab this.chWidth, this.nfWidth, this.cmbUnit, this.chAutofit, this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, this.chAllowSpacing, this.nfSpacing, // 0 tab
this.nfPrefWidth, this.cmbPrefWidthUnit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 1 tab this.chPrefWidth, this.nfPrefWidth, this.cmbPrefWidthUnit, this.chCellMargins, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, this.chWrapText, // 1 tab
this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition, this.cmbHAlign , this.cmbHRelative, this.spnX, this.cmbHPosition,
this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, // 3 tab this.cmbVAlign , this.cmbVRelative, this.spnY, this.cmbVPosition, this.chMove, this.chOverlap, // 3 tab
this.spnIndentLeft, this.spnDistanceTop, this.spnDistanceLeft, this.spnDistanceBottom, this.spnDistanceRight, // 4 tab this.spnIndentLeft, this.spnDistanceTop, this.spnDistanceLeft, this.spnDistanceBottom, this.spnDistanceRight, // 4 tab
this.inputAltTitle, this.textareaAltDescription // 5 tab this.inputAltTitle, this.textareaAltDescription // 5 tab
]; ];
@ -1035,8 +1035,8 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
me.onCellCategoryClick(btn); me.onCellCategoryClick(btn);
if (!me.nfPrefWidth.isDisabled()) if (!me.nfPrefWidth.isDisabled())
me.nfPrefWidth.focus(); me.nfPrefWidth.focus();
else if (!me.spnMarginTop.isDisabled()) else
me.spnMarginTop.focus(); me.chPrefWidth.focus();
break; break;
case 3: case 3:
if (!me.cmbHAlign.isDisabled()) if (!me.cmbHAlign.isDisabled())

View file

@ -383,7 +383,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
}, },
getFocusedComponents: function() { getFocusedComponents: function() {
return [ this.cmbLang, this.cmbText, this.cmbFonts, this.cmbFontSize, this.cmbScale ]; return [ this.cmbLang, this.cmbText, this.cmbFonts, this.chTransparency, this.cmbFontSize, this.cmbScale ];
}, },
getDefaultFocusableComponent: function () { getDefaultFocusableComponent: function () {