|
|
@ -468,6 +468,9 @@ function initRepository() { |
|
|
|
function initInstall() { |
|
|
|
function initInstall() { |
|
|
|
// database type change
|
|
|
|
// database type change
|
|
|
|
(function () { |
|
|
|
(function () { |
|
|
|
|
|
|
|
var mysql_default = '127.0.0.1:3306' |
|
|
|
|
|
|
|
var postgres_default = '127.0.0.1:5432' |
|
|
|
|
|
|
|
|
|
|
|
$('#install-database').on("change", function () { |
|
|
|
$('#install-database').on("change", function () { |
|
|
|
var val = $(this).val(); |
|
|
|
var val = $(this).val(); |
|
|
|
if (val != "SQLite3") { |
|
|
|
if (val != "SQLite3") { |
|
|
@ -475,6 +478,18 @@ function initInstall() { |
|
|
|
$('.sqlite-setting').addClass("hide"); |
|
|
|
$('.sqlite-setting').addClass("hide"); |
|
|
|
if (val == "PostgreSQL") { |
|
|
|
if (val == "PostgreSQL") { |
|
|
|
$('.pgsql-setting').removeClass("hide"); |
|
|
|
$('.pgsql-setting').removeClass("hide"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Change the host value to the Postgres default, but only
|
|
|
|
|
|
|
|
// if the user hasn't already changed it from the MySQL
|
|
|
|
|
|
|
|
// default.
|
|
|
|
|
|
|
|
if ($('#database-host').val() == mysql_default) { |
|
|
|
|
|
|
|
$('#database-host').val(postgres_default); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (val == 'MySQL') { |
|
|
|
|
|
|
|
$('.pgsql-setting').addClass("hide"); |
|
|
|
|
|
|
|
if ($('#database-host').val() == postgres_default) { |
|
|
|
|
|
|
|
$('#database-host').val(mysql_default); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$('.pgsql-setting').addClass("hide"); |
|
|
|
$('.pgsql-setting').addClass("hide"); |
|
|
|
} |
|
|
|
} |
|
|
|