hooch 0.4.0 → 0.4.1
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 +4 -4
- data/app/assets/javascripts/hooch.js +3 -0
- data/jasmine/spec/hoochSpec.js +7 -2
- data/lib/hooch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50e01c687750265f50a10a17bd2ba2e6161b92cb
|
4
|
+
data.tar.gz: 49d02d95c90c7b1de4d8e23805baa07322f5a39e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 105fbf16ca53a603d5f22f8f0718bd8172623737a47b6c7c5c8efea1b65aac3d00ee170ce479b9c0f04f6e996a037867722c25fcd60058758f8ec370ac8a2857
|
7
|
+
data.tar.gz: 4ee8021ad19eb852f6fca4be879a9144cec5c11ab1fb39543b60c473a67be3cfbbb5c119276c2e2cf174b82d74e94c3e10064605ba6726679695a1c2105fb13b
|
@@ -877,6 +877,9 @@ var initHooch = function(){
|
|
877
877
|
form_data[array_name] = id_array.map(function(id){
|
878
878
|
return id.slice((last_underscore_location + 1))
|
879
879
|
})
|
880
|
+
if(this.$sorter.data('sort-field')){
|
881
|
+
form_data['sort_field'] = this.$sorter.data('sort-field')
|
882
|
+
}
|
880
883
|
return form_data
|
881
884
|
},
|
882
885
|
removePlaceholder: function(){
|
data/jasmine/spec/hoochSpec.js
CHANGED
@@ -160,7 +160,7 @@ describe("hooch", function() {
|
|
160
160
|
sorter.onMousemove({originalEvent: {pageY: 210, pageX: 10}})
|
161
161
|
last_elem = sorter.$sorter.children(':last')
|
162
162
|
//Dragging below the bottom of the grid puts the placeholder in the last place in the list
|
163
|
-
expect(sort_elem_a.placeholder.$sort_element.is(last_elem))
|
163
|
+
expect(sort_elem_a.placeholder.$sort_element.is(last_elem)).toBe(true)
|
164
164
|
})
|
165
165
|
it('Handles dropping an element', function(){
|
166
166
|
sort_elem_a.onMousedown({which: 1, originalEvent: {pageY: 10, pageX: 10}})
|
@@ -168,7 +168,12 @@ describe("hooch", function() {
|
|
168
168
|
sorter.removeDraggingElement()
|
169
169
|
last_elem = sorter.$sorter.children(':last')
|
170
170
|
//Now the real element 'a' is in last place after being dragged below the sorter
|
171
|
-
expect(sort_elem_a.$sort_element.is(last_elem))
|
171
|
+
expect(sort_elem_a.$sort_element.is(last_elem)).toBe(true)
|
172
|
+
})
|
173
|
+
it('Builds form data', function(){
|
174
|
+
sorter.$sorter.attr('data-sort-field','my_sort')
|
175
|
+
form_data = sorter.getFormData()
|
176
|
+
expect(form_data['sort_field']).toEqual('my_sort')
|
172
177
|
})
|
173
178
|
})
|
174
179
|
});
|
data/lib/hooch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|