aboutsummaryrefslogtreecommitdiff
path: root/public/js/gogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/gogs.js')
-rw-r--r--public/js/gogs.js71
1 files changed, 0 insertions, 71 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 9ea6f6f1..6b6a003d 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -204,76 +204,6 @@ function initCommentForm() {
selectItem('.select-assignee', '#assignee_id');
}
-function initInstall() {
- if ($('.install').length == 0) {
- return;
- }
-
- // Database type change detection.
- $("#db_type").change(function () {
- var sqliteDefault = 'data/gogs.db';
-
- var dbType = $(this).val();
- if (dbType === "SQLite3") {
- $('#sql_settings').hide();
- $('#pgsql_settings').hide();
- $('#sqlite_settings').show();
-
- if (dbType === "SQLite3") {
- $('#db_path').val(sqliteDefault);
- }
- return;
- }
-
- var dbDefaults = {
- "MySQL": "127.0.0.1:3306",
- "PostgreSQL": "127.0.0.1:5432",
- "MSSQL": "127.0.0.1, 1433"
- };
-
- $('#sqlite_settings').hide();
- $('#sql_settings').show();
- $('#pgsql_settings').toggle(dbType === "PostgreSQL");
- $.each(dbDefaults, function(type, defaultHost) {
- if ($('#db_host').val() == defaultHost) {
- $('#db_host').val(dbDefaults[dbType]);
- return false;
- }
- });
- });
-
- // TODO: better handling of exclusive relations.
- $('#offline-mode input').change(function () {
- if ($(this).is(':checked')) {
- $('#disable-gravatar').checkbox('check');
- $('#federated-avatar-lookup').checkbox('uncheck');
- }
- });
- $('#disable-gravatar input').change(function () {
- if ($(this).is(':checked')) {
- $('#federated-avatar-lookup').checkbox('uncheck');
- } else {
- $('#offline-mode').checkbox('uncheck');
- }
- });
- $('#federated-avatar-lookup input').change(function () {
- if ($(this).is(':checked')) {
- $('#disable-gravatar').checkbox('uncheck');
- $('#offline-mode').checkbox('uncheck');
- }
- });
- $('#disable-registration input').change(function () {
- if ($(this).is(':checked')) {
- $('#enable-captcha').checkbox('uncheck');
- }
- });
- $('#enable-captcha input').change(function () {
- if ($(this).is(':checked')) {
- $('#disable-registration').checkbox('uncheck');
- }
- });
-}
-
function initRepository() {
if ($('.repository').length == 0) {
return;
@@ -1424,7 +1354,6 @@ $(document).ready(function () {
searchRepositories();
initCommentForm();
- initInstall();
initRepository();
initWikiForm();
initEditForm();