[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 3ba30f6c644f51d1158025e94675db8759c30cc2
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_3 has been updated
via 3ba30f6c644f51d1158025e94675db8759c30cc2 (commit)
from 953cd16194b454199b3029ac00e83287d533546b (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 3ba30f6c644f51d1158025e94675db8759c30cc2
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