From 20137da74232c924a5899ad1e748e2a633149e6f Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 3 Aug 2013 13:57:55 +0000 Subject: [PATCH] trigger cut and cutadd events (consumer of list events may want to differentiate between cut and delete) --- source/Ox.UI/js/List/List.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index d26f4f78..e923edda 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -39,6 +39,8 @@ Ox.List List constructor closepreview preview closed copy copy and replace clipboard copyadd copy and add to clipboard + cut cut and replace clipboard + cutadd cut and add to clipboard delete item removed draganddrop Fires during drag draganddropend Fires on drop @@ -394,8 +396,9 @@ Ox.List = function(options, self) { } function cutItems(add) { - copyItems(add); - deleteItems(); + self.options.selected.length && that.triggerEvent('cut' + (add ? 'add' : ''), { + ids: self.options.selected + }); } function deleteItems() {