summaryrefslogtreecommitdiffstats
path: root/public/ng/js/gogs.js
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-15 23:37:33 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-15 23:37:33 +0800
commit78add502d71dca43bb59ab9ad91745c64d0bf74d (patch)
tree5fec228a2f7460b68e4c7c0674c194ede8753d26 /public/ng/js/gogs.js
parent36b4c57ff13198196134b853f624fb633061734d (diff)
downloadgitea-78add502d71dca43bb59ab9ad91745c64d0bf74d.tar.gz
gitea-78add502d71dca43bb59ab9ad91745c64d0bf74d.zip
Finish new organization members and invitation page
Diffstat (limited to 'public/ng/js/gogs.js')
-rw-r--r--public/ng/js/gogs.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index ad8df99716..5e6a6a6b91 100644
--- a/public/ng/js/gogs.js
+++ b/public/ng/js/gogs.js
@@ -329,6 +329,28 @@ function initOrgSetting() {
});
}
+function initInvite() {
+ // Invitation.
+ var $ul = $('#org-member-invite-list');
+ $('#org-member-invite').on('keyup', function () {
+ var $this = $(this);
+ if (!$this.val()) {
+ $ul.toggleHide();
+ return;
+ }
+ Gogs.searchUsers($this.val(), $ul);
+ }).on('focus', function () {
+ if (!$(this).val()) {
+ $ul.toggleHide();
+ } else {
+ $ul.toggleShow();
+ }
+ }).next().next().find('ul').on("click", 'li', function () {
+ $('#org-member-invite').val($(this).text());
+ $ul.toggleHide();
+ });
+}
+
$(document).ready(function () {
initCore();
if ($('#user-profile-setting').length) {
@@ -343,6 +365,9 @@ $(document).ready(function () {
if ($('#org-setting').length) {
initOrgSetting();
}
+ if ($('#invite-box').length) {
+ initInvite();
+ }
Tabs('#dashboard-sidebar-menu');