diff --git a/web_tree_image/README.rst b/web_tree_image/README.rst deleted file mode 100644 index 61ae8274..00000000 --- a/web_tree_image/README.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png - :alt: License: AGPL-3 - -===================================== -Display images and icons in tree view -===================================== - -This module defines a tree image widget, to be used with either binary fields -or (function) fields of type character. Use ``widget='image'`` in your view -definition. Optionally, set a ``width`` attribute. Default width is 30px. - -If you use the widget with a character field, the content of the field can be -any of the following: - -* The absolute or relative location of an image. For example, - "//static/src/img/youricon.png" - -* A standard icon from the web distribution, without path or extension, For - example, 'gtk-open' - -* A dynamic image in a data url base 64 format. Prefix with - 'data:image/png;base64,' - -Usage -===== - -Set the attribute ``widget=image`` in a ``field`` tag in a tree view. -You can also set ``height=`` to set the height the image will have. -Note that this just sets the CSS ``max-height`` attribute, -if you want to make the server return a resized, maybe to save data by making it -return a smaller one or to have uniform images, use the -``resize=","`` attribute. - -Credits -======= - -Contributors ------------- - -* Stefan Rijnhart -* Leonardo Donelli -* Jay Vora -* Meet Dholakia -* Nikul Chaudhary - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use. - -To contribute to this module, please visit https://odoo-community.org. diff --git a/web_tree_image/__init__.py b/web_tree_image/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/web_tree_image/static/src/js/tooltip.js b/web_tree_image/static/src/js/tooltip.js deleted file mode 100644 index a39f9afc..00000000 --- a/web_tree_image/static/src/js/tooltip.js +++ /dev/null @@ -1,17 +0,0 @@ -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-fluid').attr('src') - $(event.currentTarget).tooltip({ - title: "", - delay: 0, - }); - } - }); -}) diff --git a/web_tree_image_tooltip/README.rst b/web_tree_image_tooltip/README.rst new file mode 100644 index 00000000..f6633be9 --- /dev/null +++ b/web_tree_image_tooltip/README.rst @@ -0,0 +1,94 @@ +===================================== +Show images in tree views via tooltip +===================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/12.0/web_tree_image_tooltip + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_tree_image_tooltip + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module defines a images and icons in tree view via Tooltip. +Additionally, Default width with 30px. + + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Mouse Hover in tree view image that time Tooltip effect. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Therp BV +* MONK Software +* Serpent Consulting Services Pvt. Ltd. + +Contributors +~~~~~~~~~~~~ + +* Stefan Rijnhart +* Leonardo Donelli +* Jay Vora +* Meet Dholakia +* Nikul Chaudhary + + +Other credits +~~~~~~~~~~~~~ + +* Serpent Consulting Services Pvt. Ltd. + + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_tree_image_tooltip/__init__.py b/web_tree_image_tooltip/__init__.py new file mode 100644 index 00000000..6d4f4bde --- /dev/null +++ b/web_tree_image_tooltip/__init__.py @@ -0,0 +1 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/web_tree_image/__manifest__.py b/web_tree_image_tooltip/__manifest__.py similarity index 86% rename from web_tree_image/__manifest__.py rename to web_tree_image_tooltip/__manifest__.py index e7c98d60..b46057c1 100644 --- a/web_tree_image/__manifest__.py +++ b/web_tree_image_tooltip/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2014 Therp BV (). # Copyright 2015 Leonardo Donelli @ MONKSoftware # Copyright 2013 Marcel van der Boom @@ -7,13 +6,13 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Show images in tree views', + 'name': 'Show images in tree views via tooltip', 'version': '12.0.1.0.0', 'author': "Therp BV, " "MONK Software, " "Odoo Community Association (OCA), " "Serpent Consulting Services Pvt. Ltd.", - 'website': 'https://github.com/OCA/Web', + 'website': 'https://github.com/OCA/web', 'license': 'AGPL-3', 'category': 'Web', 'depends': [ diff --git a/web_tree_image/i18n/web_tree_image.pot b/web_tree_image_tooltip/i18n/web_tree_image.pot similarity index 100% rename from web_tree_image/i18n/web_tree_image.pot rename to web_tree_image_tooltip/i18n/web_tree_image.pot diff --git a/web_tree_image_tooltip/readme/CONTRIBUTORS.rst b/web_tree_image_tooltip/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..24b755f9 --- /dev/null +++ b/web_tree_image_tooltip/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Stefan Rijnhart +* Leonardo Donelli +* Jay Vora +* Meet Dholakia +* Nikul Chaudhary + diff --git a/web_tree_image_tooltip/readme/CREDITS.rst b/web_tree_image_tooltip/readme/CREDITS.rst new file mode 100644 index 00000000..7356ac20 --- /dev/null +++ b/web_tree_image_tooltip/readme/CREDITS.rst @@ -0,0 +1,2 @@ +* Serpent Consulting Services Pvt. Ltd. + diff --git a/web_tree_image_tooltip/readme/DESCRIPTION.rst b/web_tree_image_tooltip/readme/DESCRIPTION.rst new file mode 100644 index 00000000..092033b3 --- /dev/null +++ b/web_tree_image_tooltip/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module defines a images and icons in tree view via Tooltip. +Additionally, Default width with 30px. + diff --git a/web_tree_image_tooltip/readme/USAGE.rst b/web_tree_image_tooltip/readme/USAGE.rst new file mode 100644 index 00000000..a8eeccbf --- /dev/null +++ b/web_tree_image_tooltip/readme/USAGE.rst @@ -0,0 +1,2 @@ +Mouse Hover in tree view image that time Tooltip effect. + diff --git a/web_tree_image/static/description/icon.png b/web_tree_image_tooltip/static/description/icon.png similarity index 100% rename from web_tree_image/static/description/icon.png rename to web_tree_image_tooltip/static/description/icon.png diff --git a/web_tree_image_tooltip/static/description/index.html b/web_tree_image_tooltip/static/description/index.html new file mode 100644 index 00000000..3770dbf5 --- /dev/null +++ b/web_tree_image_tooltip/static/description/index.html @@ -0,0 +1,416 @@ + + + + + + +Show images in tree views via tooltip + + + +
+

Show images in tree views via tooltip

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

+

This module defines a images and icons in tree view via Tooltip. +Additionally, Default width with 30px.

+

Table of contents

+ +
+

Usage

+

Mouse Hover in tree view image that time Tooltip effect.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
  • MONK Software
  • +
  • Serpent Consulting Services Pvt. Ltd.
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/web_tree_image_tooltip/static/src/js/tooltip.js b/web_tree_image_tooltip/static/src/js/tooltip.js new file mode 100644 index 00000000..97b10e03 --- /dev/null +++ b/web_tree_image_tooltip/static/src/js/tooltip.js @@ -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: "", + delay: 0, + }); + } + }); +}) diff --git a/web_tree_image/static/src/scss/common.scss b/web_tree_image_tooltip/static/src/scss/common.scss similarity index 100% rename from web_tree_image/static/src/scss/common.scss rename to web_tree_image_tooltip/static/src/scss/common.scss diff --git a/web_tree_image/view/assets.xml b/web_tree_image_tooltip/view/assets.xml similarity index 53% rename from web_tree_image/view/assets.xml rename to web_tree_image_tooltip/view/assets.xml index 8db1946a..d0d628f0 100644 --- a/web_tree_image/view/assets.xml +++ b/web_tree_image_tooltip/view/assets.xml @@ -3,8 +3,8 @@