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', '