hooch 0.4.0 → 0.4.1

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: 843365c8223492ada4139655788204be1eb66f92
4
- data.tar.gz: abe4e60a98085d46d3ce61ff963ffefc9a63ca25
3
+ metadata.gz: 50e01c687750265f50a10a17bd2ba2e6161b92cb
4
+ data.tar.gz: 49d02d95c90c7b1de4d8e23805baa07322f5a39e
5
5
  SHA512:
6
- metadata.gz: 455c26c52f1d3120ecfa8089ce23cbda9df48016316550f3cb2520c7289b2aa0979d2afd8fb8905de2c960a14b9de56147b2185f853b49481966eb9d321b7604
7
- data.tar.gz: c017a3036d9a74516d4def1f3a6d84d975fd92d5e5b2b25683887714aa904efc9238002edcf6e0c79674fc36d9b4458f1dfd8309b86aa3b696609ac54e34db74
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(){
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Hooch
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
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-21 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails