summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefanorigano (SRI) <sri@odoo.com>2020-08-12 10:44:53 +0000
committerqsm-odoo <qsm@odoo.com>2020-08-14 19:19:48 +0000
commit772c967abd8fd0340c9b82d759a008e895fe1bac (patch)
treea86f17988e1f2fe25d777da7dd034437e0a81c53
parent9587202dec5e458e885e325bcab11b6f4ffd3c17 (diff)
[IMP] web_editor: review 'o_we_image_weight' design
Part of https://github.com/odoo/odoo/pull/55959 task-2157252 closes odoo/odoo#55959 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.options.js3
-rw-r--r--addons/web_editor/static/src/scss/wysiwyg_snippets.scss14
-rw-r--r--addons/web_editor/views/snippets.xml2
3 files changed, 11 insertions, 8 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js
index 83ec0c58530..4ee4dad1293 100644
--- a/addons/web_editor/static/src/js/editor/snippets.options.js
+++ b/addons/web_editor/static/src/js/editor/snippets.options.js
@@ -3087,7 +3087,8 @@ const ImageHandlerOption = SnippetOptionWidget.extend({
const dataURL = await applyModifications(img);
const weight = dataURL.split(',')[1].length / 4 * 3;
const $weight = this.$el.find('.o_we_image_weight');
- $weight.find('> span').text(`${(weight / 1024).toFixed(1)}kb`);
+ $weight.find('> small').text(_t("New size"));
+ $weight.find('b').text(`${(weight / 1024).toFixed(1)} kb`);
$weight.removeClass('d-none');
img.classList.add('o_modified_image_to_save');
return loadImage(dataURL, img);
diff --git a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss
index e79f8013ad0..56383257f30 100644
--- a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss
+++ b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss
@@ -1060,13 +1060,15 @@ body.editor_enable.editor_has_snippets {
}
.o_we_image_weight {
- margin-top: $o-we-sidebar-content-field-spacing;
- text-align: right;
- color: $o-we-color-success;
- line-height: $o-we-sidebar-content-field-height;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ margin: $o-we-sidebar-content-field-spacing *.25 $o-we-item-border-width $o-we-sidebar-content-field-spacing*2;
- > .fa {
- margin-right: $o-we-sidebar-content-field-label-spacing;
+ b {
+ margin-left: $o-we-sidebar-content-field-label-spacing;
+ font: 1em/1 bold $o-we-sidebar-content-field-input-font-family;
+ color: $o-we-color-success;
}
}
diff --git a/addons/web_editor/views/snippets.xml b/addons/web_editor/views/snippets.xml
index 0482c7f556d..b88f2d4e324 100644
--- a/addons/web_editor/views/snippets.xml
+++ b/addons/web_editor/views/snippets.xml
@@ -51,7 +51,7 @@
<we-colorpicker t-att-string="indent and (' ⌙ %s' % filter_label) or filter_label" data-set-filter="" data-excluded="common, theme"/>
<we-select t-att-string="indent and (' ⌙ %s' % width_label) or width_label" data-name="width_select_opt"/>
<we-range t-att-string="indent and (' ⌙ %s' % quality_label) or quality_label" data-set-quality=""/>
- <div class="o_we_image_weight d-none"><i class="fa fa-long-arrow-right"/><span/></div>
+ <div class="o_we_image_weight d-none"><small/><b/></div>
</template>
<template id="snippet_options_background_color_widget">