Commit 6db86f2c authored by Alexander Yakovlev's avatar Alexander Yakovlev
Browse files

added "viewinit" trigger

parent edfa605b
......@@ -404,7 +404,7 @@ class Salet
# Do the first state.
@doTransitionTo(@start)
@getRoom = (name) ->
@getRoom = (name) ->
if @rooms[name]?
return @rooms[name]
return undefined
......
......@@ -36,6 +36,7 @@ class SaletView
event.preventDefault()
return salet.saveGame()
)
document.trigger("viewinit")
@disableSaving = () ->
$("#save").addClass('disabled')
@enableSaving = () ->
......@@ -287,6 +288,7 @@ class SaletView
@showBlock(".ways #ways_hint")
else
@hideBlock(".ways #ways_hint", false)
@cycleLink = (content) ->
return "<a href='./_replacer_cyclewriter' class='cycle' id='cyclewriter'>#{content}</a>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment