forked from 0x2620/oxjs
various annotation-related bugfixes
This commit is contained in:
parent
198e11c59b
commit
a7a3f167c9
10 changed files with 135 additions and 75 deletions
|
|
@ -24,10 +24,14 @@ Ox.Focus = (function() {
|
|||
stack.length == 1
|
||||
? stack.pop()
|
||||
: stack.splice(stack.length - 2, 0, stack.pop());
|
||||
//$elements[id].removeClass('OxFocus');
|
||||
$('.OxFocus').removeClass('OxFocus'); // fixme: the above is better, and should work
|
||||
stack.length && Ox.UI.elements[stack[stack.length - 1]]
|
||||
.addClass('OxFocus')/*.triggerEvent('focus')*/;
|
||||
Ox.UI.elements[id]
|
||||
.removeClass('OxFocus')
|
||||
.triggerEvent('losefocus');
|
||||
if (stack.length) {
|
||||
Ox.UI.elements[stack[stack.length - 1]]
|
||||
.addClass('OxFocus')
|
||||
.triggerEvent('gainfocus')
|
||||
}
|
||||
Ox.Log('Core', 'blur', id, stack);
|
||||
}
|
||||
},
|
||||
|
|
@ -40,10 +44,16 @@ Ox.Focus = (function() {
|
|||
if (index == -1 || index < stack.length - 1) {
|
||||
index > -1 && stack.splice(index, 1);
|
||||
stack.push(id);
|
||||
$('.OxFocus').removeClass('OxFocus'); // fixme: see above
|
||||
Ox.Log('Core', 'focus', id, stack);
|
||||
if (stack.length > 1) {
|
||||
Ox.print('...', Object.keys(Ox.UI.elements[stack[stack.length - 2]]))
|
||||
Ox.UI.elements[stack[stack.length - 2]]
|
||||
.removeClass('OxFocus')
|
||||
.triggerEvent('losefocus')
|
||||
}
|
||||
Ox.UI.elements[id]
|
||||
.addClass('OxFocus')/*.triggerEvent('focus')*/;
|
||||
.addClass('OxFocus')
|
||||
.triggerEvent('gainfocus');
|
||||
Ox.Log('Core', 'focus', id, stack);
|
||||
}
|
||||
},
|
||||
/*@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue