Browse Source

fix single bare page link

pull/32/head
FuXiaoHei 11 years ago
parent
commit
4efd73d37a
  1. 8
      public/js/app.js

8
public/js/app.js

@ -181,20 +181,22 @@ function initUserSetting() {
}
function initRepository() {
(function () {
var $guide = $('.guide-box');
if ($guide.length) {
var $url = $('#guide-clone-url');
$guide.find('button[data-url]').on("click",function () {
$guide.find('button[data-link]').on("click",function () {
var $this = $(this);
if (!$this.hasClass('btn-primary')) {
$guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
$(this).addClass('btn-primary').removeClass('btn-default');
$url.val($this.data("url"));
$guide.find('span.clone-url').text($this.data('url'));
$url.val($this.data("link"));
$guide.find('span.clone-url').text($this.data('link'));
}
}).eq(0).trigger("click");
// todo copy to clipboard
}
})();
}
(function ($) {

Loading…
Cancel
Save