##// END OF EJS Templates
templates: add copy to clipboard for repository clone.
marcink -
r1942:f50c2856 default
parent child Browse files
Show More
@@ -58,12 +58,12 b''
58 }
58 }
59
59
60 #clone_url {
60 #clone_url {
61 width: ~"calc(100% - 96px)";
61 width: ~"calc(100% - 103px)";
62 padding: @padding/4;
62 padding: @padding/4;
63 }
63 }
64
64
65 #clone_url_id {
65 #clone_url_id {
66 width: ~"calc(100% - 118px)";
66 width: ~"calc(100% - 125px)";
67 padding: @padding/4;
67 padding: @padding/4;
68 }
68 }
69
69
@@ -106,7 +106,7 b''
106
106
107 #clone_by_name, #clone_by_id{
107 #clone_by_name, #clone_by_id{
108 display: inline-block;
108 display: inline-block;
109 margin-left: @padding;
109 margin-left: 0px;
110 }
110 }
111
111
112 .codeblock {
112 .codeblock {
@@ -50,9 +50,14 b''
50 </div>
50 </div>
51 <div class="right-content disabled">
51 <div class="right-content disabled">
52 <input type="text" class="input-monospace" id="clone_url" disabled value="${c.clone_repo_url}"/>
52 <input type="text" class="input-monospace" id="clone_url" disabled value="${c.clone_repo_url}"/>
53 <i id="clone_by_name_copy" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i>
54
53 <input type="text" class="input-monospace" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/>
55 <input type="text" class="input-monospace" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/>
56 <i id="clone_by_id_copy" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}" style="display: none"></i>
57
54 <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a>
58 <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a>
55 <a id="clone_by_id" class="clone">${_('Show by ID')}</a>
59 <a id="clone_by_id" class="clone">${_('Show by ID')}</a>
60
56 <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p>
61 <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p>
57 </div>
62 </div>
58 %else:
63 %else:
@@ -61,7 +66,11 b''
61 </div>
66 </div>
62 <div class="right-content">
67 <div class="right-content">
63 <input type="text" class="input-monospace" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
68 <input type="text" class="input-monospace" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
69 <i id="clone_by_name_copy" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i>
70
64 <input type="text" class="input-monospace" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/>
71 <input type="text" class="input-monospace" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/>
72 <i id="clone_by_id_copy" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}" style="display: none"></i>
73
65 <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a>
74 <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a>
66 <a id="clone_by_id" class="clone">${_('Show by ID')}</a>
75 <a id="clone_by_id" class="clone">${_('Show by ID')}</a>
67 </div>
76 </div>
@@ -69,6 +69,10 b''
69 $('#clone_by_id').show();
69 $('#clone_by_id').show();
70 $('#clone_url_id').hide();
70 $('#clone_url_id').hide();
71
71
72 // hide copy by id
73 $('#clone_by_name_copy').show();
74 $('#clone_by_id_copy').hide();
75
72 });
76 });
73 $('#clone_by_id').on('click',function(e){
77 $('#clone_by_id').on('click',function(e){
74
78
@@ -79,6 +83,10 b''
79 // hide url by name and show id button
83 // hide url by name and show id button
80 $('#clone_by_name').show();
84 $('#clone_by_name').show();
81 $('#clone_url').hide();
85 $('#clone_url').hide();
86
87 // hide copy by id
88 $('#clone_by_id_copy').show();
89 $('#clone_by_name_copy').hide();
82 });
90 });
83
91
84 var initialCommitData = {
92 var initialCommitData = {
General Comments 0
You need to be logged in to leave comments. Login now