hooch 0.6.3 → 0.6.4

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: 8705a701f4a27a828003d4f03849bd85a349c1ed
4
- data.tar.gz: 39ffcb5992bb7cbdbade204797b483187b0f927e
3
+ metadata.gz: a678b9f63ccf10151fc71f44550b236169e6e010
4
+ data.tar.gz: cde4ccbb39d9347fd3fbee9b42b6b9951db13e84
5
5
  SHA512:
6
- metadata.gz: ff9336b4e5e4e7a069ac237c59c24adff0ba078170c2a6513992dca314beb242865a4ad052f3a5e4756dce8ea66aef1bb1fd8ca8697890826d9a8c0969fda81c
7
- data.tar.gz: 25de0bb8ea8f9b0020bbb6a87c99ec16a8e2eb1b83865343476b524377a66ac4ee8fb399f8985ab2833b5d1f9d81f49c330f11f42851081102da74742752f78a
6
+ metadata.gz: ab664c4e7ff33f8816fabadbded64be0e660c4687fc72f17cea5b25de744878c35077d87beda21f03c34d991d6cb32da95e5eec1ada79eb11a21e3fd45ddea58
7
+ data.tar.gz: 632dc3910e8ea5c1acdb3828a36622ec136b079718144f7c50171c0e033f4b0811f488cefbc70dd9a0be0fee1b34dd9220dc9449e38c3b7901d995fc7157f6e5
@@ -969,12 +969,22 @@ var initHooch = function(){
969
969
  this.height = this.$sort_element.height()
970
970
  }
971
971
  this.dragging = false
972
- this.getDragHandle()
973
- this.$sort_element.css({cursor: ''});
974
- this.$drag_handle.css({cursor: 'move'});
975
- var sort_element = this
976
- this.$drag_handle.on('mousedown', $.proxy(sort_element.onMousedown, sort_element))
977
- this.$sort_element.on('dragstart', function(e){hooch.pauseEvent(e); return false})
972
+ this.determineIfSortable();
973
+ if(this.sortable){
974
+ this.getDragHandle()
975
+ this.$sort_element.css({cursor: ''});
976
+ this.$drag_handle.css({cursor: 'move'});
977
+ var sort_element = this
978
+ this.$drag_handle.on('mousedown', $.proxy(sort_element.onMousedown, sort_element))
979
+ this.$sort_element.on('dragstart', function(e){hooch.pauseEvent(e); return false})
980
+ }
981
+ },
982
+ determineIfSortable: function(){
983
+ if(this.$sort_element.find('[data-sorter]').length > 0){
984
+ this.sortable = false
985
+ } else {
986
+ this.sortable = true
987
+ }
978
988
  },
979
989
  onMousedown: function(e){
980
990
  if(1 == e.which){
@@ -1,3 +1,3 @@
1
1
  module Hooch
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
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.6.3
4
+ version: 0.6.4
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-11-18 00:00:00.000000000 Z
11
+ date: 2015-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails