diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-04-06 16:48:02 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-04-06 16:48:02 +0800 |
commit | d3a987eded8bf2d0afc35dce32238e59da8080a8 (patch) | |
tree | 8d94bf76ca20cf2cc6ea1c5eda04ef61c50b71fc /public | |
parent | 1b0142513e21fd37d477ca776ccf8d6f6f1bc928 (diff) | |
download | gitea-d3a987eded8bf2d0afc35dce32238e59da8080a8.tar.gz gitea-d3a987eded8bf2d0afc35dce32238e59da8080a8.zip |
username & repo-name changing help message
Diffstat (limited to 'public')
-rw-r--r-- | public/js/app.js | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js index 93e01abd28..059663e1a2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -354,6 +354,7 @@ function initRegister() { } function initUserSetting() { + // ssh confirmation $('#ssh-keys .delete').confirmation({ singleton: true, onConfirm: function (e, $this) { @@ -366,6 +367,18 @@ function initUserSetting() { }); } }); + + // profile form + (function () { + $('#user-setting-username').on("keyup", function () { + var $this = $(this); + if ($this.val() != $this.attr('title')) { + $this.next('.help-block').toggleShow(); + } else { + $this.next('.help-block').toggleHide(); + } + }); + }()) } function initRepository() { @@ -383,7 +396,7 @@ function initRepository() { $clone.find('span.clone-url').text($this.data('link')); } }).eq(0).trigger("click"); - $("#repo-clone").on("shown.bs.dropdown",function () { + $("#repo-clone").on("shown.bs.dropdown", function () { Gogits.bindCopy("[data-init=copy]"); }); Gogits.bindCopy("[data-init=copy]:visible"); @@ -438,6 +451,18 @@ function initRepository() { $item.find(".bar .add").css("width", addPercent + "%"); }); }()); + + // repo setting form + (function () { + $('#repo-setting-name').on("keyup", function () { + var $this = $(this); + if ($this.val() != $this.attr('title')) { + $this.next('.help-block').toggleShow(); + } else { + $this.next('.help-block').toggleHide(); + } + }); + }()) } function initInstall() { |