diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-02-16 12:16:42 +0800 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-02-16 05:16:42 +0100 |
commit | 4c12e2a4b90237a8687b497ae14a402346b0406d (patch) | |
tree | 3853168056da33a1dbecb39e6a2e6580b45b60dd /public | |
parent | 7fd14bf7bd96849f3f64a3bcbfb914050c063660 (diff) | |
download | gitea-4c12e2a4b90237a8687b497ae14a402346b0406d.tar.gz gitea-4c12e2a4b90237a8687b497ae14a402346b0406d.zip |
fix: fill in ssh key title on setting of repo (#950)
* fix: fill in ssh key title on setting of repo
* fix: Don't overwrite ssh key title if exist.
Diffstat (limited to 'public')
-rw-r--r-- | public/js/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js index 2e0e26f55c..f443e52436 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1491,10 +1491,10 @@ $(function () { // Parse SSH Key $("#ssh-key-content").on('change paste keyup',function(){ - var value = $(this).val(); - var arrays = value.split(" "); - if (arrays.length === 3 && arrays[2] !== "") { - $("#ssh-key-title").val(arrays[2]); + var arrays = $(this).val().split(" "); + var $title = $("#ssh-key-title") + if ($title.val() === "" && arrays.length === 3 && arrays[2] !== "") { + $title.val(arrays[2]); } }); }); |