mirror of
https://github.com/go-gitea/gitea
synced 2024-08-19 22:00:48 +02:00
fix single bare page link
This commit is contained in:
parent
7f1fdf441f
commit
4efd73d37a
@ -181,20 +181,22 @@ function initUserSetting() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initRepository() {
|
function initRepository() {
|
||||||
|
(function () {
|
||||||
var $guide = $('.guide-box');
|
var $guide = $('.guide-box');
|
||||||
if ($guide.length) {
|
if ($guide.length) {
|
||||||
var $url = $('#guide-clone-url');
|
var $url = $('#guide-clone-url');
|
||||||
$guide.find('button[data-url]').on("click",function () {
|
$guide.find('button[data-link]').on("click",function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
if (!$this.hasClass('btn-primary')) {
|
if (!$this.hasClass('btn-primary')) {
|
||||||
$guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
|
$guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
|
||||||
$(this).addClass('btn-primary').removeClass('btn-default');
|
$(this).addClass('btn-primary').removeClass('btn-default');
|
||||||
$url.val($this.data("url"));
|
$url.val($this.data("link"));
|
||||||
$guide.find('span.clone-url').text($this.data('url'));
|
$guide.find('span.clone-url').text($this.data('link'));
|
||||||
}
|
}
|
||||||
}).eq(0).trigger("click");
|
}).eq(0).trigger("click");
|
||||||
// todo copy to clipboard
|
// todo copy to clipboard
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
Loading…
Reference in New Issue
Block a user