-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[11.0] [MIG] web_tree_image #1006
Conversation
…t on arbitrary media subtype
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
set resize="<width>,<height>" in the field tag definition to make the server return a resized version of the image. Useful for saving bandwidth when dealing with large images and to have uniform image sizes (aspect ratio is mantained by filling emtpy areas with transparent background)
* Stefan Rijnhart | ||
* Leonardo Donelli <donelli@webmonks.it> | ||
* Jay Vora <jay.vora@serpentcs.com> | ||
* Meet Dholakia <m.dholakia.serpentcs@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Jay and Meet names ; Replace by Serpent Consulting Services Pvt. Ltd. support@serpentcs.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, here it's supposed to have real persons. Your company is in the author list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, @nikul-serpentcs Add yours, dont remove any.
3dff926
to
0272bcc
Compare
Perhaps can be interesting show the image, in something like a tooltip, with real size when mouse is over the image. |
@OCA/web-maintainers Could you please confirm this, So I will work on it. CC @Tardo |
Yeah, that option is very interesting, but still limited the tooltip to a maximum size (based on a percentage of screen size for example), for avoiding overflowing the view when presenting the tooltip on very large images. |
web_tree_image/README.rst
Outdated
@@ -0,0 +1,55 @@ | |||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the target
* Meet Dholakia <m.dholakia.serpentcs@gmail.com> | ||
* Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com> | ||
|
||
Maintainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard footers or better the new fragmented README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elicoidal Improved Standard footer.
web_tree_image/__manifest__.py
Outdated
|
||
{ | ||
'name': 'Show images in tree views', | ||
'version': '11.0.1.1.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if first version then 11.0.1.0.0
12375e5
to
f434669
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it works without Javascript. Did you forget to commit it?
web_tree_image/README.rst
Outdated
|
||
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 ``height`` attribute. Default height is 16px. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default height is 30px (in the less file)
web_tree_image/README.rst
Outdated
|
||
Set the attribute ``widget=image`` in a ``field`` tag in a tree view. | ||
You can also set ``height=<height>`` to set the height the image will have. | ||
Note that this just sets the CSS ``max-height`` attribute, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still the case without the Javascript?
Yes @tarteo, In V11 added a widget for an image but height and width are not proper, so no need to Javascript for a particular widget. The only CSS we have a used and added a width in here And those things are described in already #1006 (comment). Thanks. |
@pedrobaeza @Tardo @JayVora-SerpentCS Added a tooltip as per #1006 (comment)
|
cc64360
to
0c48ab5
Compare
events: _.extend({}, ListRenderer.prototype.events, { | ||
'mouseover tbody tr td .o_field_image': '_onHoverRecord_img', | ||
}), | ||
_onHoverRecord_img: function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the indentation straight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tardo Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The tooltip is great!
@tarteo Thanks to you too 😃 |
@OCA/web-maintainers If Code & functional Review is done then move forward. |
@pedrobaeza @Tardo Waiting for your replay, If Done then merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Functional test
Functional OK but for me can be improved if tooltip shows with less delay... and scale image respecting proportions.. perhaps using 'image cropping'... 👍 |
@Tardo In the image, I used responsive classes and I checked in mobile view its work Good. In Code, I tried to reduce the maximum delay problems. |
@pedrobaeza @OCA/web-maintainers Waiting for your replay, If Done then move forward. |
It lacks this comment: "Functional OK but for me can be improved if tooltip shows with less delay.." |
@pedrobaeza I added a delay parameter with less delay issue, Could you please review it? CC @Tardo |
Thanks @yvaucher |
Hi @nikul-serpentcs thanks for your awesome work, I got a questions: if the property |
@JDSalcedo I already improved in v12 #1100 . If you have any doubts in v11 then you can Improve code and put change request (PR). |
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 aheight
attribute. Default height is 16px.