소스 검색

Fixed multiple selection placeholders

Due to a change in 7edf0e3ebe700850a0f68c8c25f3381509d78f03 that
made the rendered selection take up the full width of the selection
container, the placeholder was not being automatically displayed.
The calculations were always turning out negative, which has been
fixed by not trying to automatically calculate the best possible
width.
Kevin Brown 10 년 전
부모
커밋
a6c4215976
7개의 변경된 파일5개의 추가작업 그리고 25개의 파일을 삭제
  1. 1 5
      dist/js/select2.amd.full.js
  2. 1 5
      dist/js/select2.amd.js
  3. 1 5
      dist/js/select2.full.js
  4. 0 0
      dist/js/select2.full.min.js
  5. 1 5
      dist/js/select2.js
  6. 0 0
      dist/js/select2.min.js
  7. 1 5
      src/js/select2/selection/search.js

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

@@ -1211,11 +1211,7 @@ define('select2/selection/search',[
     var width = '';
 
     if (this.$search.attr('placeholder') !== '') {
-      width = this.$selection.innerWidth();
-      width -= this.$selection.find('.select2-selection__rendered')
-                              .innerWidth();
-
-      width = width + 'px';
+      width = this.$selection.find('.select2-selection__rendered').innerWidth();
     } else {
       var minimumWidth = this.$search.val().length + 1;
 

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

@@ -1211,11 +1211,7 @@ define('select2/selection/search',[
     var width = '';
 
     if (this.$search.attr('placeholder') !== '') {
-      width = this.$selection.innerWidth();
-      width -= this.$selection.find('.select2-selection__rendered')
-                              .innerWidth();
-
-      width = width + 'px';
+      width = this.$selection.find('.select2-selection__rendered').innerWidth();
     } else {
       var minimumWidth = this.$search.val().length + 1;
 

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

@@ -10746,11 +10746,7 @@ define('select2/selection/search',[
     var width = '';
 
     if (this.$search.attr('placeholder') !== '') {
-      width = this.$selection.innerWidth();
-      width -= this.$selection.find('.select2-selection__rendered')
-                              .innerWidth();
-
-      width = width + 'px';
+      width = this.$selection.find('.select2-selection__rendered').innerWidth();
     } else {
       var minimumWidth = this.$search.val().length + 1;
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/js/select2.full.min.js


+ 1 - 5
dist/js/select2.js

@@ -1639,11 +1639,7 @@ define('select2/selection/search',[
     var width = '';
 
     if (this.$search.attr('placeholder') !== '') {
-      width = this.$selection.innerWidth();
-      width -= this.$selection.find('.select2-selection__rendered')
-                              .innerWidth();
-
-      width = width + 'px';
+      width = this.$selection.find('.select2-selection__rendered').innerWidth();
     } else {
       var minimumWidth = this.$search.val().length + 1;
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/js/select2.min.js


+ 1 - 5
src/js/select2/selection/search.js

@@ -118,11 +118,7 @@ define([
     var width = '';
 
     if (this.$search.attr('placeholder') !== '') {
-      width = this.$selection.innerWidth();
-      width -= this.$selection.find('.select2-selection__rendered')
-                              .innerWidth();
-
-      width = width + 'px';
+      width = this.$selection.find('.select2-selection__rendered').innerWidth();
     } else {
       var minimumWidth = this.$search.val().length + 1;
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.