material_raingular 0.6.10 → 0.6.11

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: faa22bc91bab3129ed13ae71310ea5740630d96d
4
- data.tar.gz: e16ff6046e432bfec11c8c83f272bb15c618b578
3
+ metadata.gz: d445f0bfacc19a8033e265c429b9653c9307111e
4
+ data.tar.gz: 769cc6a6e50276bb9bce02f23575cee866cc85a9
5
5
  SHA512:
6
- metadata.gz: 560c997364ce335d5d21b7b414c25001e21c0aebbaa2941f71eb63d6a4e762861c73ea02e131c4f1a67d05d9f3ecc997119a4001105bf05e201a9b15e431a7c4
7
- data.tar.gz: 178aea0d96697a4a514ea76d668d40c3ae5b991a77ff82f461c0b244508203fe5fe575489f4390f6ec35778a6adc985b274674de8f3c5f6d23f0c2eebc924ad7
6
+ metadata.gz: f93fc031110a2000616fd151755982f785c6bd53f3c362f25ff5c0b0a9b61989231ae22a6034d774399c2eed1b54412edeb9ee39caa1700acb3a32a718aa2dbf
7
+ data.tar.gz: e41e9880c1252914a4bb8922966b94811034ed85437da1b77419354b87a2f83e810c47d35328bbd3a6a32e5d990b54b67b044194f18b1b412762de8aba0f4da2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- material_raingular (0.6.10)
4
+ material_raingular (0.6.11)
5
5
  js-routes
6
6
 
7
7
  GEM
@@ -1,4 +1,12 @@
1
1
  class ActiveRecord.$Collection extends Array
2
+ @isCollection: (obj) ->
3
+ return true if (obj instanceof @)
4
+ return false unless (obj instanceof Array)
5
+ return true if obj.$activeCollection
6
+ obj.$activeCollection = !!obj.reduce(((a,b) -> a?.$activeRecord || b?.$activeRecord),false)
7
+ return obj.$activeCollection
8
+
9
+ $activeCollection: true
2
10
  $inject: (args...) ->
3
11
  @$injector ||= angular.element(document.body).injector()
4
12
  @[item] = @$injector.get(item) for item in args
@@ -8,12 +8,14 @@ class $paramSerializer extends AngularServiceModel
8
8
  continue if val == obj['$' + key + '_was']
9
9
  continue if val?.toString() == obj['$' + key + '_was']?.toString()
10
10
  continue if [undefined,null].includes(val) && [undefined,null].includes(obj["$#{key}_was"])
11
+ continue if ActiveRecord.$Collection.isCollection(val)
11
12
  res[key] = val
12
13
  res
13
14
  strip: (obj) ->
14
15
  res = {}
15
16
  for key,val of obj
16
17
  continue if ['$','_'].includes(key[0]) || key in ['constructor','initialize']
18
+ continue if ActiveRecord.$Collection.isCollection(val)
17
19
  res[key] = if (typeof val == 'object' && val != null && !val instanceof Date) then @strip(val) else val
18
20
  res
19
21
  create: (obj) ->
@@ -26,7 +26,9 @@ class ActiveRecord.$Resource extends Module
26
26
  $processResponse: (response,apply) ->
27
27
  @$resolved = true
28
28
  for key,val of response.data
29
+ continue if key[0] in ['$','_']
29
30
  @[key] = val if angular.equals(@[key],@['$' + key + '_was'])# || key in @$updatingKeys
31
+ continue if ActiveRecord.$Collection.isCollection(val)
30
32
  @['$' + key + '_was'] = angular.copy(val) unless key[0] in ['$','_']
31
33
  # @$updatingKeys = []
32
34
  return @
@@ -8,7 +8,7 @@ class DirectiveModels.MrUploadModel extends AngularLinkModel
8
8
  [@ngModelCtrl,@mrCallbackCtrl] = @$controller
9
9
  [@model,@key] = Helpers.NgModelParse(@$attrs.ngModel,@$scope)
10
10
  @fileUpload = new Helpers.FileUpload(@$scope,@model,@key,@$element,@callback.bind(@),@$injector)
11
- @options = @$scope.$eval(@$attrs.mrUploadOptions)
11
+ @options = @$scope.$eval(@$attrs.mrUploadOptions || '{}')
12
12
  new Modules.MrUploadEvents(@$element,@fileUpload,@disabled)
13
13
  callback: (data) ->
14
14
  @$scope[@model][@key] = data[@key]
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.6.10"
2
+ VERSION = "0.6.11"
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.10
4
+ version: 0.6.11
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-09-18 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler