changeset b16c2912fc23 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=b16c2912fc23
description:
Add frame around image widget
issue10563
review342691002
diffstat:
src/sao.less | 5 +++++
src/view/form.js | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r e28f51785bee -r b16c2912fc23 src/sao.less
--- a/src/sao.less Fri Aug 06 09:31:18 2021 +0200
+++ b/src/sao.less Fri Aug 06 09:37:02 2021 +0200
@@ -692,6 +692,11 @@
margin-bottom: 5px;
}
}
+ .form-image {
+ .caption {
+ min-width: 120px;
+ }
+ }
.form-document {
object {
object-fit: scale-down;
diff -r e28f51785bee -r b16c2912fc23 src/view/form.js
--- a/src/view/form.js Fri Aug 06 09:31:18 2021 +0200
+++ b/src/view/form.js Fri Aug 06 09:37:02 2021 +0200
@@ -4130,7 +4130,9 @@
this.height = parseInt(attributes.height || 100, 10);
this.width = parseInt(attributes.width || 300, 10);
- this.el = jQuery('<div/>');
+ this.el = jQuery('<div/>', {
+ 'class': this.class_ + ' thumbnail',
+ });
this.image = jQuery('<img/>', {
'class': 'center-block'
}).appendTo(this.el);
@@ -4142,7 +4144,7 @@
var group = this.toolbar('btn-group');
if (!attributes.readonly) {
jQuery('<div/>', {
- 'class': 'text-center'
+ 'class': 'text-center caption',
}).append(group).appendTo(this.el);
}
},