var values = allValues.split("\n");
$.each(values, function (kkk, vvv) {
vvv = vvv.toString();
- if(vvv===''){
+ if (vvv === '') {
return;
}
if (f.table_secondary_var !== undefined) {
function addError(message, errorClass, force) {
if (force === true || $('#fields .error').length === 0) {
- $("#fields").append('<div class="error ' + errorClass + '">' + getTranslation(message)+ '</div>');
+ $("#fields").append('<div class="error ' + errorClass + '">' + getTranslation(message) + '</div>');
}
}
if (f.unit) {
res += '<span class="unit">' + getTranslation(f.unit) + '</span>';
}
- } else if (f.type === 'info' || f.type === 'result' || f.type === 'product_model') {
+ } else if (f.type === 'info' || f.type === 'result' || f.type === 'product_model' || f.type === 'result_concat') {
var finalLine = INPUT.sheets[INPUT.currentSheet].lines[0];
INPUT.finalLine = finalLine;
$.each(f.options, function (k, v) {
label += '<div class="hint">' + formatHint(f, {'$min': min, '$max': max}) + '</div>';
}
- if (f.type === 'result') {
+ if (f.type === 'result_concat') {
+ if (INPUT.result_concat === undefined || INPUT.result_concat === null) {
+ INPUT.result_concat = [];
+ }
+ INPUT.result_concat.push(res);
+ } else if (f.type === 'result') {
var c;
if (f.function !== undefined) {
c = window[f.function].call();
} else {
- c = '<h2 data-l10n="' + RESULT_TITLE + '"></h2><div class="resholder"><div class="product_model">' + INPUT.product_model + '</div><div class="res">' + res.replace(/, /g, ',<br>') + ' ' + INPUT.result_disclaimer + '</div></div>';
- c += '<div class="disclaimer"><p data-l10n="Note:"></p>' +
- '<p data-l10n="Aperture selection to be confirmed by product specialist. Other apertures are also available upon request"></p>' +
- '<p data-l10n="The result is based on the input given on basic parameters and should only be used as rough first guidance."></p>';
+ c = '<h2 data-l10n="' + RESULT_TITLE + '"></h2><div class="resholder"><div class="product_model">' + INPUT.result_concat.join(' ') + '</div> <div class="res">' + INPUT.result_disclaimer + '</div></div>';
+ // c += '<div class="disclaimer"><p data-l10n="Note:"></p>' +
+ // '<p data-l10n="Aperture selection to be confirmed by product specialist. Other apertures are also available upon request"></p>' +
+ // '<p data-l10n="The result is based on the input given on basic parameters and should only be used as rough first guidance."></p>';
}
res = '<div class="label ' + f.type + '">' + getTranslation(c) + '</div>';
}
-
function evalAndReturn(e) {
try {
var code = 'var res=' + e + ';';