소스 검색

added in a temp fix for select2 clearing

CauseFX 5 년 전
부모
커밋
fd212e1cae

+ 11 - 0
js/custom.js

@@ -252,6 +252,17 @@ function pageLoad(){
       },
       midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
     });
+    // select2 clear fix
+	var isClearClicked = false;
+	// trap these events
+	$('.select2-multiple').on('select2:opening', function(e) {
+		if (window['isClearClicked']) {
+			e.preventDefault();
+			window['isClearClicked'] = false;
+		}
+	}).on('select2:unselect', function(e) {
+		window['isClearClicked'] = true;
+	});
 
 }
 /* ===== Sidebar ===== */

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


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
plugins/bower_components/custom-select/custom-select.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 100
plugins/bower_components/custom-select/custom-select.js


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


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