app/assets/javascripts/hooch.js in hooch-0.6.3 vs app/assets/javascripts/hooch.js in hooch-0.6.4

- old
+ new

@@ -967,15 +967,25 @@ }else{ this.width = this.$sort_element.width() this.height = this.$sort_element.height() } this.dragging = false - this.getDragHandle() - this.$sort_element.css({cursor: ''}); - this.$drag_handle.css({cursor: 'move'}); - var sort_element = this - this.$drag_handle.on('mousedown', $.proxy(sort_element.onMousedown, sort_element)) - this.$sort_element.on('dragstart', function(e){hooch.pauseEvent(e); return false}) + this.determineIfSortable(); + if(this.sortable){ + this.getDragHandle() + this.$sort_element.css({cursor: ''}); + this.$drag_handle.css({cursor: 'move'}); + var sort_element = this + this.$drag_handle.on('mousedown', $.proxy(sort_element.onMousedown, sort_element)) + this.$sort_element.on('dragstart', function(e){hooch.pauseEvent(e); return false}) + } + }, + determineIfSortable: function(){ + if(this.$sort_element.find('[data-sorter]').length > 0){ + this.sortable = false + } else { + this.sortable = true + } }, onMousedown: function(e){ if(1 == e.which){ this.sorter.clearDraggingElement(); this.pressed = true