joosy 1.2.0.alpha.41 → 1.2.0.alpha.51
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gruntfile.coffee +27 -7
- data/bin/joosy +1 -1
- data/bower.json +3 -2
- data/build/joosy/extensions/preloaders.js +189 -0
- data/build/joosy/extensions/resources-form.js +588 -0
- data/build/joosy/extensions/resources.js +673 -0
- data/build/joosy.js +2395 -0
- data/{src/joosy/generators → generators}/base.coffee +2 -2
- data/{src/joosy/generators → generators/command}/command.coffee +16 -3
- data/generators/command/help.coffee +38 -0
- data/{src/joosy/generators → generators}/layout.coffee +0 -0
- data/{src/joosy/generators → generators}/page.coffee +0 -0
- data/{src/joosy/generators → generators}/project/base.coffee +2 -4
- data/{src/joosy/generators → generators}/project/standalone.coffee +4 -3
- data/{src/joosy/generators → generators}/project.coffee +0 -0
- data/generators/templates/application/base/application.coffee +13 -0
- data/{templates → generators/templates}/application/base/helpers/application.coffee +0 -0
- data/{templates → generators/templates}/application/base/layouts/application.coffee +0 -0
- data/{templates → generators/templates}/application/base/pages/application.coffee +0 -0
- data/{templates → generators/templates}/application/base/pages/welcome/index.coffee +0 -0
- data/{templates → generators/templates}/application/base/routes.coffee +0 -0
- data/{templates → generators/templates}/application/base/templates/layouts/application.jst.hamlc +0 -0
- data/{templates → generators/templates}/application/base/templates/pages/welcome/index.jst.hamlc +0 -0
- data/{templates → generators/templates}/application/standalone/Gruntfile.coffee +1 -0
- data/{templates → generators/templates}/application/standalone/Procfile +0 -0
- data/{templates → generators/templates}/application/standalone/_gitignore +0 -0
- data/generators/templates/application/standalone/bower.json +17 -0
- data/{templates → generators/templates}/application/standalone/package.json +0 -0
- data/{templates → generators/templates}/application/standalone/source/haml/index.haml +0 -0
- data/{templates → generators/templates}/application/standalone/source/stylesheets/application.styl +0 -0
- data/{templates → generators/templates}/layout/basic.coffee +0 -0
- data/{templates → generators/templates}/layout/namespaced.coffee +0 -0
- data/{templates → generators/templates}/page/basic.coffee +0 -0
- data/{templates → generators/templates}/page/namespaced.coffee +0 -0
- data/{templates → generators/templates}/widget/basic.coffee +0 -0
- data/{templates → generators/templates}/widget/namespaced.coffee +0 -0
- data/{src/joosy/generators → generators}/widget.coffee +0 -0
- data/lib/joosy.rb +3 -3
- data/package.json +2 -3
- data/source/joosy/application.coffee +95 -0
- data/source/joosy/events/namespace.coffee +24 -0
- data/{src → source}/joosy/extensions/preloaders/caching.coffee +0 -0
- data/{src → source}/joosy/extensions/preloaders/index.coffee +0 -0
- data/{src → source}/joosy/extensions/preloaders/inline.coffee +0 -0
- data/{src → source}/joosy/extensions/resources/base.coffee +16 -8
- data/{src → source}/joosy/extensions/resources/collection.coffee +0 -0
- data/{src → source}/joosy/extensions/resources/index.coffee +0 -0
- data/{src → source}/joosy/extensions/resources/rest.coffee +0 -0
- data/{src → source}/joosy/extensions/resources/rest_collection.coffee +0 -0
- data/{src → source}/joosy/extensions/resources-form/form.coffee +18 -18
- data/{src → source}/joosy/extensions/resources-form/helpers/form.coffee +6 -6
- data/{src → source}/joosy/extensions/resources-form/index.coffee +0 -0
- data/source/joosy/helpers/routes.coffee +10 -0
- data/source/joosy/helpers/view.coffee +115 -0
- data/{src/joosy/core → source/joosy}/helpers/widgets.coffee +1 -1
- data/{src/joosy/core → source/joosy}/joosy.coffee +59 -19
- data/source/joosy/layout.coffee +73 -0
- data/{src/joosy/core → source/joosy}/module.coffee +7 -2
- data/{src/joosy/core/modules/container.coffee → source/joosy/modules/dom.coffee} +24 -17
- data/source/joosy/modules/events.coffee +156 -0
- data/source/joosy/modules/filters.coffee +67 -0
- data/{src/joosy/core → source/joosy}/modules/log.coffee +7 -3
- data/source/joosy/modules/page/scrolling.coffee +51 -0
- data/source/joosy/modules/page/title.coffee +18 -0
- data/{src/joosy/core → source/joosy}/modules/renderer.coffee +12 -13
- data/{src/joosy/core → source/joosy}/modules/time_manager.coffee +5 -1
- data/{src/joosy/core → source/joosy}/modules/widgets_manager.coffee +9 -5
- data/source/joosy/page.coffee +68 -0
- data/{src/joosy/core → source/joosy}/resources/watcher.coffee +5 -1
- data/source/joosy/router.coffee +305 -0
- data/{src/joosy/core → source/joosy}/templaters/jst.coffee +10 -7
- data/source/joosy/widget.coffee +385 -0
- data/source/joosy.coffee +1 -0
- data/{src/vendor → source}/metamorph.coffee +0 -0
- data/spec/helpers/matchers.coffee +8 -1
- data/spec/joosy/core/application_spec.coffee +121 -20
- data/spec/joosy/core/helpers/view_spec.coffee +3 -3
- data/spec/joosy/core/helpers/widgets_spec.coffee +3 -6
- data/spec/joosy/core/joosy_spec.coffee +0 -5
- data/spec/joosy/core/layout_spec.coffee +2 -28
- data/spec/joosy/core/modules/dom_spec.coffee +133 -0
- data/spec/joosy/core/modules/events_spec.coffee +16 -9
- data/spec/joosy/core/modules/filters_spec.coffee +232 -89
- data/spec/joosy/core/modules/log_spec.coffee +2 -2
- data/spec/joosy/core/modules/renderer_spec.coffee +8 -4
- data/spec/joosy/core/page_spec.coffee +2 -201
- data/spec/joosy/core/router_spec.coffee +295 -233
- data/spec/joosy/core/templaters/jst_spec.coffee +1 -1
- data/spec/joosy/core/widget_spec.coffee +373 -34
- data/spec/joosy/environments/amd_spec.coffee +38 -0
- data/spec/joosy/environments/global_spec.coffee +21 -0
- data/spec/joosy/extensions/form/form_spec.coffee +18 -18
- data/spec/joosy/extensions/form/helpers/forms_spec.coffee +1 -1
- data/spec/joosy/extensions/resources/base_spec.coffee +23 -11
- data/tasks/joosy.coffee +6 -9
- metadata +75 -69
- data/lib/extensions/preloaders.js +0 -193
- data/lib/extensions/resources-form.js +0 -592
- data/lib/extensions/resources.js +0 -675
- data/lib/joosy.js +0 -2199
- data/spec/joosy/core/modules/container_spec.coffee +0 -153
- data/spec/joosy/core/modules/widget_manager_spec.coffee +0 -96
- data/src/joosy/core/application.coffee +0 -59
- data/src/joosy/core/helpers/view.coffee +0 -52
- data/src/joosy/core/layout.coffee +0 -174
- data/src/joosy/core/modules/events.coffee +0 -188
- data/src/joosy/core/modules/filters.coffee +0 -42
- data/src/joosy/core/page.coffee +0 -383
- data/src/joosy/core/router.coffee +0 -313
- data/src/joosy/core/widget.coffee +0 -88
- data/src/joosy.coffee +0 -1
- data/templates/application/base/application.coffee +0 -9
- data/templates/application/standalone/bower.json +0 -7
@@ -1,313 +0,0 @@
|
|
1
|
-
#= require joosy/core/joosy
|
2
|
-
|
3
|
-
#
|
4
|
-
# Router. Reacts on a hash change event and loads proper pages
|
5
|
-
#
|
6
|
-
# Example:
|
7
|
-
# Joosy.Router.map
|
8
|
-
# 404 : (path) -> alert "Page '#{path}' was not found :("
|
9
|
-
# '/' : Welcome.IndexPage
|
10
|
-
# '/resources' :
|
11
|
-
# '/' : Resource.IndexPage
|
12
|
-
# '/:id' : Resource.ShowPage
|
13
|
-
# '/:id/edit' : Resource.EditPage
|
14
|
-
# '/new' : Resource.EditPage
|
15
|
-
#
|
16
|
-
# @mixin
|
17
|
-
#
|
18
|
-
Joosy.Router =
|
19
|
-
#
|
20
|
-
# The Object containing route parts in keys and pages/lambdas in values
|
21
|
-
#
|
22
|
-
rawRoutes: Object.extended()
|
23
|
-
|
24
|
-
#
|
25
|
-
# Flattern routes mapped to regexps (to check if current route is what we
|
26
|
-
# need) and actual executors
|
27
|
-
#
|
28
|
-
routes: Object.extended()
|
29
|
-
|
30
|
-
#
|
31
|
-
# The regexp to restrict the next loading url. By default set to false and
|
32
|
-
# therefore no restrictions apply.
|
33
|
-
#
|
34
|
-
restrictPattern: false
|
35
|
-
|
36
|
-
#
|
37
|
-
# TODO: Write readme
|
38
|
-
#
|
39
|
-
__namespace: ""
|
40
|
-
__asNamespace: ""
|
41
|
-
|
42
|
-
#
|
43
|
-
# Global url prefix
|
44
|
-
#
|
45
|
-
prefix: ''
|
46
|
-
|
47
|
-
#
|
48
|
-
# Set the restriction pattern. If the requested url does not match this it
|
49
|
-
# will not load. Set `false` to avoid check.
|
50
|
-
#
|
51
|
-
restrict: (@restrictPattern) ->
|
52
|
-
|
53
|
-
#
|
54
|
-
# Clears the routes
|
55
|
-
#
|
56
|
-
reset: ->
|
57
|
-
@rawRoutes = Object.extended()
|
58
|
-
@routes = Object.extended()
|
59
|
-
@__namespace = ""
|
60
|
-
@__asNamespace = ""
|
61
|
-
|
62
|
-
|
63
|
-
#
|
64
|
-
# Draws the routes similar to Ruby on Rails
|
65
|
-
#
|
66
|
-
# @param [Function] block callback for child commands
|
67
|
-
#
|
68
|
-
draw: (block)->
|
69
|
-
block.call(this) if Object.isFunction(block)
|
70
|
-
|
71
|
-
#
|
72
|
-
# Registers the set of raw routes
|
73
|
-
# This method will only store routes and will not make them act immediately
|
74
|
-
# Routes get registered only once at system initialization during #__setupRoutes call
|
75
|
-
#
|
76
|
-
# @param [Object] routes Set of routes in inner format (see class description)
|
77
|
-
#
|
78
|
-
map: (routes) ->
|
79
|
-
Joosy.Module.merge @rawRoutes, routes
|
80
|
-
|
81
|
-
#
|
82
|
-
# Changes current hash and therefore triggers new route loading
|
83
|
-
# to be loaded
|
84
|
-
#
|
85
|
-
# @param [String] to Route to navigate to
|
86
|
-
#
|
87
|
-
# @option options [Boolean] respond If false just changes hash without responding
|
88
|
-
# @option options [Boolean] replaceState If true uses replaces history entry instead of adding. Works only in browsers supporting history.pushState
|
89
|
-
#
|
90
|
-
navigate: (to, options={}) ->
|
91
|
-
path = to
|
92
|
-
path = path.substr(1) if path[0] == '#'
|
93
|
-
path = @prefix + path unless path.startsWith(@prefix)
|
94
|
-
|
95
|
-
if options.respond != false
|
96
|
-
location.hash = path
|
97
|
-
else
|
98
|
-
if !history.pushState
|
99
|
-
@__ignoreRequest = to
|
100
|
-
location.hash = path
|
101
|
-
setTimeout (=> @__ignoreRequest = false), 0
|
102
|
-
else
|
103
|
-
history[if options.replaceState then 'replaceState' else 'pushState'] {}, '', '#'+path
|
104
|
-
|
105
|
-
#
|
106
|
-
# Match route (ads it to @rawRoutes)
|
107
|
-
#
|
108
|
-
# @param [String] route similar to ones sent in map hash
|
109
|
-
#
|
110
|
-
# @param options [String] to function to which the route routes
|
111
|
-
# @option options [String] as name of the route, used for reverse routing
|
112
|
-
#
|
113
|
-
match: (route, options={}) ->
|
114
|
-
if @__asNamespace
|
115
|
-
as = @__asNamespace + options["as"].capitalize()
|
116
|
-
else
|
117
|
-
as = options["as"]
|
118
|
-
|
119
|
-
routeName = @__namespace + route
|
120
|
-
|
121
|
-
map = {}
|
122
|
-
map[route] = options["to"]
|
123
|
-
|
124
|
-
Joosy.Module.merge @rawRoutes, map
|
125
|
-
|
126
|
-
@__injectReverseUrl(as, routeName)
|
127
|
-
|
128
|
-
#
|
129
|
-
# Shortcut to match "/"
|
130
|
-
#
|
131
|
-
# @param options [String] to function to which the route routes
|
132
|
-
# @option options [String] as name of the route, used for reverse routing
|
133
|
-
# default it is "root"
|
134
|
-
#
|
135
|
-
root: (options={}) ->
|
136
|
-
as = options["as"] || "root"
|
137
|
-
@match("/", to: options["to"], as: as)
|
138
|
-
|
139
|
-
#
|
140
|
-
# Routes the 404
|
141
|
-
#
|
142
|
-
# @param options [String] to function to which the route routes
|
143
|
-
#
|
144
|
-
notFound: (options={}) ->
|
145
|
-
@match(404, to: options["to"])
|
146
|
-
|
147
|
-
#
|
148
|
-
# Namespaces a match route
|
149
|
-
#
|
150
|
-
# @param [String] name name of the namespace, prefixes other commands
|
151
|
-
#
|
152
|
-
# @option [Hash] options "as", prefixes all other "as" commands
|
153
|
-
# @param [Function] block callback for child commands
|
154
|
-
namespace: (name, options={}, block) ->
|
155
|
-
if Object.isFunction(options)
|
156
|
-
block = options
|
157
|
-
options = {}
|
158
|
-
|
159
|
-
newScope = $.extend({}, this)
|
160
|
-
newScope.rawRoutes = {}
|
161
|
-
newScope.__namespace += name
|
162
|
-
newScope.__asNamespace += "#{options["as"]}" if options["as"]
|
163
|
-
block.call(newScope) if Object.isFunction(block)
|
164
|
-
@rawRoutes[name] = newScope.rawRoutes
|
165
|
-
|
166
|
-
#
|
167
|
-
# Inits the routing system and loads the current route
|
168
|
-
# Binds the window hashchange event and therefore should only be called once
|
169
|
-
# during system startup
|
170
|
-
#
|
171
|
-
__setupRoutes: ->
|
172
|
-
$(window).on 'hashchange', =>
|
173
|
-
unless @__ignoreRequest && location.hash.match(@__ignoreRequest)
|
174
|
-
@__respondRoute location.hash
|
175
|
-
|
176
|
-
@__prepareRoutes @rawRoutes
|
177
|
-
@__respondRoute location.hash
|
178
|
-
|
179
|
-
#
|
180
|
-
# Compiles routes to map object
|
181
|
-
# Object will contain regexp string as key and lambda/Page to load as value
|
182
|
-
#
|
183
|
-
# @param [Object] routes Raw routes to prepare
|
184
|
-
# @param [String] namespace Inner cursor for recursion
|
185
|
-
#
|
186
|
-
__prepareRoutes: (routes, namespace='') ->
|
187
|
-
if !namespace && routes[404]
|
188
|
-
@wildcardAction = routes[404]
|
189
|
-
delete routes[404]
|
190
|
-
|
191
|
-
Object.each routes, (path, response) =>
|
192
|
-
path = (namespace + path).replace /\/{2,}/, '/'
|
193
|
-
if response && (Object.isFunction(response) || response.prototype?)
|
194
|
-
Joosy.Module.merge @routes, @__prepareRoute(path, response)
|
195
|
-
else
|
196
|
-
@__prepareRoutes response, path
|
197
|
-
|
198
|
-
#
|
199
|
-
# Compiles one single route
|
200
|
-
#
|
201
|
-
# @param [String] path Full path from raw route
|
202
|
-
# @param [Joosy.Page] response Page that should be loaded at this route
|
203
|
-
# @param [Function] response Lambda to call at this route
|
204
|
-
#
|
205
|
-
__prepareRoute: (path, response) ->
|
206
|
-
matchPath = path.replace(/\/:([^\/]+)/g, '/([^/]+)').replace(/^\/?/, '^/?').replace(/\/?$/, '/?$')
|
207
|
-
result = Object.extended()
|
208
|
-
|
209
|
-
result[matchPath] =
|
210
|
-
capture: (path.match(/\/:[^\/]+/g) || []).map (str) ->
|
211
|
-
str.substr 2
|
212
|
-
action: response
|
213
|
-
result
|
214
|
-
|
215
|
-
#
|
216
|
-
# Searches the corresponding route through compiled routes
|
217
|
-
#
|
218
|
-
# @param [String] hash Hash value to search route for
|
219
|
-
#
|
220
|
-
__respondRoute: (hash) ->
|
221
|
-
Joosy.Modules.Log.debug "Router> Answering '#{hash}'"
|
222
|
-
fullPath = hash.replace ///^\#(#{@prefix})?///, ''
|
223
|
-
|
224
|
-
if (@restrictPattern && fullPath.match(@restrictPattern) == null)
|
225
|
-
@trigger 'restricted', fullPath
|
226
|
-
return
|
227
|
-
else
|
228
|
-
@trigger 'responded', fullPath
|
229
|
-
|
230
|
-
@currentPath = fullPath
|
231
|
-
found = false
|
232
|
-
queryArray = fullPath.split '&'
|
233
|
-
path = queryArray.shift()
|
234
|
-
urlParams = @__paramsFromQueryArray queryArray
|
235
|
-
|
236
|
-
for regex, route of @routes when @routes.hasOwnProperty regex
|
237
|
-
if vals = path.match new RegExp(regex)
|
238
|
-
params = @__paramsFromRouteMatch(vals, route).merge urlParams
|
239
|
-
|
240
|
-
if Joosy.Module.hasAncestor route.action, Joosy.Page
|
241
|
-
Joosy.Application.setCurrentPage route.action, params
|
242
|
-
else
|
243
|
-
route.action.call this, params
|
244
|
-
|
245
|
-
found = true
|
246
|
-
break
|
247
|
-
|
248
|
-
if !found && @wildcardAction?
|
249
|
-
if Joosy.Module.hasAncestor @wildcardAction, Joosy.Page
|
250
|
-
Joosy.Application.setCurrentPage @wildcardAction, urlParams
|
251
|
-
else
|
252
|
-
@wildcardAction path, urlParams
|
253
|
-
|
254
|
-
#
|
255
|
-
# Collects params from route placeholders (/foo/:placeholder)
|
256
|
-
#
|
257
|
-
# @param [Array] vals Array of value gathered by regexp
|
258
|
-
# @param [Object] route Compiled route
|
259
|
-
# @returns [Object] Hash of params
|
260
|
-
#
|
261
|
-
__paramsFromRouteMatch: (vals, route) ->
|
262
|
-
params = Object.extended()
|
263
|
-
|
264
|
-
vals.shift()
|
265
|
-
for param in route.capture
|
266
|
-
params[param] = vals.shift()
|
267
|
-
|
268
|
-
params
|
269
|
-
|
270
|
-
#
|
271
|
-
# Collects params from query routes (/foo/&a=b)
|
272
|
-
#
|
273
|
-
# @param [Array] queryArray Array of query string split by '&' sign
|
274
|
-
# @returns [Object] Hash of params
|
275
|
-
#
|
276
|
-
__paramsFromQueryArray: (queryArray) ->
|
277
|
-
params = Object.extended()
|
278
|
-
|
279
|
-
if queryArray
|
280
|
-
$.each queryArray, ->
|
281
|
-
unless @isBlank()
|
282
|
-
pair = @split '='
|
283
|
-
params[pair[0]] = pair[1]
|
284
|
-
|
285
|
-
params
|
286
|
-
|
287
|
-
#
|
288
|
-
# Injects reverse routing function into global namespace
|
289
|
-
# @param [String] as The name for the route, ex: for "projects"
|
290
|
-
# builds "projects_url" and "projects_path" functions
|
291
|
-
# @param [String] route Entire route, joined by namespaces, ex:
|
292
|
-
# "/projects/":
|
293
|
-
# "/:id" :
|
294
|
-
# "/edit": TestPage
|
295
|
-
# joins to "/projects/:id/edit"
|
296
|
-
#
|
297
|
-
__injectReverseUrl: (as, route) ->
|
298
|
-
return if as == undefined
|
299
|
-
|
300
|
-
fnc = (options) =>
|
301
|
-
url = route
|
302
|
-
(route.match(/\/:[^\/]+/g) || []).each (str) ->
|
303
|
-
url = url.replace(str.substr(1), options[str.substr(2)])
|
304
|
-
"##{@prefix}#{url}"
|
305
|
-
|
306
|
-
Joosy.Helpers.Application["#{as}Path"] = (options) ->
|
307
|
-
fnc(options)
|
308
|
-
|
309
|
-
Joosy.Helpers.Application["#{as}Url"] = (options) ->
|
310
|
-
url = 'http://' + window.location.host + window.location.pathname
|
311
|
-
"#{url}#{fnc(options)}"
|
312
|
-
|
313
|
-
Joosy.Module.merge Joosy.Router, Joosy.Modules.Events
|
@@ -1,88 +0,0 @@
|
|
1
|
-
#= require joosy/core/joosy
|
2
|
-
#= require joosy/core/modules/log
|
3
|
-
#= require joosy/core/modules/events
|
4
|
-
#= require joosy/core/modules/container
|
5
|
-
#= require joosy/core/modules/renderer
|
6
|
-
#= require joosy/core/modules/filters
|
7
|
-
|
8
|
-
#
|
9
|
-
# Base class for all of your Joosy Layouts.
|
10
|
-
#
|
11
|
-
# @todo Add link to the 5th chapter of guides here.
|
12
|
-
#
|
13
|
-
# @example Sample widget
|
14
|
-
# class @FooWidget extends Joosy.Widget
|
15
|
-
# @view 'foo'
|
16
|
-
#
|
17
|
-
# @include Joosy.Modules.Log
|
18
|
-
# @include Joosy.Modules.Events
|
19
|
-
# @include Joosy.Modules.Container
|
20
|
-
# @include Joosy.Modules.Renderer
|
21
|
-
# @include Joosy.Modules.Filters
|
22
|
-
# @include Joosy.Modules.TimeManager
|
23
|
-
#
|
24
|
-
class Joosy.Widget extends Joosy.Module
|
25
|
-
@include Joosy.Modules.Log
|
26
|
-
@include Joosy.Modules.Events
|
27
|
-
@include Joosy.Modules.Container
|
28
|
-
@include Joosy.Modules.Renderer
|
29
|
-
@include Joosy.Modules.Filters
|
30
|
-
@include Joosy.Modules.TimeManager
|
31
|
-
@include Joosy.Modules.WidgetsManager
|
32
|
-
|
33
|
-
#
|
34
|
-
# By default widget will not render on load
|
35
|
-
#
|
36
|
-
__renderDefault: false
|
37
|
-
|
38
|
-
#
|
39
|
-
# Initial data that will be passed to view on load
|
40
|
-
# False (and not {}) by default to have a chance to check if data was loaded
|
41
|
-
#
|
42
|
-
data: false
|
43
|
-
|
44
|
-
#
|
45
|
-
# Proxy to Joosy.Router.navigate
|
46
|
-
#
|
47
|
-
navigate: (args...) ->
|
48
|
-
Joosy.Router.navigate args...
|
49
|
-
|
50
|
-
#
|
51
|
-
# This is required by {Joosy.Modules.Renderer}
|
52
|
-
# Sets the base template dir to app_name/templates/widgets
|
53
|
-
#
|
54
|
-
__renderSection: ->
|
55
|
-
'widgets'
|
56
|
-
|
57
|
-
#
|
58
|
-
# Widget bootstrap proccess
|
59
|
-
#
|
60
|
-
# * Rendering (if required)
|
61
|
-
# * {Joosy.Modules.Container.__assignElements}
|
62
|
-
# * {Joosy.Modules.Container.__delegateEvents}
|
63
|
-
#
|
64
|
-
# @param [Joosy.Page, Joosy.Layout] Page or Layout to attach to
|
65
|
-
# @param [jQuery] container Container to attach to
|
66
|
-
#
|
67
|
-
__load: (@parent, @container, render=true) ->
|
68
|
-
@__runBeforeLoads()
|
69
|
-
if render && @__renderDefault
|
70
|
-
@swapContainer @container, @__renderDefault(@data || {})
|
71
|
-
@__assignElements()
|
72
|
-
@__delegateEvents()
|
73
|
-
@__setupWidgets()
|
74
|
-
@__runAfterLoads()
|
75
|
-
|
76
|
-
this
|
77
|
-
|
78
|
-
#
|
79
|
-
# Layout destruction proccess.
|
80
|
-
#
|
81
|
-
# * {Joosy.Modules.TimeManager.__clearTime}
|
82
|
-
# * {Joosy.Modules.Renderer.__removeMetamorphs}
|
83
|
-
#
|
84
|
-
__unload: ->
|
85
|
-
@__clearTime()
|
86
|
-
@__unloadWidgets()
|
87
|
-
@__removeMetamorphs()
|
88
|
-
@__runAfterUnloads()
|
data/src/joosy.coffee
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
#= require_tree ./joosy/core
|