diff options
author | François Kubler <francois@kubler.org> | 2011-05-17 22:34:31 +0200 |
---|---|---|
committer | François Kubler <francois@kubler.org> | 2011-05-17 22:34:31 +0200 |
commit | 13ddf8100f7b4aace962598a75aadbf228c4aaa7 (patch) | |
tree | e5d3e868bb4efaf0025b405b1d593a8abb92959e /js | |
parent | a8fb310d79d604ec0e4235dcd40828c3feb3a3be (diff) | |
download | nextcloud-server-13ddf8100f7b4aace962598a75aadbf228c4aaa7.tar.gz nextcloud-server-13ddf8100f7b4aace962598a75aadbf228c4aaa7.zip |
New installer.
* Forms have been revamped (CSS + javascript),
* Process has been improved : errors are displayed on the form page,
* Some changes in the index.php page so that everything related to installation is in lib/setup.php
* Also added a small function in OC_HELPER class to set input values.
All these should improve the installation process in terms of ergonomics.
Well, I do hope so.
Diffstat (limited to 'js')
-rw-r--r-- | js/js.js | 45 |
1 files changed, 7 insertions, 38 deletions
@@ -1,45 +1,14 @@ $(document).ready(function() { - //hide the advanced config - $('#advanced_options').hide(); - $('#use_mysql').hide(); - $('label.sqlite').css('background-color', '#ddd'); - $('label.mysql').css('background-color', '#fff'); - - // Sets advanced_options link behaviour : - $('#advanced_options_link').click(function() { - $('#advanced').toggleClass('userLinkOn'); - $('#advanced_options').slideToggle(250); - return false; + // Hide the MySQL config div if needed : + if(!$('#mysql').is(':checked')) { + $('#use_mysql').hide(); + } + + $('#sqlite').click(function() { + $('#use_mysql').slideUp(250); }); $('#mysql').click(function() { $('#use_mysql').slideDown(250); - $('label.sqlite').css('background-color', '#fff'); - $('label.mysql').css('background-color', '#ddd'); }); - $('#sqlite').click(function() { - $('#use_mysql').slideUp(250); - $('label.sqlite').css('background-color', '#ddd'); - $('label.mysql').css('background-color', '#fff'); - }); - - // Hide and show input field values for login and installation form - var textuser = 'username'; - var textpassword = 'password'; - var textadmin = 'admin username'; - var textdbuser = 'MySQL user'; - var textdbpass = 'password'; - var textdbname = 'database name'; - $('#user').focus(function() { if($(this).attr('value') == textuser) $(this).attr('value', ''); }); - $('#user').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textuser); }); - $('#password').focus(function() { if($(this).attr('value') == textpassword) $(this).attr('value', ''); }); - $('#password').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textpassword); }); - $('#admin').focus(function() { if($(this).attr('value') == textadmin) $(this).attr('value', ''); }); - $('#admin').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textadmin); }); - $('#dbuser').focus(function() { if($(this).attr('value') == textdbuser) $(this).attr('value', ''); }); - $('#dbuser').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textdbuser); }); - $('#dbpass').focus(function() { if($(this).attr('value') == textdbpass) $(this).attr('value', ''); }); - $('#dbpass').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textdbpass); }); - $('#dbname').focus(function() { if($(this).attr('value') == textdbname) $(this).attr('value', ''); }); - $('#dbname').blur(function() { if($(this).attr('value') == '') $(this).attr('value', textdbname); }); }); |