[IMP] website snippet: add button 'insert block' on top bar
bzr revid: chm@openerp.com-20130916144235-mxm63fikqlf0jv8s
This commit is contained in:
parent
dff6d399dc
commit
24a63ccea7
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue