upgraded docs, fixed cursor show when clickToHide:false, bumped to 0.3.2

This commit is contained in:
Jaime Pillora
2014-06-29 01:02:42 +10:00
parent d5a49073ec
commit 2f88823b00
16 changed files with 296 additions and 127 deletions
+9 -4
View File
@@ -84,6 +84,9 @@ coreStyle =
display: none;
z-index: 1;
position: absolute;
}
.#{pluginClassName}-hidable {
cursor: pointer;
}
@@ -278,6 +281,7 @@ class Notification
@loadHTML()
@wrapper = $(coreStyle.html)
@wrapper.addClass "#{pluginClassName}-hidable" if @options.clickToHide
@wrapper.data pluginClassName, @
@arrow = @wrapper.find ".#{pluginClassName}-arrow"
@container = @wrapper.find ".#{pluginClassName}-container"
@@ -559,8 +563,9 @@ $ ->
insertCSS(coreStyle.css).attr('id', 'core-notify')
#watch all notifications clicks
$(document).on 'click notify-hide', ".#{pluginClassName}-wrapper", (e) ->
inst = $(@).data pluginClassName
if inst and (inst.options.clickToHide or e.type is 'notify-hide')
inst.show false
$(document).on 'click', ".#{pluginClassName}-hidable", (e) ->
$(@).trigger 'notify-hide'
$(document).on 'notify-hide', ".#{pluginClassName}-wrapper", (e) ->
$(@).data(pluginClassName)?.show false