]> source.dussan.org Git - nextcloud-server.git/commitdiff
automatically show advanced options when no sqlite is available v3.0
authorRobin Appelman <icewind@owncloud.com>
Sun, 29 Jan 2012 16:39:54 +0000 (17:39 +0100)
committerRobin Appelman <icewind@owncloud.com>
Sun, 29 Jan 2012 17:00:55 +0000 (18:00 +0100)
core/js/setup.js
core/templates/installation.php

index 94097785e422cae42f16cdd98ca7c8abb1b34d28..6e056cc90d1caa011a9a661303a3eb9e2b2bc6fb 100644 (file)
@@ -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();
+       }
 });
index f1cde6b39048102ebb323ea52bec93b640966208..4558f97bc0857f3dc783753e2df2df4679cff563 100644 (file)
@@ -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" />