merge
This commit is contained in:
commit
11cb7b1dc8
11 changed files with 57 additions and 21 deletions
|
|
@ -125,7 +125,7 @@ Ox.DocPanel = function(options, self) {
|
|||
});
|
||||
self.$list = Ox.TreeList({
|
||||
items: treeItems,
|
||||
width: self.options.width
|
||||
width: self.options.size - Ox.UI.SCROLLBAR_SIZE
|
||||
})
|
||||
.bindEvent({
|
||||
select: selectItem
|
||||
|
|
@ -184,7 +184,7 @@ Ox.DocPanel = function(options, self) {
|
|||
@*/
|
||||
that.selectItem = function(id) {
|
||||
self.$list.triggerEvent('select', {'ids': [id]});
|
||||
}
|
||||
};
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ Ox.JQueryElement <function> Wrapper for jQuery
|
|||
$element <object> jQuery DOM Element
|
||||
@*/
|
||||
|
||||
// fixme: it seems that children(), find() etc. don't work directly,
|
||||
// and still have to be called on the $element
|
||||
// fixme: now that children(), find() work, change code to call find directly.
|
||||
|
||||
Ox.JQueryElement = function($element) {
|
||||
var that = this;
|
||||
|
|
@ -48,10 +47,12 @@ Ox.forEach($('<div>'), function(val, key) {
|
|||
}
|
||||
});
|
||||
ret = that.$element[key].apply(that.$element, args);
|
||||
// if the $element of an ox object was returned
|
||||
// if exactly one $element of an ox object was returned
|
||||
// then return the ox object instead
|
||||
// so that we can do oxObj.jqFn().oxFn()
|
||||
return ret && ret.jquery && Ox.UI.elements[id = ret.data('oxid')]
|
||||
return ret && ret.jquery
|
||||
&& ret.length == 1
|
||||
&& Ox.UI.elements[id = ret.data('oxid')]
|
||||
? Ox.UI.elements[id] : ret;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue