Commit e86fda21df77ec9f1ee108e09fc037cf4a514427
1 parent
0322e4fa
KTS-4443: Updated JS On Setup Wizards
Committed by: Jarrett Jordaan Reviewed by: Megan Watson
Showing
1 changed file
with
3 additions
and
2 deletions
setup/wizard/resources/js/wizard.js
| @@ -4,7 +4,8 @@ function wizard() { | @@ -4,7 +4,8 @@ function wizard() { | ||
| 4 | 4 | ||
| 5 | // Toggle Advance Database options | 5 | // Toggle Advance Database options |
| 6 | wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details|php_ext_details|php_con_details | 6 | wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details|php_ext_details|php_con_details |
| 7 | - if($('.'+ele).attr('style') == 'display: none;') { | 7 | + var state = $('.'+ele).attr('style'); |
| 8 | + if(state.match(/none/g) == 'none') { | ||
| 8 | $('.'+ele).attr('style', 'display: block;'); | 9 | $('.'+ele).attr('style', 'display: block;'); |
| 9 | if($('#'+option).attr('innerHTML') != ' Advanced Options') | 10 | if($('#'+option).attr('innerHTML') != ' Advanced Options') |
| 10 | $('#'+option).attr('innerHTML', 'Hide Details'); | 11 | $('#'+option).attr('innerHTML', 'Hide Details'); |
| @@ -14,7 +15,7 @@ wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details | @@ -14,7 +15,7 @@ wizard.prototype.toggleClass = function(ele, option) { //adv_options|php_details | ||
| 14 | $('#'+option).attr('innerHTML', 'Show Details'); | 15 | $('#'+option).attr('innerHTML', 'Show Details'); |
| 15 | } | 16 | } |
| 16 | } | 17 | } |
| 17 | - | 18 | + //alert($('.'+ele) + " " + $('.'+ele).attr('style')); |
| 18 | // Focus on element | 19 | // Focus on element |
| 19 | wizard.prototype.focusElement = function(el) { | 20 | wizard.prototype.focusElement = function(el) { |
| 20 | el.focus(); | 21 | el.focus(); |