##// END OF EJS Templates
clipboard: added dummy placeholders for copying commits/paths via clipboard.js
marcink -
r1935:51b8a8f9 default
parent child Browse files
Show More
@@ -60,6 +60,7 b''
60 60 .icon-hg:before { content: '\e82d'; } /* '' */
61 61 .icon-svn:before { content: '\e82e'; } /* '' */
62 62 .icon-plus:before { content: '\e813'; } /* '' */
63 .icon-clipboard:before { content: '\e813'; } /* '' */
63 64 .icon-minus:before { content: '\e814'; } /* '' */
64 65 .icon-remove:before { content: '\e815'; } /* '' */
65 66 .icon-bookmark:before { content: '\e803'; } /* '' */
@@ -210,6 +210,20 b' var timeagoActivate = function() {'
210 210 $("time.timeago").timeago();
211 211 };
212 212
213
214 var clipboardActivate = function() {
215 /*
216 *
217 * <i class="tooltip icon-plus clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i>
218 * */
219 var clipboard = new Clipboard('.clipboard-action');
220
221 clipboard.on('success', function(e) {
222 e.clearSelection();
223 });
224 };
225
226
213 227 // Formatting values in a Select2 dropdown of commit references
214 228 var formatSelect2SelectionRefs = function(commit_ref){
215 229 var tmpl = '';
@@ -133,6 +133,7 b" c.template_context['default_user'] = {"
133 133 $(document).ready(function(){
134 134 show_more_event();
135 135 timeagoActivate();
136 clipboardActivate();
136 137 })
137 138 </script>
138 139
@@ -45,6 +45,8 b''
45 45 </td>
46 46 <td class="td-hash">
47 47 <code>
48 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i>
49
48 50 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">
49 51 <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span>
50 52 </a>
@@ -35,6 +35,7 b''
35 35 <span class="breadcrumbs files_location">
36 36 <h4>${_('Commit')}
37 37 <code>
38 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i>
38 39 ${h.show_id(c.commit)}
39 40 % if hasattr(c.commit, 'phase'):
40 41 <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span>
@@ -10,7 +10,8 b''
10 10 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
11 11 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
12 12 <span> | ${c.file.mimetype} </span>
13 <span class="item last"> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
13 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
14 <span class="item last"> | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.file.path}" title="${_('Copy the full path')}"></i></span>
14 15 </div>
15 16 <div class="buttons">
16 17 <a id="file_history_overview" href="#">
General Comments 0
You need to be logged in to leave comments. Login now