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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f734875fd5a0c95120b65ee5fe901840220d0db
4
- data.tar.gz: 71cd93c617255ad32a8c75dd74d0e3ec1112ef8f
3
+ metadata.gz: 8401a779d087a25ab75288115308a11af7bf5b5d
4
+ data.tar.gz: c07a546372488214e5dd120a7355cb9278e7ccdc
5
5
  SHA512:
6
- metadata.gz: 76ba6e88119e3e1dcec19a527bb355de728cdab4da100f721e985b82bc9a59c56fad547b54183fe69473a61edc7c93a03d2b745c0d95e858f5b42467704ca3b3
7
- data.tar.gz: cac15f39f749eb6e08651157280da98bf823fe6ba8ae594ce31d7f022bb35b589def0f8e031d476e089a6820364d392bbb13b674f8065549b05b7417b49b52ad
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 = @parsed.pop()
10
- @parent = @parsed.pop()
11
- @parentVal = ->
12
- @parsedScope = @$scope
13
- @parsedScope = @$parse(atom)(@parsedScope) for atom in @parsed
14
- @$parse(@parent)(@parsedScope)
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('input',true)
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,'keyup')
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])
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
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.6.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-18 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler