forked from forgejo/forgejo
Finish new repo settings page
This commit is contained in:
parent
669552e255
commit
755eec745f
25 changed files with 502 additions and 347 deletions
|
@ -174,11 +174,31 @@ function initRepoCreate() {
|
|||
console.log('initRepoCreate');
|
||||
}
|
||||
|
||||
function initRepoSetting() {
|
||||
// Confirmation of changing repository name.
|
||||
$('#repo-setting-form').submit(function (e) {
|
||||
var $reponame = $('#repo_name');
|
||||
if (($reponame.data('repo-name') != $reponame.val()) && !confirm('Repository name has been changed, do you want to continue?')) {
|
||||
e.preventDefault();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$('#transfer-button').click(function () {
|
||||
$('#transfer-form').show();
|
||||
});
|
||||
$('#delete-button').click(function () {
|
||||
$('#delete-form').show();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
initCore();
|
||||
if ($('#repo-create-form').length || $('#repo-migrate-form').length) {
|
||||
initRepoCreate();
|
||||
}
|
||||
if ($('#repo-setting').length) {
|
||||
initRepoSetting();
|
||||
}
|
||||
|
||||
Tabs('#dashboard-sidebar-menu');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue