2011-06-19 21:33:34 +00:00
|
|
|
$(document).ready(function() {
|
2011-08-07 19:06:53 +00:00
|
|
|
// Hide the PostgreSQL config div if needed:
|
|
|
|
if(!$('#pgsql').is(':checked')) {
|
|
|
|
$('#use_postgresql').hide();
|
|
|
|
}
|
2011-06-19 21:33:34 +00:00
|
|
|
|
|
|
|
$('#datadirField').hide(250);
|
|
|
|
if($('#hasSQLite').val()=='true'){
|
|
|
|
$('#databaseField').hide(250);
|
|
|
|
}
|
|
|
|
|
|
|
|
$('#sqlite').click(function() {
|
|
|
|
$('#use_mysql').slideUp(250);
|
2011-08-07 19:06:53 +00:00
|
|
|
$('#use_postgresql').slideUp(250);
|
2011-06-19 21:33:34 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#mysql').click(function() {
|
|
|
|
$('#use_mysql').slideDown(250);
|
2011-08-07 19:06:53 +00:00
|
|
|
$('#use_postgresql').slideUp(250);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#pgsql').click(function() {
|
|
|
|
$('#use_postgresql').slideDown(250);
|
|
|
|
$('#use_mysql').slideUp(250);
|
2011-06-19 21:33:34 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#showAdvanced').click(function() {
|
|
|
|
$('#datadirField').slideToggle(250);
|
|
|
|
if($('#hasSQLite').val()=='true'){
|
|
|
|
$('#databaseField').slideToggle(250);
|
|
|
|
}
|
|
|
|
});
|
2011-08-08 18:23:57 +00:00
|
|
|
|
|
|
|
// Hide the MySQL config div if needed :
|
|
|
|
if($('#dbtype').val()=='sqlite') {
|
|
|
|
$('#databaseField').hide();
|
|
|
|
}
|
2011-06-19 21:33:34 +00:00
|
|
|
});
|