Reenabled unbind and undelegate of content area.

This commit is contained in:
Martin Edenhofer 2012-10-25 23:27:12 +02:00
parent ac05ce5121
commit 46e56b821f
2 changed files with 13 additions and 4 deletions

View file

@ -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

View file

@ -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')