material_raingular 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/active_record/resource.coffee +1 -1
- data/lib/assets/javascripts/material_raingular/directives/update/linkmodel.coffee +12 -8
- data/lib/assets/javascripts/material_raingular/helpers/ng_model_parse.coffee +1 -1
- data/lib/material_raingular/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8401a779d087a25ab75288115308a11af7bf5b5d
|
4
|
+
data.tar.gz: c07a546372488214e5dd120a7355cb9278e7ccdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 200b208b40b443dbb57edeac6b5d714f0d97904d2719294b7003e2de77d7570ab4dcb05f1890393651aa92f1ba5e838b171a8c3c136db95e69c4437d1b856837
|
7
|
+
data.tar.gz: 5b4ba09d4eac45ed3998a85563b25be0c01f5dbcc7637ef00a1bfbe52423c43cf2041cd3c366b00ff229dbbcbc303e7e2cde33e10a8acde75d2859ab7cefa5e4
|
@@ -27,7 +27,7 @@ class ActiveRecord.$Resource extends Module
|
|
27
27
|
@$resolved = true
|
28
28
|
for key,val of response.data
|
29
29
|
@[key] = val if @[key] == @['$' + key + '_was'] || key in @$updatingKeys
|
30
|
-
@['$' + key + '_was'] = val unless key[0] in ['$','_']
|
30
|
+
@['$' + key + '_was'] = angular.copy(val) unless key[0] in ['$','_']
|
31
31
|
@$updatingKeys = []
|
32
32
|
return @
|
33
33
|
|
@@ -6,12 +6,16 @@ class DirectiveModels.MrUpdateModel extends AngularLinkModel
|
|
6
6
|
initialize: ->
|
7
7
|
[@ngModelCtrl,@mrCallbackCtrl] = @$controller
|
8
8
|
@parsed = Helpers.NgModelParse(@$attrs.ngModel,@$scope)
|
9
|
-
@atom
|
10
|
-
|
11
|
-
|
12
|
-
@
|
13
|
-
|
14
|
-
|
9
|
+
@atom = @parsed.pop()
|
10
|
+
if @$attrs.mrUpdate
|
11
|
+
@parent = @$attrs.mrUpdate
|
12
|
+
@parentVal = -> @$parse(@parent)(@$scope)
|
13
|
+
else
|
14
|
+
@parent = @parsed.pop()
|
15
|
+
@parentVal = ->
|
16
|
+
@parsedScope = @$scope
|
17
|
+
@parsedScope = @$parse(atom)(@parsedScope) for atom in @parsed
|
18
|
+
@$parse(@parent)(@parsedScope)
|
15
19
|
@atomVal = @$parse(@atom)
|
16
20
|
@_resourcify()
|
17
21
|
@_bind()
|
@@ -29,12 +33,12 @@ class DirectiveModels.MrUpdateModel extends AngularLinkModel
|
|
29
33
|
@parentVal().$save.bind(@parentVal())().then((data) => @mrCallbackCtrl?.evaluate(data))
|
30
34
|
_bind: -> @$timeout => @_bindInput()[@_funcName()]()
|
31
35
|
_bindInput: =>
|
32
|
-
radio: => @_boundUpdate('
|
36
|
+
radio: => @_boundUpdate('change',true)
|
33
37
|
date: => @_boundUpdate('input',true)
|
34
38
|
checkbox: => @_boundUpdate('click')
|
35
39
|
hidden: => @_watcher()
|
36
40
|
text: => @_bindText()
|
37
|
-
textarea: => @_bindDebounce(750,'
|
41
|
+
textarea: => @_bindDebounce(750,'input')
|
38
42
|
other: => @_watcher()
|
39
43
|
|
40
44
|
_boundUpdate: (binding,checkValid) ->
|
@@ -3,7 +3,7 @@ REGEXP = /(.+)(?:\.(.+)|\[(.+)?\])/
|
|
3
3
|
class Helpers.NgModelParse
|
4
4
|
constructor: (@model,@$scope) ->
|
5
5
|
parsed = []
|
6
|
-
returned = @model.match(REGEXP) || [null,@model]
|
6
|
+
returned = @model.toString().match(REGEXP) || [null,@model]
|
7
7
|
for res,index in returned.slice(1,3)
|
8
8
|
res ||= @$scope.$eval(returned[3])
|
9
9
|
parsed.merge(if returned[0] then Helpers.NgModelParse(res,@$scope) else [res])
|
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.6.
|
4
|
+
version: 0.6.7
|
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-08-
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|