material_raingular 0.0.2.6.6 → 0.0.2.6.7
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 +2 -2
- data/lib/assets/javascripts/directives/ngsortable.js.coffee +25 -0
- data/lib/assets/javascripts/directives/textarea.coffee +4 -0
- data/lib/assets/javascripts/extensions.coffee +4 -0
- data/lib/assets/javascripts/material_raingular.js.coffee +2 -1
- 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: 548a8eb24d08e24657164b8fa38253606ca3bc60
|
4
|
+
data.tar.gz: f9acba89db62acf88882f574cbe4525eb9036e1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a3033435ad4f41975440d38edd2bd607861353e3d13636eae30095e5eddc0bd50769cbf652317edc0fb695dce0e161bef131f29349a461da12713e4da5c05e
|
7
|
+
data.tar.gz: 228a0ead1be2601ca45d503b9329456f98862aa69af1ac5758f79738a1d89920467f392dd4fe4a2c7fc62339efcf607850d2b770c56b3cfd15b5775f95938294
|
@@ -62,10 +62,10 @@ angular.module('NgDrag', [])
|
|
62
62
|
bool = false
|
63
63
|
unless bool
|
64
64
|
scope.setPosition(dragging,dropping,draggingContext,droppingContext,attributes.ngContext,factory,list_name)
|
65
|
-
controller: ($scope, $element, $filter, $injector) ->
|
65
|
+
controller: ($scope, $element, $filter, $injector,$parse) ->
|
66
66
|
$scope.setPosition = (dragging,dropping,draggingContext,droppingContext,context,factory,list_name) ->
|
67
67
|
unless dragging == dropping
|
68
|
-
orderedArray = $filter('orderBy')($scope
|
68
|
+
orderedArray = $filter('orderBy')($parse(list_name)($scope), 'position')
|
69
69
|
index = orderedArray.indexOf(dropping)
|
70
70
|
unless dragging == orderedArray[index - 1]
|
71
71
|
unless index == 0
|
@@ -0,0 +1,25 @@
|
|
1
|
+
angular.module('NgSortable', [])
|
2
|
+
.directive 'ngSortable', ($parse)->
|
3
|
+
template: (element) ->
|
4
|
+
'<span>' + element[0].innerHTML + '</span><i class="sort"></i>'
|
5
|
+
link: (scope,element,attributes) ->
|
6
|
+
scope.sortableField = (resource)->
|
7
|
+
return 'position' unless !!scope.howToSortField
|
8
|
+
scope.howToSortField(resource)
|
9
|
+
sortableFunc = $parse(attributes.ngSortable)
|
10
|
+
icon = element.find('i')
|
11
|
+
icon.bind 'click', ->
|
12
|
+
element.parent().find('i').removeClass('up')
|
13
|
+
element.parent().find('i').removeClass('down')
|
14
|
+
scope.$apply ->
|
15
|
+
if scope.howToSortField == sortableFunc
|
16
|
+
scope.sortableReverse = !scope.sortableReverse
|
17
|
+
else
|
18
|
+
scope.sortableReverse = false
|
19
|
+
scope.howToSortField = sortableFunc
|
20
|
+
if scope.sortableReverse == false
|
21
|
+
icon.addClass('down')
|
22
|
+
icon.removeClass('up')
|
23
|
+
else
|
24
|
+
icon.addClass('up')
|
25
|
+
icon.removeClass('down')
|
@@ -4,8 +4,12 @@ angular.module('TextArea', [])
|
|
4
4
|
link: (scope, element, attributes) ->
|
5
5
|
scope.initialHeight = scope.initialHeight || element[0].style.height
|
6
6
|
element.css('resize','none').css('overflow','hidden').css('border','0px')
|
7
|
+
initial = element.parent().css('height')
|
7
8
|
resize = ->
|
9
|
+
element.parent().css('height',element.parent()[0].offsetHeight)
|
8
10
|
element[0].style.height = scope.initialHeight
|
9
11
|
element[0].style.height = "" + Math.max(20,element[0].scrollHeight) + "px"
|
12
|
+
$timeout ->
|
13
|
+
element.parent().css('height',initial)
|
10
14
|
element.on("blur keyup change", resize)
|
11
15
|
$timeout(resize, 0)
|
@@ -20,4 +20,5 @@ angular.module('materialRaingular', ['AutoComplete', 'NgDownload', 'NgChangeOnBl
|
|
20
20
|
'NgRepeatList', 'NgUpdate', 'NgPopup', 'NgBoolean', 'Table', 'NgWatchShow', 'NgTrackBy'
|
21
21
|
'NgUpload', 'NgDestroy', 'NgCreate', 'Video','NgAuthorize', 'TextArea', 'MdUpdate'
|
22
22
|
'NgSlide', 'NgMatches','NgFade','NgSwipe', 'NgLoad', 'NgWatchContent', 'RailsUpdater'
|
23
|
-
'ngRoute', 'ngMaterial', 'ngMessages', 'ngResource', 'materialFilters', 'NgCallback'
|
23
|
+
'ngRoute', 'ngMaterial', 'ngMessages', 'ngResource', 'materialFilters', 'NgCallback'
|
24
|
+
'NgSortable'])
|
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.6.
|
4
|
+
version: 0.0.2.6.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: 2015-10-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/assets/javascripts/directives/ngpopup.js.coffee
|
88
88
|
- lib/assets/javascripts/directives/ngrepeatlist.js.coffee
|
89
89
|
- lib/assets/javascripts/directives/ngslide.js.coffee
|
90
|
+
- lib/assets/javascripts/directives/ngsortable.js.coffee
|
90
91
|
- lib/assets/javascripts/directives/ngswipe.js.coffee
|
91
92
|
- lib/assets/javascripts/directives/ngtrackby.coffee
|
92
93
|
- lib/assets/javascripts/directives/ngupdate.js.coffee
|