material_raingular 0.5.5 → 0.5.8
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2b9757f66f226da04042069022eddcaacfa0bd0
|
4
|
+
data.tar.gz: 97878f7b41057912ca7b2d8dcf4a06ccc3077d7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac2a3922290dcd942ab6fa0c20a104c0afa6ddacf59d22e8d6efd359e9b9eb3dcac3cc51dbbe8708a362f2465180d863aca35bfc720e78bc86b47308fe16dcd8
|
7
|
+
data.tar.gz: 9df84680fac873811d8a6cbcb063287544a08c9b318a47f202594ee8ade52c9e48ea9e6cb9ca65840fe9638156c096a9f300f2093970c76feb4c5e029c80d518
|
@@ -6,19 +6,27 @@ class DirectiveModels.MrUpdateModel extends AngularLinkModel
|
|
6
6
|
)
|
7
7
|
initialize: ->
|
8
8
|
[@ngModelCtrl,@mrCallbackCtrl] = @$controller
|
9
|
-
|
10
|
-
@
|
9
|
+
@parsed = Helpers.NgModelParse(@$attrs.ngModel,@$scope)
|
10
|
+
@atom = @parsed.pop()
|
11
|
+
@parent = @parsed.pop()
|
12
|
+
@parentVal = ->
|
13
|
+
@parsedScope = @$scope
|
14
|
+
@parsedScope = @$parse(atom)(@parsedScope) for atom in @parsed
|
15
|
+
@$parse(@parent)(@parsedScope)
|
11
16
|
@atomVal = @$parse(@atom)
|
12
17
|
@_resourcify()
|
13
18
|
@_bind()
|
14
19
|
|
15
20
|
@register(Directives.MrUpdate)
|
16
21
|
|
22
|
+
_klass: ->
|
23
|
+
@$attrs.mrUpdateKlass || @parent.classify()
|
17
24
|
_resourcify: ->
|
18
|
-
|
25
|
+
return unless @parentVal()
|
26
|
+
ActiveRecord.$Resource._resourcify(@parentVal(),@_klass())
|
19
27
|
_update: ->
|
20
28
|
@_resourcify()
|
21
|
-
@parentVal(
|
29
|
+
@parentVal().$save.bind(@parentVal())().then((data) => @mrCallbackCtrl?.evaluate(data))
|
22
30
|
_bind: -> @$timeout => @_bindInput()[@_funcName()]()
|
23
31
|
_bindInput: =>
|
24
32
|
radio: => @_boundUpdate('input',true)
|
@@ -32,7 +32,7 @@ class testDirective extends AngularDirectiveModel
|
|
32
32
|
class @AngularDirective extends AngularModel
|
33
33
|
# Automatically registers the controller to the module
|
34
34
|
@register: (app, name,type) ->
|
35
|
-
name ?= (@name || @toString().match(/function\s*(.*?)\(/)?[1]).
|
35
|
+
name ?= (@name || @toString().match(/function\s*(.*?)\(/)?[1]).underscore().camelize('lower')
|
36
36
|
app?[type || 'directive'] name, ['$injector', ($injector) => new @($injector)]
|
37
37
|
constructor: ($injector) ->
|
38
38
|
# Bind injected dependencies on scope ie @$scope
|
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.5.
|
4
|
+
version: 0.5.8
|
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-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|