mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #39)Small fix for copy button.
This commit is contained in:
@@ -30,10 +30,9 @@
|
|||||||
<li@if(active=="commits"){ class="active"}><a href="@url(repository)/commits/@id">Commits</a></li>
|
<li@if(active=="commits"){ class="active"}><a href="@url(repository)/commits/@id">Commits</a></li>
|
||||||
<li@if(active=="tags"){ class="active"}><a href="@url(repository)/tags">Tags@if(repository.tags.length > 0){ <span class="badge">@repository.tags.length</span>}</a></li>
|
<li@if(active=="tags"){ class="active"}><a href="@url(repository)/tags">Tags@if(repository.tags.length > 0){ <span class="badge">@repository.tags.length</span>}</a></li>
|
||||||
<li class="pull-right">
|
<li class="pull-right">
|
||||||
<div class="input-prepend input-append">
|
<div class="input-append">
|
||||||
<span class="add-on">HTTP</span>
|
|
||||||
<input type="text" value="@repository.url" id="repository-url" readonly>
|
<input type="text" value="@repository.url" id="repository-url" readonly>
|
||||||
<span id="repository-url-copy" class="add-on" data-clipboard-text="@repository.url" data-placement="bottom" title="copy to clipboard"><i class="icon-check"></i></span>
|
<span id="repository-url-copy" class="add-on btn" data-clipboard-text="@repository.url" data-toggle="tooltip" data-placement="bottom" title="copy to clipboard"><i class="icon-check"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -6,10 +6,9 @@
|
|||||||
<li@if(active == "pages"){ class="active"}><a href="@url(repository)/wiki/_pages">Pages</a></li>
|
<li@if(active == "pages"){ class="active"}><a href="@url(repository)/wiki/_pages">Pages</a></li>
|
||||||
<li@if(active == "history"){ class="active"}><a href="@url(repository)/wiki/_history">Wiki History</a></li>
|
<li@if(active == "history"){ class="active"}><a href="@url(repository)/wiki/_history">Wiki History</a></li>
|
||||||
<li class="pull-right">
|
<li class="pull-right">
|
||||||
<div class="input-prepend input-append">
|
<div class="input-append">
|
||||||
<span class="add-on">HTTP</span>
|
|
||||||
<input type="text" value="@repository.url.replaceFirst("\\.git$", ".wiki.git")" readonly id="repository-url">
|
<input type="text" value="@repository.url.replaceFirst("\\.git$", ".wiki.git")" readonly id="repository-url">
|
||||||
<span id="repository-url-copy" class="add-on" data-clipboard-text="@repository.url.replaceFirst("\\.git$", ".wiki.git")" data-placement="bottom" title="copy to clipboard"><i class="icon-check"></i></span>
|
<span id="repository-url-copy" class="add-on btn" data-clipboard-text="@repository.url.replaceFirst("\\.git$", ".wiki.git")" data-placement="bottom" title="copy to clipboard"><i class="icon-check"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
// disable Ajax cache
|
||||||
$.ajaxSetup({ cache: false });
|
$.ajaxSetup({ cache: false });
|
||||||
|
|
||||||
$('#repository-url').click(function(){
|
$('#repository-url').click(function(){
|
||||||
@@ -27,6 +28,7 @@ $(function(){
|
|||||||
moviePath: moviePath
|
moviePath: moviePath
|
||||||
});
|
});
|
||||||
var title = $('#repository-url-copy').attr('title');
|
var title = $('#repository-url-copy').attr('title');
|
||||||
|
$('#repository-url-copy').removeAttr('title')
|
||||||
clip.on('complete', function(client, args) {
|
clip.on('complete', function(client, args) {
|
||||||
$(clip.htmlBridge).attr('title', 'copied!').tooltip('fixTitle').tooltip('show');
|
$(clip.htmlBridge).attr('title', 'copied!').tooltip('fixTitle').tooltip('show');
|
||||||
$(clip.htmlBridge).attr('title', title).tooltip('fixTitle');
|
$(clip.htmlBridge).attr('title', title).tooltip('fixTitle');
|
||||||
@@ -37,5 +39,6 @@ $(function(){
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// syntax highlighting by google-code-prettify
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user