Skip to content

Commit

Permalink
stories drag and drop bugfix (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosjr182 authored and andrerpbts committed Mar 14, 2017
1 parent f1a1104 commit 0ddb6d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [1.1.1] - 2017-03-14
### Changed
- Stories drag and drop bug fixed

## [1.1.0] - 2017-03-09
### Added
- User Endpoint
Expand Down
20 changes: 9 additions & 11 deletions app/assets/javascripts/views/column_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ module.exports = Backbone.View.extend({
},

initialize: function() {
var data = this.$el.data();
this.id = data.columnView;
this.name = I18n.t('projects.show.' + data.columnView);
this.sortable = data.connect !== undefined
this.$el.addClass(data.columnView + '_column');
this.hideable = data.hideable == undefined ? true : data.hideable;
var $el = this.$el;

if (data.connect) {
this.$el
.find('.ui-sortable')
.sortable('option', 'connectWith', data.connect);
}
this.data = $el.data();
this.id = this.data.columnView;
this.name = I18n.t('projects.show.' + this.data.columnView);
this.hideable = this.data.hideable == undefined ? true : this.data.hideable;
this.sortable = this.data.connect !== undefined;

$el.addClass(this.data.columnView + '_column');
},

render: function() {
Expand Down Expand Up @@ -56,6 +53,7 @@ module.exports = Backbone.View.extend({
setSortable: function() {
this.storyColumn().sortable({
handle: '.story-title', opacity: 0.6, items: ".story:not(.accepted)",
connectWith: this.data.connect,
update: function(ev, ui) {
ui.item.trigger("sortupdate", ev, ui);
}
Expand Down

0 comments on commit 0ddb6d9

Please sign in to comment.