enhanced tree collapse/expand to avoid flood slide animation on multiple clicks on one item
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
4
dist/js/adminlte.js
vendored
4
dist/js/adminlte.js
vendored
@@ -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);
|
||||
|
||||
|
||||
2
dist/js/adminlte.min.js
vendored
2
dist/js/adminlte.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user