[IMP] website snippet: add button 'insert block' on top bar

bzr revid: chm@openerp.com-20130916144235-mxm63fikqlf0jv8s
This commit is contained in:
Christophe Matthieu 2013-09-16 16:42:35 +02:00
parent dff6d399dc
commit 24a63ccea7
6 changed files with 8 additions and 11 deletions

View File

@ -148,10 +148,6 @@ table.editorbar-panel td.selected {
height: 140px;
}
#website-top-navbar:hover #oe_snippets {
display: block;
}
.oe_snippet {
display: inline-block;
vertical-align: top;

View File

@ -137,9 +137,6 @@ table.editorbar-panel
.pill-content
height: 140px
#website-top-navbar:hover #oe_snippets
display: block
.oe_snippet
display: inline-block
vertical-align: top

View File

@ -187,7 +187,7 @@
return $.when(
this._super.apply(this, arguments),
this.rte.prependTo(this.$('#website-top-edit .nav.pull-right'))
this.rte.appendTo(this.$('#website-top-edit .nav.pull-right'))
);
},
edit: function () {

View File

@ -6,8 +6,12 @@
website.EditorBar.include({
edit: function () {
var self = this;
window.snippets = this.snippets = new website.snippet.BuildingBlock(this);
this.snippets.appendTo(this.$el);
this.$el.find('[data-action="snippet"]').click(function () {
self.snippets.$el.toggle();
});
return this._super.apply(this, arguments);
},
save: function () {
@ -100,7 +104,7 @@
$el.css($target.offset());
},
show: function () {
this.$el.css("display", "");
this.$el.show();
},
hide: function () {
this.$el.hide();

View File

@ -9,6 +9,7 @@
class="btn">Cancel</button>
</form>
<ul class="nav navbar-nav pull-right">
<li class="navbar-form"><button type="button" data-action="snippet" class="btn btn-primary">Insert Blocks</button></li>
</ul>
</div>
</t>

View File

@ -14,8 +14,7 @@
<span class="icon-bar"></span>
</button>
<form class="navbar-form navbar-left">
<button type="button" data-action="edit"
class="btn btn-primary">Edit</button>
<button type="button" data-action="edit" class="btn btn-primary">Edit</button>
</form>
</div>
<div class="collapse navbar-collapse navbar-edit-collapse">