summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2014-07-11 11:09:24 +0200
committerChristophe Matthieu <chm@odoo.com>2014-07-11 11:09:24 +0200
commit1eee1d2c5100c71bfbd84b5866385e3e9d4942c3 (patch)
tree3313c9a26530bc40c71305c24fa775d9d69b7f86 /addons/website/static/src/js/website.editor.js
parent67e15d8d865187aa54a0fdcae100f25044308f91 (diff)
[IMP] website: replace the select box into dropdown for link editor to have a preview
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 178dee1e024..f15278ee49f 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -947,7 +947,7 @@
'change input#link-text': function (e) {
this.text = $(e.target).val();
},
- 'change select.link-style': function (e) {
+ 'change .link-style': function (e) {
this.preview();
},
}),
@@ -1006,8 +1006,8 @@
def.reject();
}
- var style = this.$("#link-style-type").val();
- var size = this.$("#link-style-size").val();
+ var style = this.$("input[name='link-style-type']:checked").val();
+ var size = this.$("input[name='link-style-size']:checked").val();
var classes = (style && style.length ? "btn " : "") + style + " " + size;
if ($e.hasClass('email-address') && $e.val().indexOf("@") !== -1) {
@@ -1056,10 +1056,10 @@
var classes = this.element && this.element.$.className;
if (classes) {
- this.$('option[value!=""]').each(function () {
+ this.$('input[value!=""]').each(function () {
var $option = $(this);
if (classes.indexOf($option.val()) !== -1) {
- $option.attr("selected", "selected");
+ $option.attr("checked", "checked");
}
});
}