forked from 0x2620/oxjs
fix Ox.JQueryElement fixmes
This commit is contained in:
parent
b9e80c9d75
commit
33390069b9
6 changed files with 26 additions and 33 deletions
|
|
@ -324,7 +324,7 @@ Ox.Element = function(options, self) {
|
|||
() -> <o> object
|
||||
@*/
|
||||
that.bindKeyboard = function() {
|
||||
Ox.Keyboard.bind(that.id);
|
||||
Ox.Keyboard.bind(that.oxid);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ Ox.Element = function(options, self) {
|
|||
() -> <obj> This element object
|
||||
@*/
|
||||
that.gainFocus = function() {
|
||||
Ox.Focus.focus(that.id);
|
||||
Ox.Focus.focus(that.oxid);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ Ox.Element = function(options, self) {
|
|||
() -> <boolean> True if the element has focus
|
||||
@*/
|
||||
that.hasFocus = function() {
|
||||
return Ox.Focus.focused() == that.id;
|
||||
return Ox.Focus.focused() == that.oxid;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -370,7 +370,7 @@ Ox.Element = function(options, self) {
|
|||
() -> <object> This element object
|
||||
@*/
|
||||
that.loseFocus = function() {
|
||||
Ox.Focus.blur(that.id);
|
||||
Ox.Focus.blur(that.oxid);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -403,10 +403,10 @@ Ox.Element = function(options, self) {
|
|||
element = Ox.UI.elements[oxid];
|
||||
element && element.remove(false);
|
||||
});
|
||||
Ox.Focus.remove(that.id);
|
||||
Ox.Keyboard.unbind(that.id);
|
||||
Ox.Focus.remove(that.oxid);
|
||||
Ox.Keyboard.unbind(that.oxid);
|
||||
delete self.$eventHandler;
|
||||
delete Ox.UI.elements[that.id];
|
||||
delete Ox.UI.elements[that.oxid];
|
||||
that.$tooltip && that.$tooltip.remove();
|
||||
remove !== false && that.$element.remove();
|
||||
return that;
|
||||
|
|
@ -417,8 +417,7 @@ Ox.Element = function(options, self) {
|
|||
($element) -> null
|
||||
@*/
|
||||
that.setElement = function($element) {
|
||||
//$element[0].className = that.$element[0].className;
|
||||
$element.addClass('OxElement').data({oxid: that.id});
|
||||
$element.addClass('OxElement').data({oxid: that.oxid});
|
||||
that.$element.replaceWith($element);
|
||||
that.$element = $element;
|
||||
that[0] = that.$element[0];
|
||||
|
|
@ -453,7 +452,7 @@ Ox.Element = function(options, self) {
|
|||
'playing', 'position', 'progress', 'request'
|
||||
].indexOf(event) == -1) {
|
||||
if (!/^pandora_/.test(event)) {
|
||||
Ox.Log('EVENT', that.id, self.options.id, 'trigger', event, data);
|
||||
Ox.Log('EVENT', that.oxid, self.options.id, 'trigger', event, data);
|
||||
}
|
||||
}
|
||||
// it is necessary to check if self.$eventHandler exists,
|
||||
|
|
@ -495,7 +494,7 @@ Ox.Element = function(options, self) {
|
|||
() -> <o> object
|
||||
@*/
|
||||
that.unbindKeyboard = function() {
|
||||
Ox.Keyboard.unbind(that.id);
|
||||
Ox.Keyboard.unbind(that.oxid);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue