Commit 2bbeda89 authored by Luc Didry's avatar Luc Didry
Browse files

Add Copy img code link + refactoring + bugs

parent d0444cfc
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -45,7 +45,3 @@
</tbody>
</table>
</div>
%= javascript begin
window.mod_url = '<%= url_for('mod_app') %>';
window.del_url = '<%= url_for('del_app') %>';
% end
......@@ -90,6 +90,4 @@
<!-- List of categories -->
%= javascript begin
window.nextCollapse = <%= $categories->size + 1 %>;
window.mod_url = '<%= url_for('mod_cat') %>';
window.del_url = '<%= url_for('del_cat') %>';
% end
......@@ -52,6 +52,4 @@
</div>
%= javascript begin
window.nextCollapse = '<%= $dolos->size + 1 %>';
window.mod_url = '<%= url_for('mod_dolo') %>';
window.del_url = '<%= url_for('del_dolo') %>';
% end
......@@ -6,6 +6,7 @@ var i18n = {
rmDolo: '<%= l('Delete dolo') %>',
modDolo: '<%= l('Modify dolo') %>',
copyDolo: '<%= l('Copy dolomon URL')%>',
copyImgDolo: '<%= l('Copy image code')%>',
doloRmName: '<%= l('Are you sure you want to delete the dolo XXXX?') %>',
emptyPix: '<%= l('Use a transparent gif as target') %>',
showCat: '<%= l('Show category') %>',
......@@ -71,6 +72,14 @@ var url = {
remove_user_url: '<%= url_for('admin_remove_user') %>',
impersonate_url: '<%= url_for('admin_impersonate') %>',
dashboard_url: '<%= url_for('dashboard')->to_abs %>',
mod_dolo: '<%= url_for('mod_dolo') %>',
del_dolo: '<%= url_for('del_dolo') %>',
mod_app: '<%= url_for('mod_app') %>',
del_app: '<%= url_for('del_app') %>',
mod_cat: '<%= url_for('mod_cat') %>',
del_cat: '<%= url_for('del_cat') %>',
mod_tag: '<%= url_for('mod_tag') %>',
del_tag: '<%= url_for('del_tag') %>',
};
$.ready(function() {
$().alert();
......
......@@ -72,6 +72,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($e->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $e->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......@@ -147,6 +156,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($f->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $f->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......
......@@ -66,6 +66,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($d->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $d->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......@@ -136,6 +145,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($f->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $f->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......
......@@ -51,6 +51,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($d->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $d->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......@@ -105,6 +114,15 @@
<%= l('Copy dolomon URL') %>
</a>
</li>
% if ($f->url eq url_for('/1px.gif')->to_abs) {
<li>
<a class="action-copy" href="#"
data-text='<img src="<%= url_for('hit', short => $f->short)->to_abs %>" alt="">'>
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
<%= l('Copy image code') %>
</a>
</li>
% }
</ul>
</div>
</div>
......
......@@ -94,6 +94,4 @@
<!-- List of tags -->
%= javascript begin
window.nextCollapse = <%= $tags->size + 1 %>;
window.mod_url = '<%= url_for('mod_tag') %>';
window.del_url = '<%= url_for('del_tag') %>';
% end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment