material_raingular 0.1.5.6 → 0.1.5.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: 87900cb5cfda046b66f490c362d69815a356ecfc
|
4
|
+
data.tar.gz: 903cad3836f5f800e41105557abf660bb7ebe9e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0fda726acb4457345625ccf31e73a6b01c6eff27b7818994dba3dff82cef514428f6b98cf07a51f46c18a3916e8634e06e48ce66f0e45dcff1fbe5e32fe22e1
|
7
|
+
data.tar.gz: 364dc80a2a99d10e29575375d52f856d17c852cf04b3a3cc0c9c34acdac66e1f55e31f00a951cb80e8abb2b65ace9127df4c3922da91c5b7224e22af7e65fd9e
|
@@ -3,15 +3,20 @@ angular.module('NgSortable', [])
|
|
3
3
|
template: (element) ->
|
4
4
|
'<span>' + element[0].innerHTML + '</span><i class="sort"></i>'
|
5
5
|
link: (scope,element,attributes) ->
|
6
|
+
scopeName = attributes.ngScopeName || scope.$id
|
7
|
+
angular.sortableField = {} unless angular.sortableField
|
8
|
+
angular.sortableField[scopeName] = {sortableReverse: false} unless angular.sortableField[scopeName]
|
6
9
|
scope.sortableField = (resource)->
|
7
|
-
return resource.position unless !!
|
8
|
-
|
10
|
+
return resource.position unless !!angular.sortableField[scopeName].howToSortField
|
11
|
+
angular.sortableField[scopeName].howToSortField(resource)
|
12
|
+
scope.sortableReverse = ->
|
13
|
+
angular.sortableField[scopeName].sortableReverse
|
9
14
|
sortableFunc = $parse(attributes.ngSortable)
|
10
15
|
icon = element.find('i')
|
11
16
|
if Object.keys(attributes).includes('ngInitialSort')
|
12
|
-
|
17
|
+
angular.sortableField[scopeName].howToSortField = sortableFunc
|
13
18
|
if attributes.ngInitialSort == 'reverse'
|
14
|
-
|
19
|
+
angular.sortableField[scopeName].sortableReverse = true
|
15
20
|
icon.addClass('up')
|
16
21
|
else
|
17
22
|
icon.addClass('down')
|
@@ -19,12 +24,13 @@ angular.module('NgSortable', [])
|
|
19
24
|
element.parent().find('i').removeClass('up')
|
20
25
|
element.parent().find('i').removeClass('down')
|
21
26
|
scope.$apply ->
|
22
|
-
if
|
23
|
-
|
27
|
+
if angular.sortableField[scopeName].howToSortField == sortableFunc
|
28
|
+
angular.sortableField[scopeName].sortableReverse = !angular.sortableField[scopeName].sortableReverse
|
24
29
|
else
|
25
|
-
|
26
|
-
|
27
|
-
|
30
|
+
angular.sortableField[scopeName].sortableReverse = false
|
31
|
+
angular.sortableField[scopeName].howToSortFieldi = attributes.ngSortable
|
32
|
+
angular.sortableField[scopeName].howToSortField = sortableFunc
|
33
|
+
if angular.sortableField[scopeName].sortableReverse == false
|
28
34
|
icon.addClass('down')
|
29
35
|
icon.removeClass('up')
|
30
36
|
else
|
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.1.5.
|
4
|
+
version: 0.1.5.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-
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.4.
|
147
|
+
rubygems_version: 2.4.8
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Angular v1.4 for rails. Angular Material v0.9.8.
|