material_raingular 0.2.6.3 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d42e83b2720719a4987e85a0341b647f8367bf3b
|
4
|
+
data.tar.gz: 35eeb19e0c0144e59f1f77080ea083865902174b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 386470016b611811e5d550e5e65af1cbafbab6bf590b3c3e7c3e09d521e975fc1ea18bfa348aa57b54ba17f2cc79f3380175fe6f82f60491528697317b9c711c
|
7
|
+
data.tar.gz: ad4a55398c0a9ded90129e617126fa84533e643749836a0d24bed84cc34255757e03b4a19dfc87bd5b5a3a125e02ebc3cfd9c7327454836bcae763f577425fb6
|
@@ -24,11 +24,17 @@ class RailsUpdate
|
|
24
24
|
atomName = if typeof @atomName == 'function' then @atomName(@scope) else @atomName
|
25
25
|
@value = if @override then @scope.$eval(atomName) else value
|
26
26
|
object = {id: @scope.$eval(@modelName).id}
|
27
|
-
object
|
27
|
+
if object.id
|
28
|
+
func = 'update'
|
29
|
+
object[@railsName] = {}
|
30
|
+
else
|
31
|
+
object[@railsName] = @scope.$eval(@modelName)
|
32
|
+
func = 'create'
|
28
33
|
object[@railsName][atomName] = value
|
29
34
|
unless @scope[@modelName].currently_updating.includes(atomName)
|
30
35
|
@scope[@modelName].currently_updating.push(atomName)
|
31
|
-
@factory
|
36
|
+
@factory[func] object, (returnData) =>
|
37
|
+
@scope.$eval(@modelName).id = returnData.id if returnData.id
|
32
38
|
@scope[@modelName].currently_updating.drop(atomName)
|
33
39
|
unless @equiv(@ngModelCtrl.$viewValue,returnData[@atomName])
|
34
40
|
@ngModelCtrl.$setModelValue = returnData[@atomName]
|
@@ -9,6 +9,8 @@ class @AdminRouteModel extends AngularRouteModel
|
|
9
9
|
controller: 'Admin'
|
10
10
|
personName: -> #'/person/name'
|
11
11
|
controller: 'Admin'
|
12
|
+
time__cards: -> #'/time_cards'
|
13
|
+
return {}
|
12
14
|
otherwise: ->
|
13
15
|
redirectTo: '/'
|
14
16
|
@register(angular.app)
|
@@ -19,12 +21,14 @@ class @AngularRouteModel extends AngularModel
|
|
19
21
|
constructor: ($routeProvider,$locationProvider)->
|
20
22
|
for key, val of @constructor.prototype
|
21
23
|
continue if key in ['constructor', 'initialize']
|
24
|
+
obj = val()
|
25
|
+
obj.template ||= '' unless obj.templateUrl
|
22
26
|
unless key in ['default','otherwise']
|
23
|
-
route = key.replace(
|
27
|
+
route = key.replace(/\_/g,'/:').underscore().replace(/\_/g,'/').replace(/\/\:\/\:/g,'_')
|
24
28
|
route = '/' + route unless route[0] is '/'
|
25
|
-
$routeProvider.when(route,
|
29
|
+
$routeProvider.when(route,obj)
|
26
30
|
else if key == 'default'
|
27
|
-
$routeProvider.when('/',
|
31
|
+
$routeProvider.when('/',obj)
|
28
32
|
else
|
29
|
-
$routeProvider.otherwise(
|
33
|
+
$routeProvider.otherwise(obj)
|
30
34
|
return $routeProvider
|
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.2.
|
4
|
+
version: 0.2.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: 2016-12-
|
11
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|