pinkman 0.9.9.6 → 0.9.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 073fb5fcc0f954e4377b65558dce2feae071c49c
4
- data.tar.gz: 111fa9aec310abea7f535e3a9b230d754c95599b
3
+ metadata.gz: 9caffc3e42b845186f5a910dd96830c08480f81b
4
+ data.tar.gz: eadac33dd19f672c63cdf77ac35713dcc34e9c13
5
5
  SHA512:
6
- metadata.gz: 5ac52b2e517cafe3dbeb8dee1fc669151ac61786cded8800ce31e8ff91a97742bf206e2543f103a15e7568a10098889afa70a289b4d09c62612d5e178fa02f12
7
- data.tar.gz: 0c8e720d3377a9e8ae498a9980de537f02718f98e11253d25bddb51ad7d07ad7868290673559d20721324daa885e05570614726629ae5cbac1b931cdd3a6d80c
6
+ metadata.gz: 095dad6700ed3379c76bf20a0b0839abb5a836ccaecf92a5ea002f6287ad119ac2ad3d56dbe036532901e1ded39c118553f26ffdca4b844b57794228fa38fa33
7
+ data.tar.gz: 09c1f794ea225ffc05e1d2618ccb4becea3d3986e3965f8c04b882963f59d7f5393519f8efee66542af43bc795885263f8094f1d062ab5fc6c244b8688f083d7
@@ -62,7 +62,7 @@ class window.PinkmanPath extends Pinkman.object
62
62
  # receives a string and matches it through the defined routes
63
63
  class window.PinkmanRouteMatcher extends Pinkman.object
64
64
 
65
- initialize: ->
65
+ initialize: (callback) ->
66
66
  if @controllers.any()?
67
67
  Pinkman.controllers.unbindScrolling()
68
68
  # console.log 'clear dos Pinkman.controllers'
@@ -70,6 +70,8 @@ class window.PinkmanRouteMatcher extends Pinkman.object
70
70
  # console.log 'dentro dos controllers desse router'
71
71
  c.setParams(@params())
72
72
  c.build(yes)
73
+ , =>
74
+ callback(this.route, this.url) if typeof callback == 'function'
73
75
  else
74
76
  false
75
77
 
@@ -154,7 +156,9 @@ class window.PinkmanRouter
154
156
  Pinkman.state.initialize()
155
157
  yieldIn = r.route.yieldIn() || @_config.yield
156
158
  $(yieldIn).html("<div class='pink-yield' id='#{r.controller}'></div>") if r.route.blank
157
- r.initialize()
159
+ r.initialize (args...) =>
160
+ callback() if typeof callback == 'function'
161
+ @_config.callback(args...) if typeof @_config.callback == 'function'
158
162
  Pinkman.routes.set('current',r.route)
159
163
  unless Pinkman.router._config.freeze or (r.options? and r.options.freeze)
160
164
  # console.log 'topo'
@@ -162,7 +166,6 @@ class window.PinkmanRouter
162
166
  else
163
167
  sleep 0.15, =>
164
168
  @restoreWindowScroll(r.route.controller)
165
- callback() if typeof callback == 'function'
166
169
  true
167
170
 
168
171
  # Search path throughout routes. On match, activate respective controllers: clears template and execute main(s) function(s)
@@ -1,3 +1,3 @@
1
1
  module Pinkman
2
- VERSION = "0.9.9.6"
2
+ VERSION = "0.9.9.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinkman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.6
4
+ version: 0.9.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agilso Oliveira