mirror of https://github.com/OCA/web.git
commit
00a7f28460
|
@ -1,10 +1,17 @@
|
||||||
td.o_many2one_cell {
|
td.o_many2one_cell {
|
||||||
a {
|
a {
|
||||||
|
color: $o-main-text-color !important;
|
||||||
|
&:hover {
|
||||||
|
color: $o-main-text-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.many2one_clickable {
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&:hover a {
|
&:hover a.many2one_clickable {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,19 +32,18 @@ odoo.define('web_tree_many2one_clickable.many2one_clickable', function (require)
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if (!this.noOpen && this.value) {
|
if (!this.noOpen && this.value) {
|
||||||
// Replace '<a>' element
|
// Disable 'click' events
|
||||||
this.$el.removeClass('o_form_uri');
|
this.$el.off('click');
|
||||||
this.$el = $('<span/>', {
|
this.$el.on('click', function (ev) {
|
||||||
html: this.$el.html(),
|
ev.preventDefault();
|
||||||
class: this.$el.attr('class') + ' o_field_text',
|
})
|
||||||
name: this.$el.attr('name'),
|
|
||||||
});
|
|
||||||
|
|
||||||
// Append button
|
// Append button
|
||||||
var $a = $('<a/>', {
|
var $a = $('<a/>', {
|
||||||
href: '#',
|
href: '#',
|
||||||
class: 'o_form_uri btn btn-sm btn-secondary' +
|
class: 'o_form_uri btn btn-sm btn-secondary' +
|
||||||
' fa fa-angle-double-right',
|
' fa fa-angle-double-right many2one_clickable',
|
||||||
|
tabindex: '-1',
|
||||||
}).on('click', function (ev) {
|
}).on('click', function (ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
|
Loading…
Reference in New Issue