Skip to content

Commit

Permalink
Fixed the blinker bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bragaadeesh committed Apr 17, 2012
1 parent bf5cb68 commit e5bb402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions app/assets/javascripts/routers/entries.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Btob.Routers.Entries extends Backbone.Router
@new_collection = new Btob.Collections.Entries()
@new_collection.on('reset', @repopuplate, this)
window.setInterval(@refreshFromServer, 2000);
window.onfocus = @stopBlink
index: ->
view = new Btob.Views.EntriesIndex(collection: @collection)
$('#container').html(view.render().el)
Expand All @@ -24,8 +25,6 @@ class Btob.Routers.Entries extends Backbone.Router
if @new_collection.length > 0
@collection.add(@new_collection.models)
blinkTitle('You have a new Message','iTach')





stopBlink: ->
stopBlinkTitle()
2 changes: 1 addition & 1 deletion app/assets/templates/entries/index.jst.eco
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>iTach</h1>

<form id="new_entry">
<input type="text" name="message" id="new_entry_message" onfocus="stopBlinkTitle()"/>
<input type="text" name="message" id="new_entry_message"/>
<input type="submit" value="SEND"/>
</form>

Expand Down

0 comments on commit e5bb402

Please sign in to comment.