From 0081716841ee83335d0c143062ac17b35473ab39 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sat, 30 Aug 2014 17:46:34 -0400 Subject: [PATCH] Header and footer decorators Added examples of header and footer decorators. --- dist/js/select2.amd.full.js | 2 +- dist/js/select2.amd.js | 2 +- dist/js/select2.full.js | 2 +- dist/js/select2.js | 2 +- playground/basic/decorators.html | 33 +++++++++++++++++++++++++++++--- src/js/select2/options.js | 2 +- 6 files changed, 35 insertions(+), 8 deletions(-) diff --git a/dist/js/select2.amd.full.js b/dist/js/select2.amd.full.js index cddc8bee..e2738ebf 100644 --- a/dist/js/select2.amd.full.js +++ b/dist/js/select2.amd.full.js @@ -507,7 +507,7 @@ define('select2/options',[ this.dataAdapter = SelectData; this.resultsAdapter = ResultsList; - this.dropdownAdapter = Dropdown; + this.dropdownAdapter = options.dropdownAdapter || Dropdown; this.selectionAdapter = options.selectionAdapter; if (this.selectionAdapter == null) { diff --git a/dist/js/select2.amd.js b/dist/js/select2.amd.js index cddc8bee..e2738ebf 100644 --- a/dist/js/select2.amd.js +++ b/dist/js/select2.amd.js @@ -507,7 +507,7 @@ define('select2/options',[ this.dataAdapter = SelectData; this.resultsAdapter = ResultsList; - this.dropdownAdapter = Dropdown; + this.dropdownAdapter = options.dropdownAdapter || Dropdown; this.selectionAdapter = options.selectionAdapter; if (this.selectionAdapter == null) { diff --git a/dist/js/select2.full.js b/dist/js/select2.full.js index d9573e7f..f61d2daa 100644 --- a/dist/js/select2.full.js +++ b/dist/js/select2.full.js @@ -10044,7 +10044,7 @@ define('select2/options',[ this.dataAdapter = SelectData; this.resultsAdapter = ResultsList; - this.dropdownAdapter = Dropdown; + this.dropdownAdapter = options.dropdownAdapter || Dropdown; this.selectionAdapter = options.selectionAdapter; if (this.selectionAdapter == null) { diff --git a/dist/js/select2.js b/dist/js/select2.js index 14d04fa4..125ee08a 100644 --- a/dist/js/select2.js +++ b/dist/js/select2.js @@ -935,7 +935,7 @@ define('select2/options',[ this.dataAdapter = SelectData; this.resultsAdapter = ResultsList; - this.dropdownAdapter = Dropdown; + this.dropdownAdapter = options.dropdownAdapter || Dropdown; this.selectionAdapter = options.selectionAdapter; if (this.selectionAdapter == null) { diff --git a/playground/basic/decorators.html b/playground/basic/decorators.html index 90b42ab0..706b9b5f 100644 --- a/playground/basic/decorators.html +++ b/playground/basic/decorators.html @@ -152,7 +152,8 @@ diff --git a/src/js/select2/options.js b/src/js/select2/options.js index 1a0589c4..dce6212e 100644 --- a/src/js/select2/options.js +++ b/src/js/select2/options.js @@ -11,7 +11,7 @@ define([ this.dataAdapter = SelectData; this.resultsAdapter = ResultsList; - this.dropdownAdapter = Dropdown; + this.dropdownAdapter = options.dropdownAdapter || Dropdown; this.selectionAdapter = options.selectionAdapter; if (this.selectionAdapter == null) {