material_raingular 0.0.2.2.alpha → 0.0.2.3.alpha
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/directives/ngdrag.js.coffee +5 -4
- data/lib/assets/javascripts/directives/ngupdate.js.coffee +0 -1
- data/lib/assets/javascripts/extensions.coffee +16 -0
- data/lib/assets/javascripts/material_raingular.js.coffee +1 -0
- data/lib/material_raingular/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53cec1f68f957ec5a161879ce18d14516a181f88
|
4
|
+
data.tar.gz: e5f90ab5858ceb3b9b970d66ce94cc9e78f54098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec5bc8104e7edc57703b2edc40295f1e5cbd2b9ff74df9e34db57a5d499a18c1fc2fecdc2a62339709d10253a7914e05261115e1311d6537b8470b639d62c92c
|
7
|
+
data.tar.gz: 7fa94c461fa78505c9c3e2d8f966ed7df8c5ae376554a1d4e2d3ef14409e051060643051cf13b2f09fcb21011194e4545bc6fbe16049636275f18327147e9ef6
|
@@ -43,13 +43,14 @@ angular.module('NgDrag', [])
|
|
43
43
|
for word in raw_factory
|
44
44
|
factory.push(word.charAt(0).toUpperCase() + word.slice(1))
|
45
45
|
factory = factory.join('')
|
46
|
+
list_name = attributes.ngParent || factory
|
46
47
|
dragged = DragHolder.get()
|
47
48
|
dragging = dragged.scope[dragged.dragging]
|
48
49
|
if dragged.context
|
49
50
|
draggingContext = dragged.scope[dragged.context]
|
50
51
|
droppingContext = scope[attributes.ngContext]
|
51
52
|
if draggingContext != droppingContext
|
52
|
-
dragged.scope[
|
53
|
+
dragged.scope[list_name].drop(dragging)
|
53
54
|
scope[factory].push(dragging)
|
54
55
|
dropping = scope[attributes.ngPositionable]
|
55
56
|
if attributes.ngDisabled
|
@@ -60,11 +61,11 @@ angular.module('NgDrag', [])
|
|
60
61
|
else
|
61
62
|
bool = false
|
62
63
|
unless bool
|
63
|
-
scope.setPosition(dragging,dropping,draggingContext,droppingContext,attributes.ngContext,factory)
|
64
|
+
scope.setPosition(dragging,dropping,draggingContext,droppingContext,attributes.ngContext,factory,list_name)
|
64
65
|
controller: ($scope, $element, $filter, $injector) ->
|
65
|
-
$scope.setPosition = (dragging,dropping,draggingContext,droppingContext,context,factory) ->
|
66
|
+
$scope.setPosition = (dragging,dropping,draggingContext,droppingContext,context,factory,list_name) ->
|
66
67
|
unless dragging == dropping
|
67
|
-
orderedArray = $filter('orderBy')($scope[
|
68
|
+
orderedArray = $filter('orderBy')($scope[list_name], 'position')
|
68
69
|
index = orderedArray.indexOf(dropping)
|
69
70
|
unless dragging == orderedArray[index - 1]
|
70
71
|
unless index == 0
|
@@ -92,7 +92,6 @@ angular.module 'NgUpdate', ['Factories', 'FactoryName']
|
|
92
92
|
list = $injector.get(factory)
|
93
93
|
|
94
94
|
unless scope[data[0]].currently_updating
|
95
|
-
console.dir scope[data[0]].currently_updating
|
96
95
|
scope[data[0]].currently_updating = true
|
97
96
|
list.update object, (returnData) ->
|
98
97
|
scope[data[0]].currently_updating = false
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Array.prototype.min = ->
|
2
|
+
return Math.min.apply(null,this)
|
3
|
+
Array.prototype.max = ->
|
4
|
+
return Math.max.apply(null,this)
|
5
|
+
Array.prototype.sum = ->
|
6
|
+
total = 0
|
7
|
+
for i in this
|
8
|
+
total += parseFloat(i) if i
|
9
|
+
total
|
10
|
+
Array.prototype.includes = (entry)->
|
11
|
+
this.indexOf(entry) > -1
|
12
|
+
Array.prototype.drop = (entry)->
|
13
|
+
this.splice(this.indexOf(entry),1)
|
14
|
+
String.prototype.titleize = ->
|
15
|
+
return this.replace(/\_/g,' ').replace(/\b[a-z]/g, (letter)->
|
16
|
+
return letter[0].toUpperCase())
|
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.0.2.
|
4
|
+
version: 0.0.2.3.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Moody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- lib/assets/javascripts/directives/table.js.coffee
|
93
93
|
- lib/assets/javascripts/directives/textarea.coffee
|
94
94
|
- lib/assets/javascripts/directives/video.js.coffee
|
95
|
+
- lib/assets/javascripts/extensions.coffee
|
95
96
|
- lib/assets/javascripts/factory_name.js.coffee
|
96
97
|
- lib/assets/javascripts/identifier_interceptor.js.coffee
|
97
98
|
- lib/assets/javascripts/material_raingular.js.coffee
|