Fix direct chat toggle trigger

pull/1498/head
Abdullah Almsaeed 2017-03-04 12:19:22 -05:00
parent 324bca9f14
commit 30324f4f33
3 changed files with 7 additions and 9 deletions

View File

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

7
dist/js/adminlte.js vendored
View File

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

File diff suppressed because one or more lines are too long