automatically show advanced options when no sqlite is available

This commit is contained in:
Robin Appelman 2012-01-29 17:39:54 +01:00
Родитель 30f1de71a6
Коммит 039bbfde2d
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -1,4 +1,11 @@
var dbtypes
$(document).ready(function() {
dbtypes={
sqlite:!!$('#hasSQLite').val(),
mysql:!!$('#hasMySQL').val(),
postgresql:!!$('#hasPostgreSQL').val(),
}
$('#selectDbType').buttonset();
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
@ -60,4 +67,9 @@ $(document).ready(function() {
form.submit();
return false;
});
if(!dbtypes.sqlite){
$('#showAdvanced').click();
$('input[type="radio"]').first().click();
}
});

Просмотреть файл

@ -1,3 +1,6 @@
<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'></input>
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'></input>
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'></input>
<form action="index.php" method="post">
<input type="hidden" name="install" value="true" />