diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js index 3b585a0b6b..a043b17d55 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettingsDlg.js @@ -168,7 +168,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscChartTitleShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay }, { value: Asc.c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay } - ] + ], + takeFocusOnClose: true }); this.cmbLegendPos = new Common.UI.ComboBox({ @@ -184,7 +185,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft }, { value: Asc.c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay }, { value: Asc.c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay } - ] + ], + takeFocusOnClose: true }); this.cmbHorTitle = new Common.UI.ComboBox({ @@ -195,7 +197,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ { value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: this.textNoOverlay } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putHorAxisLabel(record.value); @@ -210,7 +213,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: this.textRotated }, { value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: this.textHorizontal } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putVertAxisLabel(record.value); @@ -224,7 +228,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ { value: true, displayValue: this.textShow }, { value: false, displayValue: this.textHide } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putShowHorAxis(record.value); @@ -238,7 +243,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ { value: true, displayValue: this.textShow }, { value: false, displayValue: this.textHide } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putShowVerAxis(record.value); @@ -254,7 +260,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor }, { value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor }, { value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putHorGridLines(record.value); @@ -270,7 +277,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor }, { value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor }, { value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) this.chartSettings.putVertGridLines(record.value); @@ -287,7 +295,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom }, { value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop }, { value: Asc.c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop } - ] + ], + takeFocusOnClose: true }); this.cmbDataLabels.on('selected', _.bind(me.onSelectDataLabels, this)); @@ -324,7 +333,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' { value: 0, displayValue: this.textNone }, { value: 1, displayValue: this.textStraight }, { value: 2, displayValue: this.textSmooth } - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.chartSettings) { this.chartSettings.putLine(record.value!==0); @@ -353,7 +363,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ {displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto}, {displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMinValRule(record.value); @@ -389,7 +400,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ {displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto}, {displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMaxValRule(record.value); @@ -427,7 +439,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value}, {displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue}, {displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putCrossesRule(record.value); @@ -480,7 +493,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textHundredMil, value: Asc.c_oAscValAxUnits.HUNDRED_MILLIONS}, {displayValue: this.textBillions, value: Asc.c_oAscValAxUnits.BILLIONS}, {displayValue: this.textTrillions, value: Asc.c_oAscValAxUnits.TRILLIONS} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putDispUnitsRule(record.value); @@ -506,7 +520,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMajorTickMark(record.value); @@ -523,7 +538,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMinorTickMark(record.value); @@ -540,7 +556,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, {displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, {displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putTickLabelsPos(record.value); @@ -559,7 +576,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value}, {displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue}, {displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putCrossesRule(record.value); @@ -599,7 +617,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ {displayValue: this.textOnTickMarks, value: Asc.c_oAscLabelsPosition.byDivisions}, {displayValue: this.textBetweenTickMarks, value: Asc.c_oAscLabelsPosition.betweenDivisions} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putLabelsPosition(record.value); @@ -625,7 +644,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMajorTickMark(record.value); @@ -642,7 +662,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putMinorTickMark(record.value); @@ -673,7 +694,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, {displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, {displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putTickLabelsPos(record.value); @@ -720,7 +742,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' data : [ {displayValue: this.textAuto, value: Asc.c_oAscBetweenLabelsRule.auto}, {displayValue: this.textManual, value: Asc.c_oAscBetweenLabelsRule.manual} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { if (this.currentAxisProps) { this.currentAxisProps.putIntervalBetweenLabelsRule(record.value); @@ -818,7 +841,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' el : $('#spark-dlg-combo-empty'), menuStyle : 'min-width: 220px;', editable : false, - cls : 'input-group-nr' + cls : 'input-group-nr', + takeFocusOnClose: true }); this.cmbEmptyCells.on('selected', _.bind(function(combo, record){ if (this._changedProps) { @@ -867,7 +891,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textAutoEach, value: Asc.c_oAscSparklineAxisMinMax.Individual}, {displayValue: this.textSameAll, value: Asc.c_oAscSparklineAxisMinMax.Group}, {displayValue: this.textFixed, value: Asc.c_oAscSparklineAxisMinMax.Custom} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { this.spnSparkMinValue.setDisabled(record.value!==Asc.c_oAscSparklineAxisMinMax.Custom); if (this._changedProps) { @@ -900,7 +925,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' {displayValue: this.textAutoEach, value: Asc.c_oAscSparklineAxisMinMax.Individual}, {displayValue: this.textSameAll, value: Asc.c_oAscSparklineAxisMinMax.Group}, {displayValue: this.textFixed, value: Asc.c_oAscSparklineAxisMinMax.Custom} - ] + ], + takeFocusOnClose: true }).on('selected', _.bind(function(combo, record) { this.spnSparkMaxValue.setDisabled(record.value!==Asc.c_oAscSparklineAxisMinMax.Custom); if (this._changedProps) { @@ -971,6 +997,42 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.cmbChartTitle, this.cmbLegendPos, this.cmbDataLabels, this.txtSeparator, this.cmbHorShow, this.cmbVertShow, + this.cmbHorTitle, this.cmbVertTitle, this.cmbHorGrid, this.cmbVertGrid, // 1 tab + this.cmbMinType , this.spnMinValue, this.cmbMaxType, this.spnMaxValue, this.cmbVCrossType, this.spnVAxisCrosses, + this.cmbUnits , this.cmbVMajorType, this.cmbVMinorType, this.cmbVLabelPos, // 2 tab + this.cmbHCrossType , this.spnHAxisCrosses, this.cmbAxisPos, this.cmbHMajorType, this.cmbHMinorType, this.spnMarksInterval, + this.cmbHLabelPos , this.spnLabelDist, this.cmbLabelInterval, this.spnLabelInterval, // 3 tab + this.inputAltTitle, this.textareaAltDescription // 7 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 1: + me.cmbChartTitle.focus(); + break; + case 2: + me.onVCategoryClick(btn); + me.cmbMinType.focus(); + break; + case 3: + me.onHCategoryClick(btn); + me.cmbHCrossType.focus(); + break; + case 7: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + afterRender: function() { this._setDefaults(this.chartSettings); @@ -997,15 +1059,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template' } }, - onCategoryClick: function(btn, index) { - Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); - - if (index==2) - this.onVCategoryClick(btn); - else if (index==3) - this.onHCategoryClick(btn); - }, - onSelectType: function(btn, picker, itemView, record) { if (this._noApply) return; diff --git a/apps/spreadsheeteditor/main/app/view/ImageSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ImageSettingsAdvanced.js index 2a0fff699a..558c7469c4 100644 --- a/apps/spreadsheeteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ImageSettingsAdvanced.js @@ -146,6 +146,29 @@ define([ 'text!spreadsheeteditor/main/app/template/ImageSettingsAdvanced.temp this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.spnAngle, // 0 tab + this.inputAltTitle, this.textareaAltDescription // 2 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.spnAngle.focus(); + break; + case 2: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + onRadioSnapChange: function(field, newValue, eOpts) { if (newValue && this._changedProps) { this._changedProps.asc_putAnchor(field.options.value); diff --git a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js index bb7ba835f2..aeb1097f30 100644 --- a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js @@ -107,7 +107,8 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', { value: 2, displayValue: this.textFilterTableNames }, { value: 3, displayValue: this.textFilterSheet }, { value: 4, displayValue: this.textFilterWorkbook } - ] + ], + takeFocusOnClose: true }).on('selected', function(combo, record) { me.refreshRangeList(null, 0); }); @@ -129,7 +130,8 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', '
<%=lockuser%>
', '<% } %>', '' - ].join('')) + ].join('')), + tabindex: 1 }); this.rangeList.store.comparator = function(item1, item2) { var n1 = item1.get(me.sort.type).toLowerCase(), @@ -169,6 +171,18 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', this.afterRender(); }, + getFocusedComponents: function() { + return [ this.cmbFilter, {cmp: this.rangeList, selector: '.listview'} ]; + }, + + show: function() { + Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments); + var me = this; + _.delay(function () { + me.rangeList.focus(); + }, 100, me); + }, + afterRender: function() { this._setDefaults(this.props); }, @@ -250,7 +264,6 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', this.rangeList.cmpEl.on('mouseover', _.bind(me.onMouseOverLock, me)).on('mouseout', _.bind(me.onMouseOutLock, me)); } _.delay(function () { - me.rangeList.focus(); me.rangeList.scroller.update({alwaysVisibleY: true}); }, 100, this); }, @@ -310,9 +323,6 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', } }).on('close', function() { me.show(); - _.delay(function () { - me.rangeList.focus(); - }, 100, me); }); me.hide(); diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js index 61c6d67f14..dae5fa399c 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -127,7 +127,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. editable: false, data: this._arrTextAlignment, style: 'width: 173px;', - menuStyle : 'min-width: 173px;' + menuStyle : 'min-width: 173px;', + takeFocusOnClose: true }); this.cmbTextAlignment.setValue(''); @@ -176,7 +177,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. editable: false, data: this._arrSpecial, style: 'width: 85px;', - menuStyle : 'min-width: 85px;' + menuStyle : 'min-width: 85px;', + takeFocusOnClose: true }); this.cmbSpecial.setValue(''); this.cmbSpecial.on('selected', _.bind(this.onSpecialSelect, this)); @@ -240,7 +242,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. editable: false, data: this._arrLineRule, style: 'width: 85px;', - menuStyle : 'min-width: 85px;' + menuStyle : 'min-width: 85px;', + takeFocusOnClose: true }); this.cmbLineRule.setValue(this.CurLineRuleIdx); this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); @@ -355,7 +358,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. '
<%= value %>
', '
<%= displayTabAlign %>
', '' - ].join('')) + ].join('')), + tabindex: 1 }); this.tabList.store.comparator = function(rec) { return rec.get("tabPos"); @@ -376,7 +380,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. menuStyle : 'min-width: 108px;', editable : false, cls : 'input-group-nr', - data : this._arrTabAlign + data : this._arrTabAlign, + takeFocusOnClose: true }); this.cmbAlign.setValue(Asc.c_oAscTabType.Left); @@ -395,13 +400,37 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. }); this.btnRemoveAll.on('click', _.bind(this.removeAllTabs, this)); - this.on('show', function(obj) { - obj.getChild('.footer .primary').focus(); - }); - this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.cmbTextAlignment, this.numIndentsLeft, this.numIndentsRight, this.cmbSpecial, this.numSpecialBy, + this.numSpacingBefore, this.numSpacingAfter, this.cmbLineRule, this.numLineHeight, // 0 tab + this.numSpacing, // 1 tab + this.numDefaultTab, this.numTab, this.cmbAlign, {cmp: this.tabList, selector: '.listview'} // 2 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.cmbTextAlignment.focus(); + break; + case 1: + me.numSpacing.focus(); + break; + case 2: + me.numDefaultTab.focus(); + break; + } + }, 10); + }, + getSettings: function() { if ( this._tabListChanged ) { if (this._changedProps.asc_getTabs()===null || this._changedProps.asc_getTabs()===undefined) diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/PivotSettingsAdvanced.js index 50f912c954..00b0b55c8a 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/PivotSettingsAdvanced.js @@ -181,6 +181,33 @@ define([ 'text!spreadsheeteditor/main/app/template/PivotSettingsAdvanced.temp this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.inputName, this.numWrap, // 0 tab + this.txtDataRange, // 1 tab + this.inputAltTitle, this.textareaAltDescription // 2 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.inputName.focus(); + break; + case 1: + me.txtDataRange.focus(); + break; + case 2: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + afterRender: function() { this._setDefaults(this.props); if (this.storageName) { diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js index f08fe76887..799dc8090b 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js @@ -306,7 +306,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp cls: 'input-group-nr', menuStyle: 'min-width: 100px;', editable: false, - data: this._arrCapType + data: this._arrCapType, + takeFocusOnClose: true }); this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat); this.cmbCapType.on('selected', _.bind(function(combo, record){ @@ -330,7 +331,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp cls: 'input-group-nr', menuStyle: 'min-width: 100px;', editable: false, - data: this._arrJoinType + data: this._arrJoinType, + takeFocusOnClose: true }); this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round); this.cmbJoinType.on('selected', _.bind(function(combo, record){ @@ -484,10 +486,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp this.mnuEndSizePicker.on('item:click', _.bind(this.onSelectEndSize, this)); this._selectStyleItem(this.btnEndSize, null); - this.on('show', function(obj) { - obj.getChild('.footer .primary').focus(); - }); - // Columns this.spnColumns = new Common.UI.MetricSpinner({ @@ -575,6 +573,45 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.spnWidth, this.spnHeight, // 0 tab + this.spnAngle, // 1 tab + this.cmbCapType, this.cmbJoinType, // 2 tab + this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab + this.spnColumns, this.spnSpacing, // 4 tab + this.inputAltTitle, this.textareaAltDescription // 6 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.spnWidth.focus(); + break; + case 1: + me.spnAngle.focus(); + break; + case 2: + me.cmbCapType.focus(); + break; + case 3: + me.spnMarginTop.focus(); + break; + case 4: + me.spnColumns.focus(); + break; + case 6: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + afterRender: function() { this.updateMetricUnit(); this._setDefaults(this._originalProps); diff --git a/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js index 5fd20562f3..98aa3749b2 100644 --- a/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/SlicerSettingsAdvanced.js @@ -384,6 +384,33 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem this.afterRender(); }, + getFocusedComponents: function() { + return [ + this.inputHeader, this.numWidth, this.numHeight, this.numCols, this.numColHeight, // 0 tab + this.inputName, // 2 tab + this.inputAltTitle, this.textareaAltDescription // 4 tab + ]; + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.inputHeader.focus(); + break; + case 2: + me.inputName.focus(); + break; + case 4: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + getSettings: function() { if (this.isCaptionChanged) this._changedProps.asc_setCaption(this.inputHeader.getValue()); diff --git a/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js index e829c38c89..7cd1301c0a 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettingsAdvanced.js @@ -96,6 +96,23 @@ define([ 'text!spreadsheeteditor/main/app/template/TableSettingsAdvanced.temp this.afterRender(); }, + getFocusedComponents: function() { + return [ this.inputAltTitle, this.textareaAltDescription ]; // 0 tab + }, + + onCategoryClick: function(btn, index) { + Common.Views.AdvancedSettingsWindow.prototype.onCategoryClick.call(this, btn, index); + + var me = this; + setTimeout(function(){ + switch (index) { + case 0: + me.inputAltTitle.focus(); + break; + } + }, 10); + }, + afterRender: function() { this._setDefaults(this._originalProps); if (this.storageName) {