[SSE] Add focus for up/down buttons

This commit is contained in:
Julia Radzhabova 2021-04-15 02:19:18 +03:00
parent d0a4de80ec
commit f3a75b724d
3 changed files with 18 additions and 10 deletions

View file

@ -339,6 +339,11 @@
border: @scaled-one-px-value-ie solid @border-regular-control-ie; border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control; border: @scaled-one-px-value solid @border-regular-control;
.border-radius(@border-radius-small); .border-radius(@border-radius-small);
&:focus:not(.disabled) {
border-color: @border-control-focus-ie;
border-color: @border-control-focus;
}
} }
&:before, &:before,

View file

@ -150,7 +150,8 @@ define([
store: new Common.UI.DataViewStore(), store: new Common.UI.DataViewStore(),
emptyText: '', emptyText: '',
scrollAlwaysVisible: true, scrollAlwaysVisible: true,
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>') itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>'),
tabindex:1
}); });
this.seriesList.onKeyDown = _.bind(this.onListKeyDown, this, 'series'); this.seriesList.onKeyDown = _.bind(this.onListKeyDown, this, 'series');
this.seriesList.on('item:select', _.bind(this.onSelectSeries, this)); this.seriesList.on('item:select', _.bind(this.onSelectSeries, this));
@ -199,7 +200,8 @@ define([
store: new Common.UI.DataViewStore(), store: new Common.UI.DataViewStore(),
emptyText: '', emptyText: '',
scrollAlwaysVisible: true, scrollAlwaysVisible: true,
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>') itemTemplate: _.template('<div id="<%= id %>" class="list-item" style="min-height: 15px;"><%= value %></div>'),
tabindex:1
}); });
this.btnEditCategory = new Common.UI.Button({ this.btnEditCategory = new Common.UI.Button({
@ -210,17 +212,16 @@ define([
this.afterRender(); this.afterRender();
}, },
afterRender: function() { getFocusedComponents: function() {
this._setDefaults(this.chartSettings); return [this.txtDataRange, this.seriesList, this.btnAdd, this.btnEdit, this.btnDelete, this.btnUp, this.btnDown, this.btnSwitch, this.categoryList, this.btnEditCategory];
}, },
show: function() { getDefaultFocusableComponent: function () {
Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments); return this.txtDataRange;
},
var me = this; afterRender: function() {
_.delay(function(){ this._setDefaults(this.chartSettings);
me.txtDataRange.cmpEl.find('input').focus();
},50);
}, },
close: function () { close: function () {

View file

@ -216,6 +216,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesManagerDlg.templa
Common.UI.FocusManager.add(this, this.rulesList); Common.UI.FocusManager.add(this, this.rulesList);
Common.UI.FocusManager.add(this, this.btnNew); Common.UI.FocusManager.add(this, this.btnNew);
Common.UI.FocusManager.add(this, this.btnEdit); Common.UI.FocusManager.add(this, this.btnEdit);
Common.UI.FocusManager.add(this, this.btnUp);
Common.UI.FocusManager.add(this, this.btnDown);
Common.UI.FocusManager.add(this, this.btnDelete); Common.UI.FocusManager.add(this, this.btnDelete);