summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-24 21:09:05 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-24 21:09:05 +0800
commit21a1b8e5a35c61bff30145ac3194ea893a9c6b68 (patch)
treeb218aedd0d64252d95725f12338a1ced1f155ba9 /public
parente325c8499a102ba8a6a84236c02dd7951f46cec5 (diff)
downloadgitea-21a1b8e5a35c61bff30145ac3194ea893a9c6b68.tar.gz
gitea-21a1b8e5a35c61bff30145ac3194ea893a9c6b68.zip
Finish new edit team page, add member to team
Diffstat (limited to 'public')
-rw-r--r--public/ng/css/gogs.css17
-rw-r--r--public/ng/js/gogs.js41
-rw-r--r--public/ng/less/gogs/organization.less15
-rw-r--r--public/ng/less/gogs/repository.less1
4 files changed, 74 insertions, 0 deletions
diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css
index 9aa7206bdf..48468c7e80 100644
--- a/public/ng/css/gogs.css
+++ b/public/ng/css/gogs.css
@@ -1298,27 +1298,33 @@ The register and sign-in page style
.repo-setting-zone {
padding: 30px;
}
+#team-members-list,
#repo-collab-list {
list-style: none;
padding: 10px 0 5px 0;
}
+#team-members-list li.collab,
#repo-collab-list li.collab {
clear: both;
height: 50px;
padding: 0 15px 0 15px;
}
+#team-members-list a.member,
#repo-collab-list a.member {
color: #444;
height: 50px;
line-height: 50px;
}
+#team-members-list a.member:hover,
#repo-collab-list a.member:hover {
color: #4183C4;
}
+#team-members-list .avatar,
#repo-collab-list .avatar {
margin-right: 1em;
width: 40px;
}
+#team-members-list .remove-collab,
#repo-collab-list .remove-collab {
color: #DD4B39;
}
@@ -1871,3 +1877,14 @@ textarea#issue-add-content {
#org-team-card .panel-footer {
padding: 10px 20px;
}
+#team-members-list .panel-body .search {
+ padding: 4px 0 10px 10px;
+ border-bottom: 1px solid #dddddd;
+}
+#team-members-list li.collab {
+ padding-top: 10px !important;
+ border-bottom: 1px solid #dddddd;
+}
+#team-members-list li.collab:last-child {
+ border-bottom: 0;
+}
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index 5e6a6a6b91..52000f3664 100644
--- a/public/ng/js/gogs.js
+++ b/public/ng/js/gogs.js
@@ -351,6 +351,41 @@ function initInvite() {
});
}
+function initOrgTeamCreate() {
+ // Delete team.
+ $('#org-team-delete').click(function (e) {
+ if (!confirm('This team is going to be deleted, do you want to continue?')) {
+ e.preventDefault();
+ return true;
+ }
+ var $form = $('#team-create-form')
+ $form.attr('action', $form.data('delete-url'));
+ });
+}
+
+function initTeamMembersList() {
+ // Add team member.
+ var $ul = $('#org-team-members-list');
+ $('#org-team-members-add').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-team-members-add').val($(this).text());
+ $ul.toggleHide();
+ });
+
+}
+
$(document).ready(function () {
initCore();
if ($('#user-profile-setting').length) {
@@ -368,6 +403,12 @@ $(document).ready(function () {
if ($('#invite-box').length) {
initInvite();
}
+ if ($('#team-create-form').length) {
+ initOrgTeamCreate();
+ }
+ if ($('#team-members-list').length) {
+ initTeamMembersList();
+ }
Tabs('#dashboard-sidebar-menu');
diff --git a/public/ng/less/gogs/organization.less b/public/ng/less/gogs/organization.less
index 58039d90b3..a62dcbb3e0 100644
--- a/public/ng/less/gogs/organization.less
+++ b/public/ng/less/gogs/organization.less
@@ -196,4 +196,19 @@
.panel-footer {
padding: 10px 20px;
}
+}
+#team-members-list {
+ .panel-body .search {
+ padding: 4px 0 10px 10px;
+ border-bottom: 1px solid #dddddd;
+ }
+}
+#team-members-list {
+ li.collab {
+ padding-top: 10px !important;
+ border-bottom: 1px solid #dddddd;
+ &:last-child {
+ border-bottom: 0;
+ }
+ }
} \ No newline at end of file
diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less
index 8f9a97fa02..2f97289852 100644
--- a/public/ng/less/gogs/repository.less
+++ b/public/ng/less/gogs/repository.less
@@ -426,6 +426,7 @@ border-top-right-radius: .25em;
.repo-setting-zone {
padding: 30px;
}
+#team-members-list,
#repo-collab-list {
list-style: none;
padding: 10px 0 5px 0;