From 3d9cda2d98940102b1bdffc053e036cc696b9f8e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 1 Feb 2015 08:46:53 -0500 Subject: [PATCH] public/ng: fix auto-completion #832 --- gogs.go | 2 +- public/js/app.js | 16 ---------------- public/ng/js/gogs.js | 2 +- templates/.VERSION | 2 +- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/gogs.go b/gogs.go index bdd3a8211..423d30190 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.12.0131 Beta" +const APP_VER = "0.5.12.0201 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/public/js/app.js b/public/js/app.js index 23b629e3e..61539148e 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1052,22 +1052,6 @@ function initRepoSetting() { return; } Gogits.getUsers($this.val(), $this.next()); - /*$.ajax({ - url: '/api/v1/users/search?q=' + $this.val(), - dataType: "json", - success: function (json) { - if (json.ok && json.data.length) { - var html = ''; - $.each(json.data, function (i, item) { - html += '
  • ' + item.username + '
  • '; - }); - $this.next().toggleShow(); - $this.next().find('ul').html(html); - } else { - $this.next().toggleHide(); - } - } - });*/ }).on('focus', function () { if (!$(this).val()) { $(this).next().toggleHide(); diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index ff38bda9d..f0bb76330 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -608,7 +608,7 @@ function initTeamMembersList() { $ul.toggleShow(); } }).next().next().find('ul').on("click", 'li', function () { - $('#org-team-members-add').val($(this).text()); + $('#org-team-members-add').val($(this).find('.username').text()); $ul.toggleHide(); }); } diff --git a/templates/.VERSION b/templates/.VERSION index ab97c4a15..6e3c63ed8 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.12.0131 Beta \ No newline at end of file +0.5.12.0201 Beta \ No newline at end of file