1
0
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 01:35:54 +01:00

select owner when creating repository

This commit is contained in:
fuxiaohei 2014-06-25 16:03:29 +08:00
parent 4cf7a1fca5
commit 72ba273cc9
2 changed files with 7 additions and 4 deletions

@ -770,7 +770,10 @@ function initRepoCreating() {
$(this).parent().find(".checked").removeClass("checked"); $(this).parent().find(".checked").removeClass("checked");
$(this).addClass("checked"); $(this).addClass("checked");
} }
console.log("set repo owner to uid :",uid); // set button group to show clicked owner
$('#repo-owner-avatar').attr("src",$(this).find('img').attr("src"));
$('#repo-owner-name').text($(this).text().trim());
console.log("set repo owner to uid :",uid,$(this).text().trim());
}); });
}()); }());
console.log("init repo-creating scripts"); console.log("init repo-creating scripts");

@ -9,9 +9,9 @@
<label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label> <label class="col-md-2 control-label">Owner<strong class="text-danger">*</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<div class="btn-group" id="repo-owner-switch"> <div class="btn-group" id="repo-owner-switch">
<button type="button" class="btn btn-default"> <button type="button" class="btn btn-default" id="repo-owner-current">
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"> <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username" id="repo-owner-avatar">
{{.SignedUser.Name}} <span id="repo-owner-name">{{.SignedUser.Name}}</span>
</button> </button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span> <span class="caret"></span>