Browse Source

select owner when creating repository

pull/267/head
fuxiaohei 11 years ago
parent
commit
72ba273cc9
  1. 5
      public/js/app.js
  2. 6
      templates/repo/create.tmpl

5
public/js/app.js

@ -770,7 +770,10 @@ function initRepoCreating() {
$(this).parent().find(".checked").removeClass("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");

6
templates/repo/create.tmpl

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

Loading…
Cancel
Save