[FIX] Website_mail - Add selectors to allow drag and drop of snippet in email template
bzr revid: jke@openerp.com-20140414143001-26p3ka7dwb1er6y0
This commit is contained in:
parent
afc2685cee
commit
bafa8e448d
|
@ -435,7 +435,6 @@
|
|||
// snippet_selectors => to get selector-siblings, selector-children, selector-vertical-children
|
||||
$snippet = $(this);
|
||||
$toInsert = $snippet.find('.oe_snippet_body').clone();
|
||||
$toInsert.removeClass('oe_snippet_body');
|
||||
|
||||
var selector = [];
|
||||
var selector_siblings = [];
|
||||
|
@ -498,6 +497,8 @@
|
|||
});
|
||||
},
|
||||
stop: function(ev, ui){
|
||||
$toInsert.removeClass('oe_snippet_body');
|
||||
|
||||
if (action === 'insert' && ! dropped && $('.oe_drop_zone') && ui.position.top > 3) {
|
||||
var el = $('.oe_drop_zone').nearest({x: ui.position.left, y: ui.position.top}).first();
|
||||
if (el.length) {
|
||||
|
|
|
@ -481,7 +481,11 @@
|
|||
</div>
|
||||
|
||||
<div id="snippet_options" class="hidden">
|
||||
<t t-call="website.snippet_options"/>
|
||||
<div data-snippet-option-id='content'
|
||||
data-selector="[data-oe-field='body_html'] > div, .oe_snippet_body"
|
||||
data-selector-siblings="[data-oe-field='body_html'] > *"
|
||||
data-selector-children="[data-oe-field='body_html']">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue