-
Notifications
You must be signed in to change notification settings - Fork 96
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
DMSF thumbnails support #40
Comments
This should be doable. I will try to have a look in the next couple of days... |
Note: In Redmine 3.4 the DMFS plugin seems to have a bug with the |
Alright, this has been resolved with new version 0.4.1 for Redmine 3.4 |
Adds the `thumbnail` class to DMSF thumbnails created by the DMSF thumbnail macro: `{{dmsftn(123)}}` # Conflicts solved by tofi86 # assets/javascripts/lightbox.js
This has been backported to Redmine 3.3 branch without testing and made available as version 0.3.4 for Redmine 3.3 |
Thanks for the work done! But v0.3.4 doesn't work with |
Unfortunately I don't have a Redmine 3.3 around here for testing. I could set up a dev installation but that would take a while. Can you please copy the HTML And then please disable the lightbox plugin and copy the same, original element once again and insert here. This is the original element and I have to see what I have to modify. |
With redmine_lightbox2 v0.3.4 <a target="_blank" title="" data-downloadurl="image/png:TEST_IMAGE.png:/dmsf/files/351/view" href="/dmsf/files/351/view"><img alt="TEST_IMAGE" width="auto" height="200" src="/dmsf/files/351/view" /></a> Without redmine_lightbox2 v0.3.4 ( <a target="_blank" title="" data-downloadurl="image/png:TEST_IMAGE.png:/dmsf/files/351/view" href="/dmsf/files/351/view"><img alt="TEST_IMAGE" width="auto" height="200" src="/dmsf/files/351/view" /></a> They are seem identically? |
Thanks! Indeed they look the same, but with the lightbox it should look different... Which browser do you use? Where did you use the thumbnail macro? On a wiki page or in an issue description/comment? Or somewhere else? Can you reinstall the plugin and make sure you run the plugin migration? And also make sure to clear the browser cache for your redmine site after that so that JavaScript files get a fresh reload... |
This helped. Thanks! btw, |
... and description from dmsf file. I mean adding the result of |
Great! Glad it works now! :-) |
I had a look at this as well, but it does not generate a Thumbnail Link (a element) which I could use as an anchor for the lightbox. So no, this will not be supported. |
This is not doable because the description does not exist in the html code when {{dmsftn()}} macro was executed. I only add lightbox effect with javascript when page is loaded but in that stage I cannot pull the description with a macro anymore. Sorry. |
I have When I click to corresdoning link the
|
Thanks for reporting this. I will try to have a look this week... |
I pushed a fix to the Can you please test it? It should work.
Is this okay? If so, please tell me and I will release a new version in the next couple of days... |
Unfortunately without any changes. May be I made a mistake while update? I use redmine 3.3 and I made git fetch
git checkout redmine-3.3
bundle exec rake redmine:plugins:migrate RAILS_ENV=production What I noted. After saving the text with |
I assume you have already cloned the repository and checked out the branch
Try again and reload the page without cache (clear browser cache first or e.g. with Firefox use Ctrl+Shift+R). |
It's ok now. Thanks! |
Perfect! Glad it works! Enjoy! |
*.bmp files are not avalible in preview. |
As far as I know, bmp is also not supported as thumbnail in Redmine. The plugin never supported bmp files for preview, only JPG, JPEG, PNG, GIF. |
Dear @tofi86, Redmine DMSF 1.6.x allows documents attachements to issue. Is it doable to add preview thumbnails of DMS section with preview lightbox? Current variantAttachments section
<div class="attachments">
<div class="contextual">
<a title="Edit attached files" class="icon-only icon-edit" href="/attachments/issues/562/edit">Edit attached files</a>
</div>
<table>
<tbody><tr>
<td>
<a class="icon icon-attachment lightbox_preview" href="/attachments/download/820/test_image0.jpg">test_image0.jpg</a> </td>
<td class="alignrigth">
<a class="icon-only icon-magnifier lightbox_preview jpg" rel="attachments" title="test_image0.jpg" href="/attachments/download/820/test_image0.jpg">View</a>
<a class="icon-only icon-download" title="Download" href="/attachments/download/820/test_image0.jpg">test_image0.jpg</a> </td>
<td class="alignrigth">
<span class="size">763 KB</span>
</td>
<td></td>
<td>
<span class="author">Redmine Admin, 04/19/2018 12:16 PM</span>
</td>
<td>
<a data-confirm="Are you sure?" class="delete icon-only icon-del" title="Delete" rel="nofollow" data-method="delete" href="/attachments/820">Delete</a>
</td>
</tr>
</tbody></table>
<div class="images">
<a class="lightbox" rel="thumbnails" title="test_image0.jpg" href="/attachments/download/820/test_image0.jpg"><img src="/attachments/download/820/test_image0.jpg" alt="Test image0" width="180"></a>
</div>
</div> DMS section
<div class="attachments dmsf_parent_container">
<p>
<a class="thumbnail" title="test_image1.jpg" href="/dmsf/files/1329/view" data-fancybox-type="image">test image1</a>
<a class="icon-only icon-magnifier" title="View" href="/dmsf/files/1329/view">View</a>
<span class="size">(760 KB)</span>
<span class="author">Redmine Admin, 04/19/2018 12:17 PM</span>
<span class="dmsf_upload_select">
<a title="test image1 details" class="icon-only icon-edit" href="/dmsf/files/1329"></a>
<a title="Send documents by email" class="icon-only icon-email-disabled" rel="nofollow" data-method="post" href="/projects/5/dmsf/entries?email_entries=email&files%5B%5D=1329"></a>
<a title="Lock to prevent changes for other members" class="icon-only icon-lock" href="/dmsf/files/1329/lock"></a>
<a title="Notifications not active: Activate" class="icon-only icon-email-add" href="/dmsf/files/1329/notify/activate"></a>
<a data-confirm="Are you sure?" title="Delete" class="icon-only icon-del" rel="nofollow" data-method="delete" href="/dmsf/files/1329?commit=yes"></a>
<span class="icon-only"></span>
</span>
</p>
<p>
<a target="_blank" class="icon icon-file filetype-docx dmsf-icon-file" title="" data-downloadurl="application/vnd.openxmlformats-officedocument.wordprocessingml.document:test ms word document.docx:/dmsf/files/1330/view" href="/dmsf/files/1330/view">test ms word document</a>
<span class="size">(24.1 KB)</span>
<span class="author">Redmine Admin, 04/19/2018 12:38 PM</span>
<span class="dmsf_upload_select">
<a title="test ms word document details" class="icon-only icon-edit" href="/dmsf/files/1330"></a>
<a title="Send documents by email" class="icon-only icon-email-disabled" rel="nofollow" data-method="post" href="/projects/5/dmsf/entries?email_entries=email&files%5B%5D=1330"></a>
<a title="Lock to prevent changes for other members" class="icon-only icon-lock" href="/dmsf/files/1330/lock"></a>
<a title="Notifications not active: Activate" class="icon-only icon-email-add" href="/dmsf/files/1330/notify/activate"></a>
<a data-confirm="Are you sure?" title="Delete" class="icon-only icon-del" rel="nofollow" data-method="delete" href="/dmsf/files/1330?commit=yes"></a>
<span class="icon-only"></span>
</span>
</p>
</div> WantDMS section like this
<div class="attachments dmsf_parent_container">
<p>
<a class="thumbnail" title="test_image1.jpg" href="/dmsf/files/1329/view" data-fancybox-type="image">test image1</a>
<a class="icon-only icon-magnifier" title="View" href="/dmsf/files/1329/view">View</a>
<span class="size">(760 KB)</span>
<span class="author">Redmine Admin, 04/19/2018 12:17 PM</span>
<span class="dmsf_upload_select">
<a title="test image1 details" class="icon-only icon-edit" href="/dmsf/files/1329"></a>
<a title="Send documents by email" class="icon-only icon-email-disabled" rel="nofollow" data-method="post" href="/projects/5/dmsf/entries?email_entries=email&files%5B%5D=1329"></a>
<a title="Lock to prevent changes for other members" class="icon-only icon-lock" href="/dmsf/files/1329/lock"></a>
<a title="Notifications not active: Activate" class="icon-only icon-email-add" href="/dmsf/files/1329/notify/activate"></a>
<a data-confirm="Are you sure?" title="Delete" class="icon-only icon-del" rel="nofollow" data-method="delete" href="/dmsf/files/1329?commit=yes"></a>
<span class="icon-only"></span>
</span>
</p>
<p>
<a target="_blank" class="icon icon-file filetype-docx dmsf-icon-file" title="" data-downloadurl="application/vnd.openxmlformats-officedocument.wordprocessingml.document:test ms word document.docx:/dmsf/files/1330/view" href="/dmsf/files/1330/view">test ms word document</a>
<span class="size">(24.1 KB)</span>
<span class="author">Redmine Admin, 04/19/2018 12:38 PM</span>
<span class="dmsf_upload_select">
<a title="test ms word document details" class="icon-only icon-edit" href="/dmsf/files/1330"></a>
<a title="Send documents by email" class="icon-only icon-email-disabled" rel="nofollow" data-method="post" href="/projects/5/dmsf/entries?email_entries=email&files%5B%5D=1330"></a>
<a title="Lock to prevent changes for other members" class="icon-only icon-lock" href="/dmsf/files/1330/lock"></a>
<a title="Notifications not active: Activate" class="icon-only icon-email-add" href="/dmsf/files/1330/notify/activate"></a>
<a data-confirm="Are you sure?" title="Delete" class="icon-only icon-del" rel="nofollow" data-method="delete" href="/dmsf/files/1330?commit=yes"></a>
<span class="icon-only"></span>
</span>
</p>
<div class="images">
<a class="lightbox" rel="thumbnails" title="test_image1.jpg" href="/dmsf/files/1329/view"><img src="/dmsf/files/1329/view" alt="test image1" width="180"></a>
</div>
</div> My environmentMy environment
|
The dmsf project needs to fix severe bug danmunn/redmine_dmsf#845 first before I can do this. Anyways, how is it possible to attach dmsf files to an issue? Haven't found a solution (but also couldn't access projects settings due to bug mentioned above). |
Look at |
found it, thanks! "act as attachable" |
Okay. Pardon, I just thought the request is in this issue context. |
Thanks a lot for amazing plugin!
The question
The first works well with redmine_lightbox2 (I use v0.3.2) --- the figure is opened in the current tab as window. The second doesn't work --- it's opened in the new tab like without redmine_lightbox2.
Is it possible to add DMSF thumbnails support?
The text was updated successfully, but these errors were encountered: