mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Finish new repo settings page
This commit is contained in:
@ -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');
|
||||
|
||||
|
Reference in New Issue
Block a user