Skip to content

Commit

Permalink
Fixed issue #05777: performance issue: lots of irrelevant javacript i…
Browse files Browse the repository at this point in the history
…s called with each onchange event

Dev Refactored Javascript code generated by EM to have separate relevance and validation functions for each qid
Dev Each relevance function knows exactly which variables and/or other qids could affect its operation, so ensures cascading while minimizing calling functions with nothing significant has changed
Dev also fixed issue with multi_set() - was not calling checkconditions onchange
Dev also fixed issue with slider - was not calling checkconditions onchange with the parameters that EM needs
Dev also fixed issue with Tab behavior - if tabbed off of a text input box, then clicked a checkbox, nothing would happen until next  change - fixed.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@12404 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
tmswhite committed Feb 8, 2012
1 parent 7eca5e5 commit 1445902
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 135 deletions.
2 changes: 1 addition & 1 deletion classes/eval/ExpressionManager.php
Expand Up @@ -1311,7 +1311,7 @@ public function GetJavascriptTestforExpression($expected,$num)
public function GetJavaScriptFunctionForReplacement($questionNum, $name,$eqn)
{
$jsParts = array();
$jsParts[] = "\n // Tailor Question " . $questionNum . " - " . $name . ": { " . $eqn . " }\n";
// $jsParts[] = "\n // Tailor Question " . $questionNum . " - " . $name . ": { " . $eqn . " }\n";
$jsParts[] = " try{\n";
$jsParts[] = " document.getElementById('" . $name . "').innerHTML=htmlspecialchars(\n ";
$jsParts[] = $this->GetJavaScriptEquivalentOfExpression();
Expand Down

0 comments on commit 1445902

Please sign in to comment.