[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 6f4d21cb3947510f8ad1aa28d8634cf1acf8e926

Evergreen Git git at git.evergreen-ils.org
Tue Aug 6 12:42:50 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, rel_2_4 has been updated
       via  6f4d21cb3947510f8ad1aa28d8634cf1acf8e926 (commit)
      from  188c3589de72901b3f6e08d22aba49c3394b921d (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 6f4d21cb3947510f8ad1aa28d8634cf1acf8e926
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