Merge pull request #5290 from owncloud/fixing-5191-master

Installation. Show advanced section on error. Fixes #5191
This commit is contained in:
Morris Jobke 2013-10-12 03:28:44 -07:00
commit e6d034a60b
2 changed files with 16 additions and 19 deletions

View File

@ -9,8 +9,7 @@ $(document).ready(function() {
};
$('#selectDbType').buttonset();
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
if($('#hasSQLite').val()){
$('#use_other_db').hide();
$('#use_oracle_db').hide();
@ -23,12 +22,7 @@ $(document).ready(function() {
$('#use_oracle_db').slideUp(250);
});
$('#mysql').click(function() {
$('#use_other_db').slideDown(250);
$('#use_oracle_db').slideUp(250);
});
$('#pgsql').click(function() {
$('#mysql,#pgsql,#mssql').click(function() {
$('#use_other_db').slideDown(250);
$('#use_oracle_db').slideUp(250);
});
@ -38,11 +32,6 @@ $(document).ready(function() {
$('#use_oracle_db').show(250);
});
$('#mssql').click(function() {
$('#use_other_db').slideDown(250);
$('#use_oracle_db').slideUp(250);
});
$('input[checked]').trigger('click');
$('#showAdvanced').click(function() {
@ -74,9 +63,17 @@ $(document).ready(function() {
form.submit();
return false;
});
if(!dbtypes.sqlite){
$('#showAdvanced').click();
// Expand latest db settings if page was reloaded on error
var currentDbType = $('input[type="radio"]:checked').val();
if (currentDbType === undefined){
$('input[type="radio"]').first().click();
}
if (currentDbType === 'sqlite' || (dbtypes.sqlite && currentDbType === undefined)){
$('#datadirContent').hide(250);
$('#databaseField').hide(250);
}
});

View File

@ -61,13 +61,13 @@
</p>
</fieldset>
<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet']): ?>
<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
<fieldset id="advancedHeader">
<legend><a id="showAdvanced"><?php p($l->t( 'Advanced' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
</fieldset>
<?php endif; ?>
<?php if(!$_['directoryIsSet']): ?>
<?php if(!$_['directoryIsSet'] OR count($_['errors']) > 0): ?>
<fieldset id="datadirField">
<div id="datadirContent">
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
@ -78,7 +78,7 @@
</fieldset>
<?php endif; ?>
<?php if(!$_['dbIsSet']): ?>
<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
<fieldset id='databaseField'>
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'] or $_['hasMSSQL'])
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>