[IMP] web: CopyClipboardCharLong widget for long strings

- The copy CopyClipboardChar widget is not nicely rendered for very long strings (e.g. URL).
 - This commit modify the behavior of the CopyClipboardChar widget to display it nicely win such cases.

TaskID: 2059972
This commit is contained in:
Arnaud Joset
2019-10-11 12:44:47 +00:00
parent f55adeaf34
commit 92c26dff56
2 changed files with 3 additions and 7 deletions
@@ -1597,13 +1597,6 @@ var CopyClipboard = {
});
});
},
/**
* @override
*/
_render: function () {
this._super.apply(this, arguments);
this.$el.addClass('o_field_copy');
},
/**
* @override
*/
@@ -1619,11 +1612,13 @@ var CopyClipboard = {
var TextCopyClipboard = FieldText.extend(CopyClipboard, {
description: _lt("Copy to Clipboard"),
clipboardTemplate: 'CopyClipboardText',
className: "o_field_copy",
});
var CharCopyClipboard = FieldChar.extend(CopyClipboard, {
description: _lt("Copy to Clipboard"),
clipboardTemplate: 'CopyClipboardChar',
className: 'o_field_copy o_text_overflow',
});
var AbstractFieldBinary = AbstractField.extend({
+1
View File
@@ -453,6 +453,7 @@
font-weight: $badge-font-weight;
text-align: center;
padding-right: 100px;
word-break: break-word;
.o_clipboard_button {
@include o-position-absolute($top: 0, $right: 0);
&.o_btn_text_copy {