in derivatives of Ox.List, make sure gainFocus, hasFocus and loseFocus work correctly

This commit is contained in:
rlx 2012-04-24 08:21:00 +00:00
parent 07b44e20c8
commit 9790e7d6c6
4 changed files with 45 additions and 4 deletions

View file

@ -155,6 +155,20 @@ Ox.IconList = function(options, self) {
return that;
};
that.gainFocus = function() {
that.$element.gainFocus();
return that;
};
that.hasFocus = function() {
return that.$element.hasFocus();
};
that.loseFocus = function() {
that.$element.loseFocus();
return that;
};
/*@
paste <f> paste into list
() -> <o> the list

View file

@ -176,9 +176,19 @@ Ox.InfoList = function(options, self) {
return that;
};
that.infoOptions = function(id, options) {
// ...
}
that.gainFocus = function() {
that.$element.gainFocus();
return that;
};
that.hasFocus = function() {
return that.$element.hasFocus();
};
that.loseFocus = function() {
that.$element.loseFocus();
return that;
};
that.paste = function(data) {
that.$element.paste(data);

View file

@ -899,6 +899,10 @@ Ox.TextList = function(options, self) {
return that;
};
that.hasFocus = function() {
return that.$body.hasFocus();
};
that.loseFocus = function() {
that.$body.loseFocus();
return that;
@ -925,7 +929,6 @@ Ox.TextList = function(options, self) {
}
that.size = function() {
Ox.Log('List', 'SIZE FUNCTION CALLED')
setWidth();
that.$body.size();
}

View file

@ -259,6 +259,20 @@ Ox.TreeList = function(options, self) {
}
};
that.gainFocus = function() {
self.$list.gainFocus();
return that;
};
that.hasFocus = function() {
return self.$list.hasFocus();
};
that.loseFocus = function() {
self.$list.loseFocus();
return that;
};
return that;
};