瀏覽代碼

Tweak select2 integration

Thomas Rabaix 12 年之前
父節點
當前提交
200eb0c4af
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 2 1
      Resources/public/base.js
  2. 4 0
      Resources/views/standard_layout.html.twig

+ 2 - 1
Resources/public/base.js

@@ -19,7 +19,8 @@ var Admin = {
     setup_select2: function(subject) {
         if (window.SONATA_CONFIG && window.SONATA_CONFIG.USE_SELECT2 && window.Select2) {
             jQuery("select", subject).select2({
-                width: 'resolve'
+                width: 'resolve',
+                minimumResultsForSearch: 10
             });
         }
     },

+ 4 - 0
Resources/views/standard_layout.html.twig

@@ -39,6 +39,10 @@ file that was distributed with this source code.
                     div.select2-container {
                         margin-left: 0px !important;
                     }
+
+                    div.select2-drop ul {
+                        margin: 0px !important;
+                    }
                 </style>
             {% endif %}