summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-08 21:01:47 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-05-08 21:01:47 +0800
commit11ca10ab2fa9c0e0c8036d33bd31f4815ceb490e (patch)
tree34403dce1ec4f7f366e6ed6b6a5aea033876992a /public/js
parent495d939ca580825c4a91612e38107ecc4339598a (diff)
downloadgitea-11ca10ab2fa9c0e0c8036d33bd31f4815ceb490e.tar.gz
gitea-11ca10ab2fa9c0e0c8036d33bd31f4815ceb490e.zip
issue assignee ui
Diffstat (limited to 'public/js')
-rw-r--r--public/js/app.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 6093d23b94..d6c13a2931 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -532,7 +532,20 @@ function initIssue() {
$('.issue-write a[data-toggle]').on("click", function () {
$('.issue-preview-content').html("loading...");
});
- }())
+ }());
+
+ // assignee
+ $('.assignee', '#issue').on('click', 'li', function () {
+ var uid = $(this).data("uid");
+ $('#assignee').val(uid);
+ if (uid > 0) {
+ $('.clear-assignee').toggleShow();
+ $('#assigned').text($(this).find("strong").text())
+ } else {
+ $('.clear-assignee').toggleHide();
+ $('#assigned').text($('#assigned').data("no-assigned"));
+ }
+ });
}
@@ -580,7 +593,7 @@ function initRepoSetting() {
});
$this.next().toggleShow();
$this.next().find('ul').html(html);
- }else{
+ } else {
$this.next().toggleHide();
}
}
@@ -589,7 +602,7 @@ function initRepoSetting() {
if (!$(this).val()) {
$(this).next().toggleHide();
}
- }).next().on("click",'li',function(){
+ }).next().on("click", 'li', function () {
$('#repo-collaborator').val($(this).text());
});
}