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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc749f7d20aec00899c6e0665acc60479e343b84
|
4
|
+
data.tar.gz: 14517c2d76d51b8c19c53696e0df5a22c4af7f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 =
|
6
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2017-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|