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: 59a9545f417c657e7d89f1e04b11709a3881d24d
4
- data.tar.gz: aa2000cc97a512d745269f2df766d433bc5ac715
3
+ metadata.gz: 87900cb5cfda046b66f490c362d69815a356ecfc
4
+ data.tar.gz: 903cad3836f5f800e41105557abf660bb7ebe9e6
5
5
  SHA512:
6
- metadata.gz: d867df5b880ad63b2d84edfe952c9657a66ee39a59eb6d6038d702ea05c8f6cf8fd9367e4935e48071ba847a0ad79f2e47e3b67a169673bc533708e6b722e9cc
7
- data.tar.gz: ad5d51e3f4b6f83da301c08fb0d50622060b14c758c2f7b82a0b62f4a694b0fd140a2638bc3da60375e3cebecf8f2ce9d921ac97eaac4e8e536578f271a0f949
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 !!scope.howToSortField
8
- scope.howToSortField(resource)
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
- scope.howToSortField = sortableFunc
17
+ angular.sortableField[scopeName].howToSortField = sortableFunc
13
18
  if attributes.ngInitialSort == 'reverse'
14
- scope.sortableReverse = true
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 scope.howToSortField == sortableFunc
23
- scope.sortableReverse = !scope.sortableReverse
27
+ if angular.sortableField[scopeName].howToSortField == sortableFunc
28
+ angular.sortableField[scopeName].sortableReverse = !angular.sortableField[scopeName].sortableReverse
24
29
  else
25
- scope.sortableReverse = false
26
- scope.howToSortField = sortableFunc
27
- if scope.sortableReverse == false
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
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.1.5.6"
2
+ VERSION = "0.1.5.7"
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.1.5.6
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-06-24 00:00:00.000000000 Z
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.3
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.