Commit 590cd157cdc43dea3a2d7d2caefdbcc0d24a00cc
1 parent
cb6fbc38
Exists in
master
and in
27 other branches
container_block: avoid conflict between resizable and draggable functions
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
plugins/container_block/public/container_block.js
1 | function enableMoveContainerChildren(container, box) { | 1 | function enableMoveContainerChildren(container, box) { |
2 | var div = jQuery('#box-'+box+' > .block-outer > .block'); | 2 | var div = jQuery('#box-'+box+' > .block-outer > .block'); |
3 | if(!div.is('.ui-resizable')) { | 3 | if(!div.is('.ui-resizable')) { |
4 | + div.removeClass('ui-draggable'); | ||
4 | div.resizable({ | 5 | div.resizable({ |
5 | handles: 'e, w', | 6 | handles: 'e, w', |
6 | containment: '#block-'+container+' .block-inner-2', | 7 | containment: '#block-'+container+' .block-inner-2', |
@@ -14,6 +15,7 @@ function enableMoveContainerChildren(container, box) { | @@ -14,6 +15,7 @@ function enableMoveContainerChildren(container, box) { | ||
14 | function disableMoveContainerChildren(container, box) { | 15 | function disableMoveContainerChildren(container, box) { |
15 | var div = jQuery('#box-'+box+' > .block-outer > .block'); | 16 | var div = jQuery('#box-'+box+' > .block-outer > .block'); |
16 | if(div.is('.ui-resizable')) { | 17 | if(div.is('.ui-resizable')) { |
18 | + div.addClass('ui-draggable'); | ||
17 | div.resizable('destroy'); | 19 | div.resizable('destroy'); |
18 | } | 20 | } |
19 | } | 21 | } |