material_raingular 0.3.0 → 0.3.1

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: e849b4413ab5d0ea74e9c93be9f0ccd3bcde92ef
4
- data.tar.gz: 01ff63bf054c3930763065ff3cb4ba29206ea11d
3
+ metadata.gz: dc749f7d20aec00899c6e0665acc60479e343b84
4
+ data.tar.gz: 14517c2d76d51b8c19c53696e0df5a22c4af7f2a
5
5
  SHA512:
6
- metadata.gz: ae8490d5e48a5489ec0184835d9846702c0d51477d3e65d6d2990d331c28ccac98cbe194c6b5ba14bbff5106c0a3927119a977ffa23616971e78c05eadfa8a18
7
- data.tar.gz: 871dd25b4ba62558de880b53b09010a02711a608aac3e8dd29a5f33a3cd10dd0fa201997150139ea6e6f054dc774a2f6db5f8dcd2c43fded4e0e663796fb6ea6
6
+ metadata.gz: b4bf8f1221db889af55584632ae5b37bab1dfaffe620022eb1f9d088ba456dfb6e8f93e156d80adfc0a8a700bf251aedb539904b8ed762eb401e0644936572d5
7
+ data.tar.gz: 006ae859bcb14c8424fd69ce653832b6a35c2854859a50a4bafa86538eff61682e055fd9a91320954466adebdec01b29125dc2f475ab077cc5f8ac25c5f58533
@@ -1,4 +1,5 @@
1
1
  # //= require material_raingular/directives/create/directive
2
+ # //= require material_raingular/helpers/ng_model_parse
2
3
  class MrCreateModel extends AngularLinkModel
3
4
  @inject(
4
5
  '$injector'
@@ -22,8 +23,7 @@ class MrCreateModel extends AngularLinkModel
22
23
 
23
24
  #Private
24
25
  _modelPieces: ->
25
- @$attrs.mrCreate.split(/\.|\[/).map (piece) =>
26
- if piece.includes(']') then @$scope.$eval(piece.replace(/\]/,'')) else piece
26
+ Helpers.NgModelParse(@$attrs.mrCreate,@$scope)
27
27
  _models: ->
28
28
  models = [@$scope]
29
29
  for piece,index in @_modelPieces()
@@ -2,5 +2,9 @@ REGEXP = /(.+)(?:\.(.+)|\[(.+)?\])/
2
2
  @Helpers ?= {}
3
3
  class Helpers.NgModelParse
4
4
  constructor: (@model,@$scope) ->
5
- parsed = @model.match(REGEXP)
6
- return [parsed[1], parsed[2] || @$scope.$eval(parsed[3])]
5
+ parsed = []
6
+ returned = @model.match(REGEXP) || [null,@model]
7
+ for res,index in returned.slice(1,3)
8
+ res ||= @$scope.$eval(returned[3])
9
+ parsed.merge(if returned[0] then Helpers.NgModelParse(res,@$scope) else [res])
10
+ return parsed
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_raingular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-17 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler