From 5f95fd9da45cc65d15a457929657d42b942c1181 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 4 Apr 2012 00:34:41 +0200 Subject: [PATCH] allow for list preview to be opened externally --- source/Ox.UI/js/List/Ox.List.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 8ea8103a..52df9392 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -1453,6 +1453,7 @@ Ox.List = function(options, self) { @*/ that.closePreview = function() { self.preview = false; + that.triggerEvent('closepreview'); return that; }; @@ -1465,6 +1466,16 @@ Ox.List = function(options, self) { return that; }; + /*@ + openPreview to be called when preview is opened externally + () -> the list + @*/ + that.openPreview = function() { + self.preview = true; + that.triggerEvent('openpreview', {ids: self.options.selected}); + return that; + }; + /*@ paste paste data (data) -> the list