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
|
|
@ -46,6 +46,9 @@ Ox.Request = (function() {
|
|||
// cancel by id
|
||||
delete requests[arguments[0]];
|
||||
}
|
||||
$element && $element.triggerEvent('request', {
|
||||
requests: Ox.len(requests)
|
||||
});
|
||||
},
|
||||
/*@
|
||||
clearCache <f> clear cached results
|
||||
|
|
@ -60,11 +63,12 @@ Ox.Request = (function() {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
/*@
|
||||
bindEvent <f> bindEvent to error/authrize requests
|
||||
bindEvent <f> Unbind event
|
||||
@*/
|
||||
bindEvent: function() {
|
||||
if(!$element) {
|
||||
if (!$element) {
|
||||
$element = Ox.Element();
|
||||
}
|
||||
$element.bindEvent.apply(this, arguments);
|
||||
|
|
@ -146,12 +150,18 @@ Ox.Request = (function() {
|
|||
url: options.url
|
||||
});
|
||||
}
|
||||
$element && $element.triggerEvent('request', {
|
||||
requests: Ox.len(requests)
|
||||
});
|
||||
}
|
||||
|
||||
function callback(data) {
|
||||
if (requests[options.id]) {
|
||||
delete requests[options.id];
|
||||
options.callback && options.callback(data);
|
||||
$element && $element.triggerEvent('request', {
|
||||
requests: Ox.len(requests)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +207,7 @@ Ox.Request = (function() {
|
|||
},
|
||||
|
||||
/*@
|
||||
unbindEvent <f> unbindEvent for error/authrize requests
|
||||
unbindEvent <f> Unbind event
|
||||
@*/
|
||||
unbindEvent: function() {
|
||||
$element && $element.unbindEvent.apply(this, arguments);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue