File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
webroot/js/app/components Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ App.Components.SortableComponent = Frontend.Component.extend({
33 startup : function ( ) {
44 } ,
55 initSortableLists : function ( $dom ) {
6- $dom . find ( 'table .sortable-list tbody ' ) . sortable ( ) . disableSelection ( ) ;
7- $dom . find ( 'table .sortable-list tbody ' ) . on ( "sortupdate" , this . _onSortUpdate . bind ( this ) ) ;
6+ $dom . find ( 'tbody .sortable-list' ) . sortable ( { helper : this . _fixWidthHelper } ) . disableSelection ( ) ;
7+ $dom . find ( 'tbody .sortable-list' ) . on ( "sortupdate" , this . _onSortUpdate . bind ( this ) ) ;
88 } ,
99 _onSortUpdate : function ( e , ui ) {
1010 var foreignKey = ui . item . data ( 'entity-id' ) ;
@@ -30,5 +30,11 @@ App.Components.SortableComponent = Frontend.Component.extend({
3030 alert ( "Error on update sort order! Please reload page." ) ;
3131 }
3232 } . bind ( this ) ) ;
33+ } ,
34+ _fixWidthHelper :function ( e , ui ) {
35+ ui . children ( ) . each ( function ( ) {
36+ $ ( this ) . width ( $ ( this ) . width ( ) ) ;
37+ } ) ;
38+ return ui ;
3339 }
3440} ) ;
You can’t perform that action at this time.
0 commit comments