material_raingular 0.0.2.2.alpha → 0.0.2.3.alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f4bafa4b82c0d39b72aeaa1a4f961eac083d006
4
- data.tar.gz: 48c3218cac0c9a8c0b3d876d96400f4d0af6e332
3
+ metadata.gz: 53cec1f68f957ec5a161879ce18d14516a181f88
4
+ data.tar.gz: e5f90ab5858ceb3b9b970d66ce94cc9e78f54098
5
5
  SHA512:
6
- metadata.gz: 67b192275c4c10e726f7052936fce35f457304fa47f455d5b6dc6f0527bde2839d45988faa280ebae2327ddf6bcb2a0888ce89be07a1137cf65263ded6eb4d34
7
- data.tar.gz: 8e8791473dc0f61654f27fc79cd3251a618f4639682de4670bc12fc1362f45fa64a4205ae906491455c1e2fedc41e49e0c584efec6c5c8e6bbc8d0b62670d1ee
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[factory].splice(dragged.scope[factory].indexOf(dragging),1)
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[factory], 'position')
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())
@@ -1,3 +1,4 @@
1
+ # //= require extensions
1
2
  # //= require angular
2
3
  # //= require angular-route
3
4
  # //= require angular-resource
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.0.2.2.alpha"
2
+ VERSION = "0.0.2.3.alpha"
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.0.2.2.alpha
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-10 00:00:00.000000000 Z
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