aboutsummaryrefslogtreecommitdiffstats
path: root/public/ng/js
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-02 13:47:33 -0400
committerUnknwon <joe2010xtmf@163.com>2014-08-02 13:47:33 -0400
commit755eec745fa324fdd13078f0147638f8731652ba (patch)
tree3c04a98d64e128d2ce8887cc20ed361f04010052 /public/ng/js
parent669552e255fb98021b779918394c65792fe6f1d2 (diff)
downloadgitea-755eec745fa324fdd13078f0147638f8731652ba.tar.gz
gitea-755eec745fa324fdd13078f0147638f8731652ba.zip
Finish new repo settings page
Diffstat (limited to 'public/ng/js')
-rw-r--r--public/ng/js/gogs.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index a861255e3e..37144ce99e 100644
--- a/public/ng/js/gogs.js
+++ b/public/ng/js/gogs.js
@@ -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');