[FIX] website: editor snippet click to active
bzr revid: chm@openerp.com-20130911133725-6ivh2n5wq1ib0a31
This commit is contained in:
@@ -83,8 +83,6 @@
|
||||
var $parent = self.$active_snipped_id.parents("[data-snippet-id]:first");
|
||||
if ($parent.length) {
|
||||
$target = $parent;
|
||||
} else if (self.$active_snipped_id.get(0) === $target[0]) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,8 +90,8 @@
|
||||
setTimeout(function () {snipped_event_flag = false;}, 0);
|
||||
self.make_active($target);
|
||||
});
|
||||
$("body > :not(:has(#website-top-view)):not(#oe_manipulators)").on('mousedown', function (ev) {
|
||||
if (!snipped_event_flag) {
|
||||
$("body > :not(:has(#website-top-view)):not(#oe_manipulators)").on('click', function (ev) {
|
||||
if (!snipped_event_flag && self.$active_snipped_id && !self.$active_snipped_id.parents("[data-snippet-id]:first")) {
|
||||
self.make_active(false);
|
||||
}
|
||||
});
|
||||
@@ -665,6 +663,7 @@
|
||||
$target.find(".carousel-control").attr("href", "#"+id);
|
||||
},
|
||||
start : function () {
|
||||
this._super();
|
||||
var self = this;
|
||||
|
||||
this.$editor.find(".js_add").on('click', this.on_add);
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
<div t-name="website.snippets.container" data-snippet-id='container'>
|
||||
|
||||
<!-- editor bar to display inside the top edit bar -->
|
||||
<li class='oe_snippet_options box_resize'>
|
||||
<li class='oe_snippet_options'>
|
||||
<a href="#" class="button js_box_move"><i class='icon icon-move'></i></a>
|
||||
</li>
|
||||
<li class='oe_snippet_options'>
|
||||
<a href="#" class="button js_box_remove"><i class="icon icon-remove"></i></a>
|
||||
</li>
|
||||
|
||||
@@ -36,12 +38,18 @@
|
||||
<!-- editor bar to display inside the top edit bar -->
|
||||
<li class='oe_snippet_options'>
|
||||
<a href="#" class="button js_add"><i class="icon icon-plus-sign"></i></a>
|
||||
</li>
|
||||
<li class='oe_snippet_options'>
|
||||
<a href="#" class="button js_remove"><i class="icon icon-minus-sign"></i></a>
|
||||
</li>
|
||||
<li class='oe_snippet_options'>
|
||||
<select name="carousel-background">
|
||||
<option value="/website/static/src/img/greenfields.jpg">greenfields</option>
|
||||
<option value="/website/static/src/img/landscape.png">landscape</option>
|
||||
<option value="/website/static/src/img/aqua.jpg">aqua</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class='oe_snippet_options'>
|
||||
<select name="carousel-style">
|
||||
<option value="no_image">No image</option>
|
||||
<option value="image_left">Image left</option>
|
||||
|
||||
Reference in New Issue
Block a user