forked from 0x2620/pandora
use loop
This commit is contained in:
parent
55f9d9f58b
commit
59bd4fffa8
1 changed files with 5 additions and 6 deletions
|
@ -99,7 +99,6 @@ pandora.ui.tasksDialog = function(options) {
|
||||||
title: Ox._('Progress'),
|
title: Ox._('Progress'),
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
columnsVisible: true,
|
columnsVisible: true,
|
||||||
items: listItems,
|
items: listItems,
|
||||||
|
@ -336,11 +335,11 @@ pandora.ui.tasksDialog = function(options) {
|
||||||
if (Ox.getIndexById(listItems, item.id) == -1) {
|
if (Ox.getIndexById(listItems, item.id) == -1) {
|
||||||
hasNewItems = true;
|
hasNewItems = true;
|
||||||
} else if (!hasNewItems) {
|
} else if (!hasNewItems) {
|
||||||
$list.value(item.id, 'progress', item.progress);
|
['progress', 'status'].concat(
|
||||||
$list.value(item.id, 'status', item.status);
|
item.ended ? ['ended'] : []
|
||||||
if (item.ended) {
|
).forEach(function(key) {
|
||||||
$list.value(item.id, 'ended', item.ended);
|
$list.value(item.id, key, item[key]);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
hasNewItems && updateList();
|
hasNewItems && updateList();
|
||||||
|
|
Loading…
Reference in a new issue