From 41c3d4cfc4b0797ba112c83101e2b2ac7dd9e506 Mon Sep 17 00:00:00 2001 From: pj Date: Wed, 8 Jan 2014 17:56:23 +0200 Subject: [PATCH] Removed hardcoded class names from $.fn.select2. The code now uses the exports accessible through window.Select2 to instantiate widgets, allowing the environment to replace or extend those classes globally. --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index bd1f2da5..45906ff7 100644 --- a/select2.js +++ b/select2.js @@ -3185,7 +3185,7 @@ the specific language governing permissions and limitations under the Apache Lic if ("tags" in opts) {opts.multiple = multiple = true;} } - select2 = multiple ? new MultiSelect2() : new SingleSelect2(); + select2 = multiple ? new window.Select2["class"].multi() : window.Select2["class"].single(); select2.init(opts); } else if (typeof(args[0]) === "string") {