mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] Renamed web_tree_image_tooltip
This commit is contained in:
committed by
Christopher Ormaza
parent
4324ba4c41
commit
cfd61b9be1
19
web_tree_image_tooltip/static/src/js/tooltip.js
Normal file
19
web_tree_image_tooltip/static/src/js/tooltip.js
Normal file
@@ -0,0 +1,19 @@
|
||||
odoo.define('web_tree_image_tooltip.web_tree_image_tooltip',
|
||||
function (require) {
|
||||
"use strict";
|
||||
|
||||
var ListRenderer = require('web.ListRenderer');
|
||||
ListRenderer.include({
|
||||
events: _.extend({}, ListRenderer.prototype.events, {
|
||||
'mouseover tbody tr td .o_field_image': '_onHoverRecord_img',
|
||||
}),
|
||||
_onHoverRecord_img: function (event) {
|
||||
var img_src =
|
||||
$(event.currentTarget).children('.img-fluid').attr('src')
|
||||
$(event.currentTarget).tooltip({
|
||||
title: "<img src="+img_src+" />",
|
||||
delay: 0,
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
3
web_tree_image_tooltip/static/src/scss/common.scss
Normal file
3
web_tree_image_tooltip/static/src/scss/common.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.o_image_cell .o_field_image img{
|
||||
width:30px;
|
||||
}
|
||||
Reference in New Issue
Block a user