[FIX] website snippet: editor overlay (bounce, display after click on insert block)

bzr revid: chm@openerp.com-20131106163927-vdqxfamnkspnb193
This commit is contained in:
Christophe Matthieu
2013-11-06 17:39:27 +01:00
parent 5ce5a2d877
commit bc5772ab7e
2 changed files with 4 additions and 4 deletions
@@ -237,6 +237,7 @@
}
if (this.$active_snipped_id) {
this.snippet_blur(this.$active_snipped_id);
this.$active_snipped_id = false;
}
if ($snipped_id) {
if(_.indexOf(this.snippets, $snipped_id.get(0)) === -1) {
@@ -245,8 +246,6 @@
this.$active_snipped_id = $snipped_id;
this.create_overlay(this.$active_snipped_id);
this.snippet_focus($snipped_id);
} else {
self.$active_snipped_id = false;
}
},
create_overlay: function ($snipped_id) {
@@ -750,6 +749,7 @@
var index = _.indexOf(self.parent.snippets, self.$target.get(0));
delete self.parent.snippets[index];
self.$target.remove();
self.$overlay.remove();
return false;
});
this._drag_and_drop();
@@ -768,7 +768,7 @@
* This method is called when the user click inside the snippet in the dom
*/
onFocus : function () {
this.$overlay.addClass('oe_active');
this.$overlay.addClass('oe_active').effect('bounce', {distance: 18, times: 5}, 250);
},
/* onFocus
@@ -63,7 +63,7 @@
<div class="btn-group">
<a href="#" class="btn btn-default btn-sm oe_snippet_parent" title="Select Container Block"><span class="icon-upload-alt"/></a>
<div class="dropdown oe_options hidden btn-group">
<a href="#" data-toggle="dropdown" class="btn btn-default btn-sm" title="Customize">Customize <span class="caret"/></a>
<a href="#" data-toggle="dropdown" class="btn btn-primary btn-sm" title="Customize">Customize <span class="caret"/></a>
<ul class="dropdown-menu" role="menu"></ul>
</div>
<a href="#" class="btn btn-default btn-sm oe_snippet_move" title="Drag to Move">&amp;nbsp; <span class="icon-move"/> &amp;nbsp;</a>