Commit 20994766 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed JavaScript error

parent 9c117799
...@@ -48,12 +48,15 @@ if { $show_p } { ...@@ -48,12 +48,15 @@ if { $show_p } {
[ad_decode [ds_adp_reveal_enabled_p] 1 "on" "off"] [ad_decode [ds_adp_reveal_enabled_p] 1 "on" "off"]
template::add_body_script -script { template::add_body_script -script {
document.getElementById('ACS_DS_ADP').addEventListener('click', function (event) { var el = document.getElementById('ACS_DS_ADP');
if (el) {
el.addEventListener('click', function (event) {
var el=document.getElementsByTagName('span'); var el=document.getElementsByTagName('span');
event.preventDefault(); event.preventDefault();
for(i=0;i<el.length;i++){if(el[i].className=='developer-support-adp-file-on'){void(el[i].className='developer-support-adp-file-off')}else{if(el[i].className=='developer-support-adp-file-off'){void(el[i].className='developer-support-adp-file-on')}}};void(el=document.getElementsByTagName('div'));for(i=0;i<el.length;i++){if(el[i].className=='developer-support-adp-box-on'){void(el[i].className='developer-support-adp-box-off')}else{if(el[i].className=='developer-support-adp-box-off'){void(el[i].className='developer-support-adp-box-on')}};if(el[i].className=='developer-support-adp-output-on'){void(el[i].className='developer-support-adp-output-off')}else{if(el[i].className=='developer-support-adp-output-off'){void(el[i].className='developer-support-adp-output-on')}};} for(i=0;i<el.length;i++){if(el[i].className=='developer-support-adp-file-on'){void(el[i].className='developer-support-adp-file-off')}else{if(el[i].className=='developer-support-adp-file-off'){void(el[i].className='developer-support-adp-file-on')}}};void(el=document.getElementsByTagName('div'));for(i=0;i<el.length;i++){if(el[i].className=='developer-support-adp-box-on'){void(el[i].className='developer-support-adp-box-off')}else{if(el[i].className=='developer-support-adp-box-off'){void(el[i].className='developer-support-adp-box-on')}};if(el[i].className=='developer-support-adp-output-on'){void(el[i].className='developer-support-adp-output-off')}else{if(el[i].className=='developer-support-adp-output-off'){void(el[i].className='developer-support-adp-output-on')}};}
}); });
} }
}
multirow append ds_buttons FOT \ multirow append ds_buttons FOT \
"Toggle Footer display" \ "Toggle Footer display" \
...@@ -61,12 +64,15 @@ if { $show_p } { ...@@ -61,12 +64,15 @@ if { $show_p } {
off off
template::add_body_script -script { template::add_body_script -script {
document.getElementById('ACS_DS_FOT').addEventListener('click', function (event) { var el = document.getElementById('ACS_DS_FOT')
if (el) {
el.addEventListener('click', function (event) {
var el=document.getElementsByTagName('div'); var el=document.getElementsByTagName('div');
event.preventDefault(); event.preventDefault();
for(i=0;i<el.length;i++){if(el[i].className=='developer-support-footer'){void(el[i].className='developer-support-footer-off')}else{if(el[i].className=='developer-support-footer-off'){void(el[i].className='developer-support-footer')}}}; for(i=0;i<el.length;i++){if(el[i].className=='developer-support-footer'){void(el[i].className='developer-support-footer-off')}else{if(el[i].className=='developer-support-footer-off'){void(el[i].className='developer-support-footer')}}};
}); });
} }
}
set oacs_shell_url "${ds_url}shell" set oacs_shell_url "${ds_url}shell"
set auto_test_url [site_node::get_package_url -package_key acs-automated-testing] set auto_test_url [site_node::get_package_url -package_key acs-automated-testing]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment