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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/assets/javascripts/active_record/collection.coffee +8 -0
- data/lib/assets/javascripts/active_record/param_serializer.coffee +2 -0
- data/lib/assets/javascripts/active_record/resource.coffee +2 -0
- data/lib/assets/javascripts/material_raingular/directives/upload/linkmodel.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: d445f0bfacc19a8033e265c429b9653c9307111e
|
4
|
+
data.tar.gz: 769cc6a6e50276bb9bce02f23575cee866cc85a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f93fc031110a2000616fd151755982f785c6bd53f3c362f25ff5c0b0a9b61989231ae22a6034d774399c2eed1b54412edeb9ee39caa1700acb3a32a718aa2dbf
|
7
|
+
data.tar.gz: e41e9880c1252914a4bb8922966b94811034ed85437da1b77419354b87a2f83e810c47d35328bbd3a6a32e5d990b54b67b044194f18b1b412762de8aba0f4da2
|
data/Gemfile.lock
CHANGED
@@ -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]
|
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.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-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|