diff options
| author | Cocographique <nmi@odoo.com> | 2018-07-25 10:03:30 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-08-13 18:30:01 +0200 |
| commit | 4dce6cc98b2b95a00249ac29245305e08f288e6c (patch) | |
| tree | 43f76425632b4af977339a341e44e401e66e22de /addons/web_editor/static/src/js/widgets | |
| parent | 2623644ba871de1954f2f33fc0caab7643eec93a (diff) | |
[IMP] website, *: review snippets and colors
* web, web_editor, website_hr_recruitment, website_mail_channel,
website_mass_mailing
- Review all snippets and add new ones
- Add lots of new options
- Use odoo colors as default theme colors
task-38878
Diffstat (limited to 'addons/web_editor/static/src/js/widgets')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 74fbfe18f01..3103dc91505 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -1525,10 +1525,15 @@ var LinkDialog = Dialog.extend({ } var style = this.$('input[name="link_style_color"]:checked').val() || ''; + var shape = this.$('select[name="link_style_shape"]').val() || ''; var size = this.$('select[name="link_style_size"]').val() || ''; + var shapes = shape.split(','); + var outline = shapes[0] === 'outline'; + shape = shapes.slice(outline ? 1 : 0).join(' '); var classes = (this.data.className || '') - + ((style && style.length) ? (' btn btn-' + style) : '') - + ((size && size.length) ? (' btn-' + size) : ''); + + (style ? (' btn btn-' + (outline ? 'outline-' : '') + style) : '') + + (shape ? (' ' + shape) : '') + + (size ? (' btn-' + size) : ''); var isNewWindow = this.$('input[name="is_new_window"]').prop('checked'); if (url.indexOf('@') >= 0 && url.indexOf('mailto:') < 0 && !url.match(/^http[s]?/i)) { |
