Browse Source
Merge pull request #254 from rz-comp/8.0
Merge pull request #254 from rz-comp/8.0
add a full screen preview option to the tree image widgetpull/227/head
Pedro M. Baeza
9 years ago
3 changed files with 104 additions and 22 deletions
-
10web_tree_image/README.rst
-
71web_tree_image/static/src/js/web_tree_image.js
-
39web_tree_image/static/src/xml/widget.xml
@ -1,6 +1,39 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<templates id="template" xml:space="preserve"> |
|
||||
<img t-name="ListView.row.image" |
|
||||
|
<templates id="template"> |
||||
|
<t t-name="ListView.row.image"><!-- |
||||
|
Inline display of the image. |
||||
|
--><img t-if="widget.display == 'inline'" |
||||
t-att-height="widget.height || 16" |
t-att-height="widget.height || 16" |
||||
t-att-src="src" /> |
|
||||
|
t-att-src="widget.src" /><!-- |
||||
|
Icon that can be clicked for a full screen preview of the image. |
||||
|
--><span t-if="widget.display == 'icon'" |
||||
|
t-att-id="clickableId" |
||||
|
class="fa fa-picture-o" /><!-- |
||||
|
Thumbnail that can be clicked for a full screen preview of the image. |
||||
|
--><img t-if="widget.display == 'thumbnail'" |
||||
|
t-att-id="clickableId" |
||||
|
t-att-height="widget.height || 16" |
||||
|
t-att-src="widget.src" /> |
||||
|
</t> |
||||
|
|
||||
|
<!-- Use a separate template for the content of the full screen preview, |
||||
|
as it has to be inserted into the DOM separately, otherwise its |
||||
|
z-index is affected by parent elements and it does not appear |
||||
|
correctly in the foreground. --> |
||||
|
<div t-name="ListView.row.image.imageData" t-att-id="popupId" |
||||
|
class="modal" tabindex="-1"> |
||||
|
<div class="modal-dialog"> |
||||
|
<div class="modal-content"> |
||||
|
<div class="modal-header"> |
||||
|
<button type="button" class="close" data-dismiss="modal"> |
||||
|
x |
||||
|
</button> |
||||
|
<h4 class="modal-title">Image preview</h4> |
||||
|
</div> |
||||
|
<div class="modal-body"> |
||||
|
<img t-att-src="widget.src" class="img-responsive" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
</templates> |
</templates> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue