1
0
Fork 0
forked from 0x2620/oxjs

fixing a bug where in a list, the click target loop would not exit when items are added or removed on click

This commit is contained in:
rlx 2011-09-05 05:40:44 +00:00
commit c3b59a62fe
8 changed files with 71 additions and 22 deletions

View file

@ -61,9 +61,11 @@ Ox.DocPanel = function(options, self) {
});
function loadList(callback) {
var counter = 0,
length = self.options.files.length;
docItems = [];
self.options.files.forEach(function(file) {
Ox.doc(self.options.path + file, function(fileItems) {
docItems = Ox.merge(docItems, fileItems);
@ -134,6 +136,7 @@ Ox.DocPanel = function(options, self) {
*/
that.$element.replaceElement(0, self.$list);
}
}
function getItemByName(name) {
@ -151,6 +154,7 @@ Ox.DocPanel = function(options, self) {
var selected;
if (data.ids.length) {
selected = data.ids[0];
Ox.print('selected', data.ids)
if (selected[0] != '_') {
self.$page = Ox.DocPage({
item: getItemByName(selected)