Skip to content

Commit

Permalink
Merge pull request #382 from Shnoulle/master_fix-10001
Browse files Browse the repository at this point in the history
Fixed issue #10001: Relevance equation on different group not working…
  • Loading branch information
Shnoulle committed Dec 1, 2015
2 parents d81264b + 576b168 commit 7c85097
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/expressions/em_javascript.js
Expand Up @@ -461,6 +461,7 @@ function LEMval(alias)
if (LEMradix === ',') {
newval = str.split(',').join('.');
}

if (newval == parseFloat(newval)) {
if (newval.length > 0 && newval[0]==0) {
return newval; // so keep 0 prefixes on numbers
Expand All @@ -485,12 +486,14 @@ function LEMval(alias)
}
}
var whichJsName; // correct name whether on- or off-page

if (LEMmode=='survey' || (LEMmode=='group' && attr.gseq == LEMgseq) || (LEMmode=='question' && attr.qid == LEMqid)) {
whichJsName = (typeof attr.jsName_on === 'undefined') ? attr.jsName : attr.jsName_on;
}
else {
whichJsName = attr.jsName;
}

if (whichJsName === null || typeof document.getElementById(whichJsName) === 'undefined' || document.getElementById(whichJsName) === null) {
an_error = true; // this line is here to make debugging easier
return '';
Expand Down Expand Up @@ -673,7 +676,7 @@ function LEMval(alias)
{
return "";
}
if (LEMradix === ',') {
if (LEMgseq==attr.gseq && LEMradix === ',' ) {
var regValidateNum = /^-?\d*\,?\d*$/;
}else{
var regValidateNum = /^-?\d*\.?\d*$/;
Expand Down

0 comments on commit 7c85097

Please sign in to comment.