nali 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ Nali.extend Application:
6
6
  defaultUrl: 'home'
7
7
  notFoundUrl: 'home'
8
8
  htmlContainer: 'body'
9
- title: 'Application'
9
+ title: 'Welcome to Nali'
10
10
  keepAliveDelay: 20
11
11
 
12
12
  run: ( options ) ->
@@ -15,7 +15,9 @@ Nali.extend Collection:
15
15
  @
16
16
 
17
17
  refilter: ->
18
- @model.each ( model ) => @add model if model.isCorrect( @filters ) and not ( model in @ )
18
+ @model.each ( model ) =>
19
+ if isCorrect = model.isCorrect( @filters ) and not ( model in @ ) then @add model
20
+ else if not isCorrect and model in @ then @remove model
19
21
  @
20
22
 
21
23
  new: ( model, filters ) ->
@@ -336,7 +336,7 @@ Nali.extend Model:
336
336
  unless ( view = @views[ name ] )?
337
337
  if ( view = @::views[ name ] )?
338
338
  view = @views[ name ] = view.clone model: @
339
- else console.error "View %s of model %O does not exist", name, @
339
+ else console.error 'View "%s" of model "%s" does not exist', name, @_name
340
340
  view
341
341
 
342
342
  show: ( name, insertTo ) ->
@@ -261,7 +261,7 @@ Nali.extend View:
261
261
  @
262
262
 
263
263
  addYieldAssistant: ( node ) ->
264
- ( @yield = node.parentNode ).removeChild node
264
+ ( @yield = @_ node.parentNode )[0].removeChild node
265
265
 
266
266
  addRelationAssistant: ( node ) ->
267
267
  [ match, name, chain ] = node.textContent.match /{\s*(\w+) of @(\w*)\s*}/
@@ -4,6 +4,8 @@ Nali.View.extend HomeIndex:
4
4
 
5
5
  helpers: {}
6
6
 
7
+ onDraw: ->
8
+
7
9
  onShow: ->
8
10
 
9
11
  onHide: ->
data/lib/nali/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Nali
2
2
 
3
- VERSION = '0.3.1'
3
+ VERSION = '0.3.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-01 00:00:00.000000000 Z
12
+ date: 2014-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin