Skip to content

Commit

Permalink
renamed displayDuration to duration
Browse files Browse the repository at this point in the history
  • Loading branch information
kla committed Jan 13, 2012
1 parent 51ad5f4 commit b26cbd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions notificater.js.coffee
Expand Up @@ -2,10 +2,10 @@
$container = null $container = null
messages = [] messages = []
defaultOptions = defaultOptions =
displayDuration: 5000 duration: 5000
sticky: false # don't automatically close if true sticky: false # don't automatically close if true
closeable: true # show close button or not on sticky notifications closeable: true # show close button or not on sticky notifications
offset: [6, 0] # offset [top, left] offset: [6, 0] # offset [top, left]


add = (message, options={}) -> add = (message, options={}) ->
messages.push($.extend {}, {message: message}, defaultOptions, options) messages.push($.extend {}, {message: message}, defaultOptions, options)
Expand Down Expand Up @@ -37,7 +37,7 @@


renderNotification(msg = messages.shift()) renderNotification(msg = messages.shift())
$container.fadeIn() $container.fadeIn()
$container.delay(msg.displayDuration).fadeOut(render) unless msg.sticky $container.delay(msg.duration).fadeOut(render) unless msg.sticky


renderNotification = (msg) -> renderNotification = (msg) ->
$container.find(".message").html(msg.message) $container.find(".message").html(msg.message)
Expand Down

0 comments on commit b26cbd9

Please sign in to comment.