소스 검색

enhanced tree collapse/expand to avoid flood slide animation on multiple clicks on one item

REJack 5 년 전
부모
커밋
d204bc1e3c
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      build/js/Tree.js
  2. 2 2
      dist/js/adminlte.js
  3. 0 0
      dist/js/adminlte.min.js

+ 2 - 2
build/js/Tree.js

@@ -82,7 +82,7 @@
     }
 
     parent.addClass(ClassName.open);
-    tree.slideDown(this.options.animationSpeed, function () {
+    tree.stop().slideDown(this.options.animationSpeed, function () {
       $(this.element).trigger(expandedEvent);
       parent.height('auto');
     }.bind(this));
@@ -93,7 +93,7 @@
 
     //tree.find(Selector.open).removeClass(ClassName.open);
     parentLi.removeClass(ClassName.open);
-    tree.slideUp(this.options.animationSpeed, function () {
+    tree.stop().slideUp(this.options.animationSpeed, function () {
       //tree.find(Selector.open + ' > ' + Selector.treeview).slideUp();
       $(this.element).trigger(collapsedEvent);
 

+ 2 - 2
dist/js/adminlte.js

@@ -909,7 +909,7 @@ throw new Error('AdminLTE requires jQuery')
     }
 
     parent.addClass(ClassName.open);
-    tree.slideDown(this.options.animationSpeed, function () {
+    tree.stop().slideDown(this.options.animationSpeed, function () {
       $(this.element).trigger(expandedEvent);
       parent.height('auto');
     }.bind(this));
@@ -920,7 +920,7 @@ throw new Error('AdminLTE requires jQuery')
 
     //tree.find(Selector.open).removeClass(ClassName.open);
     parentLi.removeClass(ClassName.open);
-    tree.slideUp(this.options.animationSpeed, function () {
+    tree.stop().slideUp(this.options.animationSpeed, function () {
       //tree.find(Selector.open + ' > ' + Selector.treeview).slideUp();
       $(this.element).trigger(collapsedEvent);
 

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


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