##// 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 .icon-hg:before { content: '\e82d'; } /* '' */
60 .icon-hg:before { content: '\e82d'; } /* '' */
61 .icon-svn:before { content: '\e82e'; } /* '' */
61 .icon-svn:before { content: '\e82e'; } /* '' */
62 .icon-plus:before { content: '\e813'; } /* '' */
62 .icon-plus:before { content: '\e813'; } /* '' */
63 .icon-clipboard:before { content: '\e813'; } /* '' */
63 .icon-minus:before { content: '\e814'; } /* '' */
64 .icon-minus:before { content: '\e814'; } /* '' */
64 .icon-remove:before { content: '\e815'; } /* '' */
65 .icon-remove:before { content: '\e815'; } /* '' */
65 .icon-bookmark:before { content: '\e803'; } /* '' */
66 .icon-bookmark:before { content: '\e803'; } /* '' */
@@ -210,6 +210,20 b' var timeagoActivate = function() {'
210 $("time.timeago").timeago();
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 // Formatting values in a Select2 dropdown of commit references
227 // Formatting values in a Select2 dropdown of commit references
214 var formatSelect2SelectionRefs = function(commit_ref){
228 var formatSelect2SelectionRefs = function(commit_ref){
215 var tmpl = '';
229 var tmpl = '';
@@ -133,6 +133,7 b" c.template_context['default_user'] = {"
133 $(document).ready(function(){
133 $(document).ready(function(){
134 show_more_event();
134 show_more_event();
135 timeagoActivate();
135 timeagoActivate();
136 clipboardActivate();
136 })
137 })
137 </script>
138 </script>
138
139
@@ -45,6 +45,8 b''
45 </td>
45 </td>
46 <td class="td-hash">
46 <td class="td-hash">
47 <code>
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 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">
50 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}">
49 <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span>
51 <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span>
50 </a>
52 </a>
@@ -35,6 +35,7 b''
35 <span class="breadcrumbs files_location">
35 <span class="breadcrumbs files_location">
36 <h4>${_('Commit')}
36 <h4>${_('Commit')}
37 <code>
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 ${h.show_id(c.commit)}
39 ${h.show_id(c.commit)}
39 % if hasattr(c.commit, 'phase'):
40 % if hasattr(c.commit, 'phase'):
40 <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span>
41 <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span>
@@ -10,7 +10,8 b''
10 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
10 <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
11 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
11 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
12 <span> | ${c.file.mimetype} </span>
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 </div>
15 </div>
15 <div class="buttons">
16 <div class="buttons">
16 <a id="file_history_overview" href="#">
17 <a id="file_history_overview" href="#">
General Comments 0
You need to be logged in to leave comments. Login now