[FIX] mass_mailing: can't change color button snippet when edit mass mailing

This commit is contained in:
Christophe Matthieu
2016-09-21 16:14:49 +02:00
parent 5b4c1d405d
commit ab06013e30
4 changed files with 7 additions and 5 deletions
@@ -293,7 +293,7 @@
<tr>
<td class="row" style="padding:10px 0;text-align:center">
&amp;nbsp;
<a href="#" style="-webkit-user-select: none; padding: 6px 12px; font-size: 14px; line-height: 20px; color: rgb(255,255,255); border: none; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: rgb(101,101,101);border-radius:4px">My Account</a>
<a class="btn" href="#" style="color:#fff; background-color: rgb(101,101,101);">My Account</a>
&amp;nbsp;
</td>
</tr>
@@ -616,7 +616,6 @@ define([
var linkUrl = linkInfo.url;
var linkText = linkInfo.text;
var isNewWindow = linkInfo.isNewWindow;
var className = linkInfo.className || null; // ODOO: addition
var rng = linkInfo.range || this.createRange($editable);
var isTextChanged = rng.toString() !== linkText;
@@ -647,7 +646,8 @@ define([
$.each(anchors, function (idx, anchor) {
$(anchor).attr('href', linkUrl);
$(anchor).attr('class', className); // ODOO: addition
$(anchor).attr('class', linkInfo.className || null); // ODOO: addition
$(anchor).css(linkInfo.style || {}); // ODOO: addition
if (isNewWindow) {
$(anchor).attr('target', '_blank');
} else {
+3 -1
View File
@@ -1087,7 +1087,9 @@ var LinkDialog = Dialog.extend({
self.data.isNewWindow = new_window;
self.data.text = label;
self.data.className = classes.replace(/\s+/gi, ' ').replace(/^\s+|\s+$/gi, '');
if (classes.replace(/(^|[ ])(btn-default|btn-success|btn-primary|btn-info|btn-warning|btn-danger)([ ]|$)/gi, ' ')) {
self.data.style = {'background-color': '', 'color': ''};
}
self.trigger("save", self.data);
}).then(_super);
},
@@ -949,7 +949,7 @@ body.editor_enable {
p {
margin: initial;
}
a, a:hover {
a:not(.btn), a:not(.btn):hover {
color: inherit;
}
}