From 8202aaa6e1afa5a64c543a756d5e74a47d5df552 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 6 Aug 2013 19:55:15 +0000 Subject: [PATCH] clipboard: fix paste event; dont pass data with events --- source/Ox.UI/js/Core/Clipboard.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/Ox.UI/js/Core/Clipboard.js b/source/Ox.UI/js/Core/Clipboard.js index 2b616b3f..a3c9e95a 100644 --- a/source/Ox.UI/js/Core/Clipboard.js +++ b/source/Ox.UI/js/Core/Clipboard.js @@ -30,7 +30,7 @@ Ox.Clipboard = function() { items: Ox.unique(clipboard.items.concat(items)), type: type }; - $element && $element.triggerEvent('add', clipboard); + $element && $element.triggerEvent('add'); } return clipboard.items.length; }, @@ -42,14 +42,14 @@ Ox.Clipboard = function() { }, clear: function() { clipboard = {items: [], type: void 0}; - $element && $element.triggerEvent('clear', clipboard); + $element && $element.triggerEvent('clear'); return clipboard.items.length; }, copy: function(items, type) { items = Ox.makeArray(items); if (items.length) { clipboard = {items: items, type: type}; - $element && $element.triggerEvent('copy', clipboard); + $element && $element.triggerEvent('copy'); } return clipboard.items.length; }, @@ -57,8 +57,8 @@ Ox.Clipboard = function() { return !type || type == clipboard.type ? clipboard.items.length : 0; }, paste: function(type) { + $element && $element.triggerEvent('paste'); return !type || type == clipboard.type ? clipboard.items : []; - $element && $element.triggerEvent('paste', clipboard); }, type: function() { return clipboard.type;