diff options
author | Georg Brandl <georg@python.org> | 2012-10-28 18:40:52 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-10-28 18:40:52 +0100 |
commit | 7f907b176e4a98ac2bae1c3c7617d58b66ee635c (patch) | |
tree | 897e461b455fe0406da4e274755aa31888e687fa /sphinx/themes | |
parent | baaa28f3168b9a315846ec4e2c76d099359b1191 (diff) | |
download | sphinx-7f907b176e4a98ac2bae1c3c7617d58b66ee635c.tar.gz |
Closes #1015: do not override the jQuery contains() function by defining our own with that name; rather use the one from Underscore.
Diffstat (limited to 'sphinx/themes')
-rw-r--r-- | sphinx/themes/basic/static/doctools.js | 12 | ||||
-rw-r--r-- | sphinx/themes/basic/static/searchtools.js_t | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/sphinx/themes/basic/static/doctools.js b/sphinx/themes/basic/static/doctools.js index d4619fdf..38feb6c5 100644 --- a/sphinx/themes/basic/static/doctools.js +++ b/sphinx/themes/basic/static/doctools.js @@ -62,18 +62,6 @@ jQuery.getQueryParameters = function(s) { }; /** - * small function to check if an array contains - * a given item. - */ -jQuery.contains = function(arr, item) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == item) - return true; - } - return false; -}; - -/** * highlight a given string on a jquery object by wrapping it in * span elements with the given class name. */ diff --git a/sphinx/themes/basic/static/searchtools.js_t b/sphinx/themes/basic/static/searchtools.js_t index 45989c6a..8e8acb8e 100644 --- a/sphinx/themes/basic/static/searchtools.js_t +++ b/sphinx/themes/basic/static/searchtools.js_t @@ -150,7 +150,7 @@ var Search = { hlterms.push(tmp[i].toLowerCase()); } // only add if not already in the list - if (!$.contains(toAppend, word)) + if (!$u.contains(toAppend, word)) toAppend.push(word); }; var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); @@ -217,7 +217,7 @@ var Search = { // search result. for (var i = 0; i < excluded.length; i++) { if (terms[excluded[i]] == file || - $.contains(terms[excluded[i]] || [], file)) { + $u.contains(terms[excluded[i]] || [], file)) { valid = false; break; } |