Reenabled unbind and undelegate of content area.
This commit is contained in:
parent
ac05ce5121
commit
46e56b821f
2 changed files with 13 additions and 4 deletions
|
@ -24,6 +24,11 @@ class App.Event
|
|||
_instance ?= new _Singleton
|
||||
_instance.unbindLevel(level)
|
||||
|
||||
@_allBindings: ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _Singleton
|
||||
_instance._allBindings()
|
||||
|
||||
class _Singleton
|
||||
|
||||
constructor: ->
|
||||
|
@ -80,3 +85,6 @@ class _Singleton
|
|||
eventList = events.split(' ')
|
||||
for event in eventList
|
||||
Spine.trigger event, data
|
||||
|
||||
_allBindings: ->
|
||||
@eventCurrent
|
|
@ -46,22 +46,23 @@ class App.Content extends Spine.Controller
|
|||
# remove events for page
|
||||
App.Event.unbindLevel('page')
|
||||
|
||||
# unbind in controller area
|
||||
@el.unbind()
|
||||
@el.undelegate()
|
||||
|
||||
# send current controller
|
||||
params_only = {}
|
||||
for i of params
|
||||
if typeof params[i] isnt 'object'
|
||||
params_only[i] = params[i]
|
||||
|
||||
# tell server what we are calling right now
|
||||
App.WebSocket.send(
|
||||
action: 'active_controller',
|
||||
controller: route,
|
||||
params: params_only,
|
||||
)
|
||||
|
||||
# unbind in controller area
|
||||
# @el.unbind()
|
||||
# @el.undelegate()
|
||||
|
||||
# remove waypoints
|
||||
$('footer').waypoint('remove')
|
||||
|
||||
|
|
Loading…
Reference in a new issue