From a7f520281d4cc647e84a7b944199b5d03b6b6754 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 13 Feb 2014 09:31:06 +0000 Subject: [PATCH] combine multiple list.value into one --- source/Ox.UI/js/List/TableList.js | 2 +- source/Ox.UI/js/Video/ClipPanel.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index 0bff8ddf..e1766ada 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -1236,8 +1236,8 @@ Ox.TableList = function(options, self) { } else if (arguments.length == 2 && Ox.isString(arguments[1])) { return that.$body.value(id, arguments[1]); } else { + that.$body.value(id, Ox.makeObject(args)); Ox.forEach(Ox.makeObject(args), function(value, key) { - that.$body.value(id, key, value); if (key == self.options.unique) { // unique id has changed self.options.selected = self.options.selected.map(function(id_) { diff --git a/source/Ox.UI/js/Video/ClipPanel.js b/source/Ox.UI/js/Video/ClipPanel.js index 94ce6bc7..9e2b1c47 100644 --- a/source/Ox.UI/js/Video/ClipPanel.js +++ b/source/Ox.UI/js/Video/ClipPanel.js @@ -645,8 +645,11 @@ Ox.ClipPanel = function(options, self) { that.updateItem = function(id, data) { self.options.clips[Ox.getIndexById(self.options.clips, id)] = data; - ['in', 'out', 'duration'].forEach(function(key) { - self.$list.value(id, key, data[key]); + self.$list.value(id, { + duration: data.duration, + 'in': data['in'], + out: data.out, + sort: data.sort }); return that; };