mirror of https://github.com/OCA/web.git
[IMP] web_tree_many2one_clickable: Don't break keyboard navigation
parent
97fbb9de67
commit
80a0cbba19
|
@ -1,10 +1,17 @@
|
|||
td.o_many2one_cell {
|
||||
a {
|
||||
color: $o-main-text-color !important;
|
||||
&:hover {
|
||||
color: $o-main-text-color !important;
|
||||
}
|
||||
|
||||
.many2one_clickable {
|
||||
margin-left: 0.5em;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover a {
|
||||
&:hover a.many2one_clickable {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,19 +32,18 @@ odoo.define('web_tree_many2one_clickable.many2one_clickable', function (require)
|
|||
var self = this;
|
||||
|
||||
if (!this.noOpen && this.value) {
|
||||
// Replace '<a>' element
|
||||
this.$el.removeClass('o_form_uri');
|
||||
this.$el = $('<span/>', {
|
||||
html: this.$el.html(),
|
||||
class: this.$el.attr('class') + ' o_field_text',
|
||||
name: this.$el.attr('name'),
|
||||
});
|
||||
// Disable 'click' events
|
||||
this.$el.off('click');
|
||||
this.$el.on('click', function (ev) {
|
||||
ev.preventDefault();
|
||||
})
|
||||
|
||||
// Append button
|
||||
var $a = $('<a/>', {
|
||||
href: '#',
|
||||
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) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
|
Loading…
Reference in New Issue