summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-09-19 15:57:16 +0200
committerChristophe Matthieu <chm@openerp.com>2013-09-19 15:57:16 +0200
commit53fb7df505dee5331bf4ad8e6f46ced5de6896a1 (patch)
tree17a40b48241b3e12558dd61db6bd4b5c839162e8 /addons
parente7e41de591ea10a583b52aca613af05d7877bce8 (diff)
[FIX] website snippet: drop
bzr revid: chm@openerp.com-20130919135716-agltvhucaqbcmye6
Diffstat (limited to 'addons')
-rw-r--r--addons/website/static/src/js/website.snippets.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/addons/website/static/src/js/website.snippets.js b/addons/website/static/src/js/website.snippets.js
index 2fde9289bff..9e45a3b85ce 100644
--- a/addons/website/static/src/js/website.snippets.js
+++ b/addons/website/static/src/js/website.snippets.js
@@ -297,6 +297,7 @@
var dropped = false;
$snippet.draggable({
+ greedy: true,
helper: 'clone',
zIndex: '1000',
appendTo: 'body',
@@ -345,26 +346,14 @@
over: function(){
if( action === 'insert'){
$(this).first().after($toInsert);
- } else {
- // FIXME: stupid hack to prevent multiple droppable to activate at once ...
- // it's not even working properly but it's better than nothing.
- $(".oe_drop_zone.oe_hover").removeClass("oe_hover");
- $(this).addClass("oe_hover");
}
},
out: function(){
if( action === 'insert'){
$toInsert.detach();
- } else {
- $(this).removeClass("oe_hover");
}
},
drop: function(){
-
- if (!$(".oe_drop_zone.oe_hover").length) {
- return false;
- }
-
dropped = true;
var $target = false;
@@ -379,7 +368,7 @@
$target.data("snippet-editor").build_snippet($target);
} else {
- $target = $(".oe_drop_zone.oe_hover").first().data('target');
+ $target = $(this).data('target');
self.create_overlay($target);
if (website.snippet.editorRegistry[snipped_id]) {