Small improvements.
This commit is contained in:
parent
446794f0bd
commit
9df585ee37
2 changed files with 8 additions and 16 deletions
|
@ -1,10 +1,4 @@
|
|||
$ = jQuery.sub()
|
||||
Note = App.Note
|
||||
|
||||
$.fn.item = ->
|
||||
elementID = $(@).data('id')
|
||||
elementID or= $(@).parents('[data-id]').data('id')
|
||||
Note.find(elementID)
|
||||
|
||||
class Index extends App.Controller
|
||||
events:
|
||||
|
@ -63,6 +57,9 @@ class Index extends App.Controller
|
|||
|
||||
Spine.trigger 'navrebuild', data.session
|
||||
|
||||
# rebuild navbar with updated ticket count of overviews
|
||||
Spine.trigger 'navupdate_remote'
|
||||
|
||||
# add notify
|
||||
Spine.trigger 'notify:removeall'
|
||||
Spine.trigger 'notify', {
|
||||
|
@ -96,8 +93,3 @@ class Index extends App.Controller
|
|||
)
|
||||
|
||||
Config.Routes['login'] = Index
|
||||
|
||||
#class App.Login extends App.Router
|
||||
# routes:
|
||||
# 'login': Index
|
||||
#Config.Controller.push App.Login
|
|
@ -15,14 +15,14 @@ class App.Navigation extends Spine.Controller
|
|||
Spine.bind 'navrebuild', (user) =>
|
||||
@log 'navbarrebuild', user
|
||||
@render(user)
|
||||
@delay( @sync, 1600 )
|
||||
|
||||
Spine.bind 'navupdate_remote', (user) =>
|
||||
@log 'navupdate_remote'
|
||||
@sync
|
||||
@delay( @sync, 500 )
|
||||
|
||||
# rerender if new overview data is there
|
||||
@delay( @sync, 1600 )
|
||||
@delay( @sync, 800 )
|
||||
@delay( @sync, 2000 )
|
||||
|
||||
render: (user) ->
|
||||
# @log 'nav render', Config.NavBar
|
||||
|
@ -121,7 +121,7 @@ class App.Navigation extends Spine.Controller
|
|||
clearInterval(@intervalID) if @intervalID
|
||||
|
||||
# request new data
|
||||
@intervalID = every 40000, () =>
|
||||
@intervalID = every 30000, () =>
|
||||
@ticket_overview()
|
||||
|
||||
# get data
|
||||
|
|
Loading…
Reference in a new issue