summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorfuxiaohei <fuxiaohei@vip.qq.com>2014-06-25 13:08:28 +0800
committerfuxiaohei <fuxiaohei@vip.qq.com>2014-06-25 13:08:28 +0800
commit80be0607350411662e0fc9b46e11388f5bb6cb54 (patch)
tree4c9051822f43aa259e98f47bc68440d6ec462ea3 /public
parent8e6c254c03dc19cac3ff6dad39f73b1509b46fcf (diff)
downloadgitea-80be0607350411662e0fc9b46e11388f5bb6cb54.tar.gz
gitea-80be0607350411662e0fc9b46e11388f5bb6cb54.zip
select owner when creating repository
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 2359e7ea2e..b33469d9e8 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -758,6 +758,24 @@ function initRepoSetting() {
});
}
+function initRepoCreating() {
+ // owner switch menu click
+ (function () {
+ $('#repo-owner-switch .dropdown-menu').on("click", "li", function () {
+ var uid = $(this).data('uid');
+ // set to input
+ $('#repo-owner-id').val(uid);
+ // set checked class
+ if (!$(this).hasClass("checked")) {
+ $(this).parent().find(".checked").removeClass("checked");
+ $(this).addClass("checked");
+ }
+ console.log("set repo owner to uid :",uid);
+ });
+ }());
+ console.log("init repo-creating scripts");
+}
+
(function ($) {
$(function () {
initCore();
@@ -780,6 +798,9 @@ function initRepoSetting() {
if ($('#repo-setting-container').length) {
initRepoSetting();
}
+ if ($('#repo-create').length) {
+ initRepoCreating();
+ }
});
})(jQuery);