Commit 0bf0f2d6 by Scott

Fix infinite loop in JS from qa_set_display_rules

Ref #273.
parent d6d60d8f
......@@ -1454,15 +1454,10 @@
foreach ($keysourceids as $key => $dummy) {
$funcscript[]="\tvar e=document.getElementById(".qa_js($key).");";
$funcscript[]="\tvar ".$key."=e && (e.checked || (e.options && e.options[e.selectedIndex].value));";
$loadscript[]="var e=document.getElementById(".qa_js($key).");";
$loadscript[]="if (e) {";
$loadscript[]="\t".$key."_oldonclick=e.onclick;";
$loadscript[]="\te.onclick=function() {";
$loadscript[]="\t\t".$function."(false);";
$loadscript[]="\t\tif (typeof ".$key."_oldonclick=='function')";
$loadscript[]="\t\t\t".$key."_oldonclick();";
$loadscript[]="\t};";
$loadscript[]="}";
$loadscript[]="jQuery(".qa_js('#'.$key).").click(function() {";
$loadscript[]="\t".$function."(false);";
$loadscript[]="});";
}
foreach ($effects as $target => $sources) {
......
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