Browse Source

[MIG] web_tree_image v12

pull/1279/merge
Nikul Chaudhary 6 years ago
committed by OCA-git-bot
parent
commit
630a37438b
  1. 2
      web_tree_image/__manifest__.py
  2. 3
      web_tree_image/static/src/js/tooltip.js
  3. 0
      web_tree_image/static/src/scss/common.scss
  4. 2
      web_tree_image/view/assets.xml

2
web_tree_image/__manifest__.py

@ -8,7 +8,7 @@
{
'name': 'Show images in tree views',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'author': "Therp BV, "
"MONK Software, "
"Odoo Community Association (OCA), "

3
web_tree_image/static/src/js/tooltip.js

@ -2,13 +2,12 @@ odoo.define('web_tree_image.web_tree_image', 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-responsive').attr('src')
var img_src = $(event.currentTarget).children('.img-fluid').attr('src')
$(event.currentTarget).tooltip({
title: "<img src="+img_src+" />",
delay: 0,

0
web_tree_image/static/src/less/common.less → web_tree_image/static/src/scss/common.scss

2
web_tree_image/view/assets.xml

@ -3,7 +3,7 @@
<template id="assets_backend" name="tree icon assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel='stylesheet' href='/web_tree_image/static/src/less/common.less'/>
<link rel='stylesheet' href='/web_tree_image/static/src/scss/common.scss'/>
<script type="text/javascript" src="/web_tree_image/static/src/js/tooltip.js"/>
</xpath>
</template>

Loading…
Cancel
Save