[open-ils-commits] [GIT] Evergreen ILS branch master updated. f25cc39b24384ef25178e0be0ce1f0c757839da0

Evergreen Git git at git.evergreen-ils.org
Tue Aug 6 12:42:49 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  f25cc39b24384ef25178e0be0ce1f0c757839da0 (commit)
      from  c22418f9a1adf9af2734bd76d97d6acf938750d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f25cc39b24384ef25178e0be0ce1f0c757839da0
Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
Date:   Tue Jul 23 10:49:47 2013 +0300

    Prevent paste from empty clipboard throwing an error
    
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js b/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js
index 75d225a..d180611 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js
@@ -57,7 +57,9 @@ util.clipboard.paste = function() {
         trans.addDataFlavor("text/unicode"); 
         cb.getData(trans, cb.kGlobalClipboard);
         var str = {}; var strLength = {};
-        trans.getTransferData("text/unicode",str,strLength);
+        try {
+            trans.getTransferData("text/unicode",str,strLength);
+        } catch(e) { /* clipboard is empty */ return; }
         if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
         var clip; if (str) clip = str.data.substring(0, strLength.value / 2);
         n.value = v.substring(0, start) + clip + v.substring(end, v.length);

-----------------------------------------------------------------------

Summary of changes:
 .../staff_client/chrome/content/util/clipboard.js  |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list