Browse Source

Fix direct chat toggle trigger

Abdullah Almsaeed 8 years ago
parent
commit
30324f4f33
3 changed files with 6 additions and 8 deletions
  1. 3 4
      build/js/DirectChat.js
  2. 3 4
      dist/js/adminlte.js
  3. 0 0
      dist/js/adminlte.min.js

+ 3 - 4
build/js/DirectChat.js

@@ -26,9 +26,8 @@
     this.element = element
   }
 
-  DirectChat.prototype.toggle = function () {
-    var box = $(this).parents(Selector.box).first();
-    box.toggleClass(ClassName.open);
+  DirectChat.prototype.toggle = function ($trigger) {
+    $trigger.parents(Selector.box).first().toggleClass(ClassName.open)
   }
 
   // Plugin Definition
@@ -42,7 +41,7 @@
         $this.data(DataKey, (data = new DirectChat($this)))
       }
 
-      if (typeof option == 'string') data.toggle()
+      if (typeof option == 'string') data.toggle($this)
     })
   }
 

+ 3 - 4
dist/js/adminlte.js

@@ -953,9 +953,8 @@ throw new Error('AdminLTE requires jQuery')
     this.element = element
   }
 
-  DirectChat.prototype.toggle = function () {
-    var box = $(this).parents(Selector.box).first();
-    box.toggleClass(ClassName.open);
+  DirectChat.prototype.toggle = function ($trigger) {
+    $trigger.parents(Selector.box).first().toggleClass(ClassName.open)
   }
 
   // Plugin Definition
@@ -969,7 +968,7 @@ throw new Error('AdminLTE requires jQuery')
         $this.data(DataKey, (data = new DirectChat($this)))
       }
 
-      if (typeof option == 'string') data.toggle()
+      if (typeof option == 'string') data.toggle($this)
     })
   }
 

File diff suppressed because it is too large
+ 0 - 0
dist/js/adminlte.min.js


Some files were not shown because too many files changed in this diff