summaryrefslogtreecommitdiffstats
path: root/core/js/setup.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/setup.js')
-rw-r--r--core/js/setup.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js
new file mode 100644
index 00000000000..b4616b8b14c
--- /dev/null
+++ b/core/js/setup.js
@@ -0,0 +1,26 @@
+$(document).ready(function() {
+ // Hide the MySQL config div if needed :
+ if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') {
+ $('#use_mysql').hide();
+ }
+
+ $('#datadirField').hide(250);
+ if($('#hasSQLite').val()=='true'){
+ $('#databaseField').hide(250);
+ }
+
+ $('#sqlite').click(function() {
+ $('#use_mysql').slideUp(250);
+ });
+
+ $('#mysql').click(function() {
+ $('#use_mysql').slideDown(250);
+ });
+
+ $('#showAdvanced').click(function() {
+ $('#datadirField').slideToggle(250);
+ if($('#hasSQLite').val()=='true'){
+ $('#databaseField').slideToggle(250);
+ }
+ });
+});