summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-09-16 16:42:35 +0200
committerChristophe Matthieu <chm@openerp.com>2013-09-16 16:42:35 +0200
commit24a63ccea7bb9f2cf65afffcccd7c41fe3b91cc9 (patch)
treef5e13b5acc254bf3ddba51e50cd2d14a5a0e06ba /addons/website/static/src/js
parentdff6d399dc820a805aa8938e97fc947ec0e9b40f (diff)
[IMP] website snippet: add button 'insert block' on top bar
bzr revid: chm@openerp.com-20130916144235-mxm63fikqlf0jv8s
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/website.editor.js2
-rw-r--r--addons/website/static/src/js/website.snippets.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 1d63fc0c3bb..241280029a3 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -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 () {
diff --git a/addons/website/static/src/js/website.snippets.js b/addons/website/static/src/js/website.snippets.js
index d1d13108b96..cb8f193dde2 100644
--- a/addons/website/static/src/js/website.snippets.js
+++ b/addons/website/static/src/js/website.snippets.js
@@ -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();