src/joosy/core/page.coffee in joosy-1.2.0.alpha.38 vs src/joosy/core/page.coffee in joosy-1.2.0.alpha.41
- old
+ new
@@ -213,11 +213,11 @@
@__layoutClass ||= ApplicationLayout
unless @halted = !@__runBeforeLoads(@params, @previous)
Joosy.Application.loading = true
- if !@previous?.layout?.uuid? || @previous?.__layoutClass != @__layoutClass
+ if !@previous?.layout?.uid? || @previous?.__layoutClass != @__layoutClass
@__bootstrapLayout()
else
@__bootstrap()
#
@@ -322,24 +322,22 @@
@wait "stageClear dataReceived", =>
@previous?.__afterPaint?(callbacksParams)
@__callSyncedThrough this, '__paint', callbacksParams, =>
# Page HTML
- @swapContainer @layout.content(), @__renderer(@data || {})
+ @swapContainer @layout.content(), @__renderDefault(@data || {})
@container = @layout.content()
# Loading
@__load()
- @layout.content()
-
@__callSyncedThrough @previous, '__erase', callbacksParams, =>
@previous?.__unload()
- @__callSyncedThrough this, '__beforePaint', callbacksParams, =>
+ @__callSyncedThrough @, '__beforePaint', callbacksParams, =>
@trigger 'stageClear'
- @__callSyncedThrough this, '__fetch', [], =>
+ @__callSyncedThrough @, '__fetch', [], =>
Joosy.Modules.Log.debugAs @, "Fetch complete"
@trigger 'dataReceived'
#
# The page+layout bootstrap logic
@@ -361,30 +359,25 @@
@__fixHeight()
@wait "stageClear dataReceived", =>
@__callSyncedThrough @layout, '__paint', callbacksParams, =>
# Layout HTML
- data = Joosy.Module.merge {}, @layout.data || {}
- data = Joosy.Module.merge data, yield: => @layout.yield()
+ @swapContainer Joosy.Application.content(), @layout.__renderDefault(@layout.data || {})
- @swapContainer Joosy.Application.content(), @layout.__renderer data
-
# Page HTML
- @swapContainer @layout.content(), @__renderer(@data || {})
+ @swapContainer @layout.content(), @__renderDefault(@data || {})
@container = @layout.content()
# Loading
@layout.__load Joosy.Application.content()
@__load()
- Joosy.Application.content()
-
@__callSyncedThrough @previous?.layout, '__erase', callbacksParams, =>
@previous?.layout?.__unload?()
@previous?.__unload()
@__callSyncedThrough @layout, '__beforePaint', callbacksParams, =>
@trigger 'stageClear'
@__callSyncedThrough @layout, '__fetch', [], =>
- @__callSyncedThrough this, '__fetch', [], =>
+ @__callSyncedThrough @, '__fetch', [], =>
Joosy.Modules.Log.debugAs @, "Fetch complete"
@trigger 'dataReceived'