[DE] use component to focus on window open
This commit is contained in:
parent
7dce6d79ae
commit
dd0359ce90
|
@ -143,6 +143,11 @@ Common.UI.FocusManager = new(function() {
|
||||||
updateTabIndexes(true);
|
updateTabIndexes(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( e.getDefaultFocusedComponent )
|
||||||
|
setTimeout(function(){
|
||||||
|
e.getDefaultFocusedComponent().focus();
|
||||||
|
}, 100);
|
||||||
},
|
},
|
||||||
'window:show': function(e){
|
'window:show': function(e){
|
||||||
if (e && e.cid && _windows[e.cid] && !_windows[e.cid].fields) {
|
if (e && e.cid && _windows[e.cid] && !_windows[e.cid].fields) {
|
||||||
|
|
|
@ -129,15 +129,19 @@ define([
|
||||||
|
|
||||||
this.updateMetricUnit();
|
this.updateMetricUnit();
|
||||||
|
|
||||||
setTimeout(function(){
|
// setTimeout(function(){
|
||||||
me.spnColumns.focus();
|
// me.spnColumns.focus();
|
||||||
}, 100);
|
// }, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
getFocusedComponents: function() {
|
getFocusedComponents: function() {
|
||||||
return [this.spnColumns, this.spnSpacing];
|
return [this.spnColumns, this.spnSpacing];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDefaultFocusedComponent: function () {
|
||||||
|
return this.spnColumns;
|
||||||
|
},
|
||||||
|
|
||||||
_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);
|
||||||
|
|
|
@ -341,6 +341,10 @@ define([
|
||||||
return [this.cmbFormat, this.cmbAlign, this.cmbSize, {cmp: this.levelsList, selector: '.listview'}];
|
return [this.cmbFormat, this.cmbAlign, this.cmbSize, {cmp: this.levelsList, selector: '.listview'}];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDefaultFocusedComponent: function () {
|
||||||
|
return this.type > 0 ? this.cmbFormat : this.cmbAlign;
|
||||||
|
},
|
||||||
|
|
||||||
afterRender: function() {
|
afterRender: function() {
|
||||||
this.updateThemeColors();
|
this.updateThemeColors();
|
||||||
this._setDefaults(this.props);
|
this._setDefaults(this.props);
|
||||||
|
@ -357,10 +361,10 @@ define([
|
||||||
show: function() {
|
show: function() {
|
||||||
Common.UI.Window.prototype.show.apply(this, arguments);
|
Common.UI.Window.prototype.show.apply(this, arguments);
|
||||||
|
|
||||||
var me = this;
|
// var me = this;
|
||||||
_.delay(function(){
|
// _.delay(function(){
|
||||||
(me.type>0) ? me.cmbFormat.focus() : me.cmbAlign.focus();
|
// (me.type>0) ? me.cmbFormat.focus() : me.cmbAlign.focus();
|
||||||
},100);
|
// },100);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateThemeColors: function() {
|
updateThemeColors: function() {
|
||||||
|
|
Loading…
Reference in a new issue