فهرست منبع

Fix automatically hiding the placeholder

The placeholder will not only be automatically hidden if the
results adapter was not already overridden. This will allow users
to override the results adapter to now hide the placeholder, if
they do not want that functionality.
Kevin Brown 10 سال پیش
والد
کامیت
b87a4a55e4
7فایلهای تغییر یافته به همراه35 افزوده شده و 25 حذف شده
  1. 7 5
      dist/js/select2.amd.full.js
  2. 7 5
      dist/js/select2.amd.js
  3. 7 5
      dist/js/select2.full.js
  4. 0 0
      dist/js/select2.full.min.js
  5. 7 5
      dist/js/select2.js
  6. 0 0
      dist/js/select2.min.js
  7. 7 5
      src/js/select2/defaults.js

+ 7 - 5
dist/js/select2.amd.full.js

@@ -1496,6 +1496,13 @@ define('select2/defaults',[
 
     if (options.resultsAdapter == null) {
       options.resultsAdapter = ResultsList;
+
+      if (options.placeholder != null) {
+        options.resultsAdapter = Utils.Decorate(
+          options.resultsAdapter,
+          HidePlaceholder
+        );
+      }
     }
 
     if (options.dropdownAdapter == null) {
@@ -1517,11 +1524,6 @@ define('select2/defaults',[
           options.selectionAdapter,
           Placeholder
         );
-
-        options.resultsAdapter = Utils.Decorate(
-          options.resultsAdapter,
-          HidePlaceholder
-        );
       }
     }
 

+ 7 - 5
dist/js/select2.amd.js

@@ -1496,6 +1496,13 @@ define('select2/defaults',[
 
     if (options.resultsAdapter == null) {
       options.resultsAdapter = ResultsList;
+
+      if (options.placeholder != null) {
+        options.resultsAdapter = Utils.Decorate(
+          options.resultsAdapter,
+          HidePlaceholder
+        );
+      }
     }
 
     if (options.dropdownAdapter == null) {
@@ -1517,11 +1524,6 @@ define('select2/defaults',[
           options.selectionAdapter,
           Placeholder
         );
-
-        options.resultsAdapter = Utils.Decorate(
-          options.resultsAdapter,
-          HidePlaceholder
-        );
       }
     }
 

+ 7 - 5
dist/js/select2.full.js

@@ -11031,6 +11031,13 @@ define('select2/defaults',[
 
     if (options.resultsAdapter == null) {
       options.resultsAdapter = ResultsList;
+
+      if (options.placeholder != null) {
+        options.resultsAdapter = Utils.Decorate(
+          options.resultsAdapter,
+          HidePlaceholder
+        );
+      }
     }
 
     if (options.dropdownAdapter == null) {
@@ -11052,11 +11059,6 @@ define('select2/defaults',[
           options.selectionAdapter,
           Placeholder
         );
-
-        options.resultsAdapter = Utils.Decorate(
-          options.resultsAdapter,
-          HidePlaceholder
-        );
       }
     }
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/js/select2.full.min.js


+ 7 - 5
dist/js/select2.js

@@ -1924,6 +1924,13 @@ define('select2/defaults',[
 
     if (options.resultsAdapter == null) {
       options.resultsAdapter = ResultsList;
+
+      if (options.placeholder != null) {
+        options.resultsAdapter = Utils.Decorate(
+          options.resultsAdapter,
+          HidePlaceholder
+        );
+      }
     }
 
     if (options.dropdownAdapter == null) {
@@ -1945,11 +1952,6 @@ define('select2/defaults',[
           options.selectionAdapter,
           Placeholder
         );
-
-        options.resultsAdapter = Utils.Decorate(
-          options.resultsAdapter,
-          HidePlaceholder
-        );
       }
     }
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/js/select2.min.js


+ 7 - 5
src/js/select2/defaults.js

@@ -48,6 +48,13 @@ define([
 
     if (options.resultsAdapter == null) {
       options.resultsAdapter = ResultsList;
+
+      if (options.placeholder != null) {
+        options.resultsAdapter = Utils.Decorate(
+          options.resultsAdapter,
+          HidePlaceholder
+        );
+      }
     }
 
     if (options.dropdownAdapter == null) {
@@ -69,11 +76,6 @@ define([
           options.selectionAdapter,
           Placeholder
         );
-
-        options.resultsAdapter = Utils.Decorate(
-          options.resultsAdapter,
-          HidePlaceholder
-        );
       }
     }
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است