|
2 | 2 | <t t-name="o-spreadsheet-ConditionalFormatPreview"> |
3 | 3 | <t t-set="cf" t-value="props.conditionalFormat"/> |
4 | 4 | <div |
5 | | - class="o-cf-preview w-100 border-bottom" |
| 5 | + class="o-cf-preview w-100 d-flex align-items-center border-bottom" |
6 | 6 | t-ref="cfPreview" |
7 | 7 | t-att-class="props.class" |
8 | 8 | t-att-data-id="cf.id" |
9 | 9 | t-on-click="props.onPreviewClick" |
10 | 10 | t-on-pointerdown="(ev) => this.onMouseDown(ev)"> |
11 | | - <div class="position-relative h-100 w-100 d-flex align-items-center"> |
| 11 | + <div class="o-cf-drag-handle h-100 position-absolute d-flex align-items-center o-button-icon"> |
| 12 | + <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/> |
| 13 | + </div> |
| 14 | + <t t-if="cf.rule.type==='IconSetRule'"> |
12 | 15 | <div |
13 | | - class="o-cf-drag-handle h-100 position-absolute d-flex align-items-center o-button-icon"> |
14 | | - <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/> |
| 16 | + class="o-cf-preview-icon d-flex justify-content-around align-items-center me-3 bg-white border"> |
| 17 | + <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.upper].template}}"/> |
| 18 | + <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.middle].template}}"/> |
| 19 | + <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.lower].template}}"/> |
15 | 20 | </div> |
16 | | - <t t-if="cf.rule.type==='IconSetRule'"> |
17 | | - <div |
18 | | - class="o-cf-preview-icon d-flex justify-content-around align-items-center me-2 bg-white border"> |
19 | | - <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.upper].template}}"/> |
20 | | - <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.middle].template}}"/> |
21 | | - <t t-call="o-spreadsheet-Icon.{{icons[cf.rule.icons.lower].template}}"/> |
22 | | - </div> |
23 | | - </t> |
24 | | - <t t-else=""> |
25 | | - <div |
26 | | - t-att-style="getPreviewImageStyle(cf.rule)" |
27 | | - class="o-cf-preview-icon d-flex justify-content-around align-items-center me-2 border"> |
28 | | - 123 |
29 | | - </div> |
30 | | - </t> |
31 | | - <div class="o-cf-preview-description"> |
32 | | - <div class="o-cf-preview-ruletype"> |
33 | | - <div class="o-cf-preview-description-rule o-fw-bold text-truncate"> |
34 | | - <t t-esc="getDescription(cf)"/> |
35 | | - </div> |
36 | | - </div> |
37 | | - <div class="o-cf-preview-range text-truncate" t-esc="cf.ranges"/> |
| 21 | + </t> |
| 22 | + <t t-else=""> |
| 23 | + <div |
| 24 | + t-att-style="getPreviewImageStyle(cf.rule)" |
| 25 | + class="o-cf-preview-icon d-flex justify-content-around align-items-center me-3 flex-shrink-0 border"> |
| 26 | + 123 |
38 | 27 | </div> |
39 | | - <div class="o-cf-delete"> |
40 | | - <div |
41 | | - class="o-cf-delete-button o-button-icon" |
42 | | - t-on-click.stop="(ev) => this.deleteConditionalFormat(cf, ev)" |
43 | | - title="Remove rule"> |
44 | | - <t t-call="o-spreadsheet-Icon.TRASH_FILLED"/> |
| 28 | + </t> |
| 29 | + <div class="o-cf-preview-description me-3 overflow-auto"> |
| 30 | + <div class="o-cf-preview-ruletype"> |
| 31 | + <div class="o-cf-preview-description-rule o-fw-bold text-truncate"> |
| 32 | + <t t-esc="getDescription(cf)"/> |
45 | 33 | </div> |
46 | 34 | </div> |
| 35 | + <div class="o-cf-preview-range text-truncate" t-esc="cf.ranges"/> |
| 36 | + </div> |
| 37 | + <div class="o-cf-delete ms-auto"> |
| 38 | + <div |
| 39 | + class="o-cf-delete-button o-button-icon" |
| 40 | + t-on-click.stop="(ev) => this.deleteConditionalFormat(cf, ev)" |
| 41 | + title="Remove rule"> |
| 42 | + <t t-call="o-spreadsheet-Icon.TRASH_FILLED"/> |
| 43 | + </div> |
47 | 44 | </div> |
48 | 45 | </div> |
49 | 46 | </t> |
|
0 commit comments