[FIX] website snippet: editor overlay (bounce, display after click on insert block)
bzr revid: chm@openerp.com-20131106163927-vdqxfamnkspnb193
This commit is contained in:
@@ -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">&nbsp; <span class="icon-move"/> &nbsp;</a>
|
||||
|
||||
Reference in New Issue
Block a user