mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
select owner when creating repository
This commit is contained in:
parent
8e6c254c03
commit
80be060735
@ -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 ($) {
|
||||||
$(function () {
|
$(function () {
|
||||||
initCore();
|
initCore();
|
||||||
@ -780,6 +798,9 @@ function initRepoSetting() {
|
|||||||
if ($('#repo-setting-container').length) {
|
if ($('#repo-setting-container').length) {
|
||||||
initRepoSetting();
|
initRepoSetting();
|
||||||
}
|
}
|
||||||
|
if ($('#repo-create').length) {
|
||||||
|
initRepoCreating();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" value="{{.SignedUserId}}" name="userId"/>
|
<input type="hidden" value="{{.SignedUserId}}" name="userId" id="repo-owner-id"/>
|
||||||
|
|
||||||
<!--<div class="col-md-8">
|
<!--<div class="col-md-8">
|
||||||
<p class="form-control-static">{{.SignedUserName}}</p>
|
<p class="form-control-static">{{.SignedUserName}}</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user