From 2a9154e0c734ad956d7215f3f7f8e16162ecc083 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 10 Oct 2013 20:15:26 +0200 Subject: [PATCH] Remove unused var declarations --- select2.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/select2.js b/select2.js index 3f05a931..7bd79eb9 100644 --- a/select2.js +++ b/select2.js @@ -654,7 +654,7 @@ the specific language governing permissions and limitations under the Apache Lic // abstract init: function (opts) { - var results, search, resultsSelector = ".select2-results", disabled, readonly; + var results, search, resultsSelector = ".select2-results"; // prepare options this.opts = opts = this.prepareOpts(opts); @@ -726,7 +726,7 @@ the specific language governing permissions and limitations under the Apache Lic // if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel if ($.fn.mousewheel) { results.mousewheel(function (e, delta, deltaX, deltaY) { - var top = results.scrollTop(), height; + var top = results.scrollTop(); if (deltaY > 0 && top - deltaY <= 0) { results.scrollTop(0); killEvent(e); @@ -852,7 +852,7 @@ the specific language governing permissions and limitations under the Apache Lic opts = $.extend({}, { populateResults: function(container, results, query) { - var populate, data, result, children, id=this.opts.id; + var populate, id=this.opts.id; populate=function(results, container, depth) { @@ -1009,8 +1009,6 @@ the specific language governing permissions and limitations under the Apache Lic sync = this.bind(function () { - var enabled, readonly, self = this; - // sync enabled state var disabled = el.prop("disabled"); if (disabled === undefined) disabled = false; @@ -1278,7 +1276,7 @@ the specific language governing permissions and limitations under the Apache Lic scroll = "scroll." + cid, resize = "resize."+cid, orient = "orientationchange."+cid, - mask, maskCss; + mask; this.container.addClass("select2-dropdown-open").addClass("select2-container-active"); @@ -1501,7 +1499,6 @@ the specific language governing permissions and limitations under the Apache Lic var results = this.results, more = results.find("li.select2-more-results"), below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible - offset = -1, // index of first element without data page = this.resultsPage + 1, self=this, term=this.search.val(), @@ -3019,7 +3016,7 @@ the specific language governing permissions and limitations under the Apache Lic // multi val: function (val, triggerChange) { - var oldData, self=this, changeDetails; + var oldData, self=this; if (arguments.length === 0) { return this.getVal();