www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 85b703aa33f48de16297a648c36faf1719590053
parent 8bf5a5fb17d2ae3baf77bb1e54aad67bb7b92695
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun, 24 Oct 2010 23:49:00 +0000

kill Zotero.arrayToHash, which looks like it was never used, and Zotero.hasValues


Diffstat:
Mchrome/content/zotero/bindings/tagselector.xml | 4++--
Mchrome/content/zotero/overlay.js | 2+-
Mchrome/content/zotero/xpcom/zotero.js | 27---------------------------
3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml @@ -105,7 +105,7 @@ <parameter name="skipRefresh"/> <body> <![CDATA[ - if (Zotero.hasValues(val)) { + if (!Zotero.Utilities.prototype.isEmpty(val)) { this._hasFilter = true; this._filter = val; } @@ -126,7 +126,7 @@ <property name="scope" onget="return this._scope"> <setter> <![CDATA[ - if (Zotero.hasValues(val)) { + if (!Zotero.Utilities.prototype.isEmpty(val)) { this._hasScope = true; this._scope = val; } diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js @@ -971,7 +971,7 @@ var ZoteroPane = new function() function clearTagSelection() { - if (Zotero.hasValues(this.getTagSelection())) { + if (!Zotero.Utilities.prototype.isEmpty(this.getTagSelection())) { var tagSelector = document.getElementById('zotero-tag-selector'); tagSelector.clearAll(); } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -67,8 +67,6 @@ var Zotero = new function(){ this.flattenArguments = flattenArguments; this.getAncestorByTagName = getAncestorByTagName; this.join = join; - this.arrayToHash = arrayToHash; - this.hasValues = hasValues; this.randomString = randomString; this.moveToUnique = moveToUnique; @@ -1178,31 +1176,6 @@ var Zotero = new function(){ } - function arrayToHash(array){ - var hash = {}; - - for each(var val in array){ - hash[val] = true; - } - - return hash; - } - - - /* - * Returns true if an object (or associative array) has at least one value - */ - function hasValues(obj) { - Zotero.debug("WARNING: Zotero.isEmpty() is deprecated! Use Zotero.Utilities.isEmpty(obj)", 2); - - for (var i in obj) { - return true; - } - - return false; - } - - /** * Generate a random string of length 'len' (defaults to 8) **/