From: Vincent Vanwaelscappel Date: Mon, 7 Feb 2022 14:37:06 +0000 (+0100) Subject: wip #4905 @3 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f1804a59ac19eb2fd61c4da216b9c7394bff8e86;p=sandvik-apps.git wip #4905 @3 --- diff --git a/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx deleted file mode 100644 index 67c3d19..0000000 Binary files a/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx and /dev/null differ diff --git a/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.2-Draft.xlsx b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.2-Draft.xlsx new file mode 100644 index 0000000..88f0d5d Binary files /dev/null and b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.2-Draft.xlsx differ diff --git a/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.4-Draft.xlsx b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.4-Draft.xlsx new file mode 100644 index 0000000..120a776 Binary files /dev/null and b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.4-Draft.xlsx differ diff --git a/ScreeningMediaSelection/js/script.js b/ScreeningMediaSelection/js/script.js index 9d120f3..cd5cf10 100644 --- a/ScreeningMediaSelection/js/script.js +++ b/ScreeningMediaSelection/js/script.js @@ -114,7 +114,7 @@ function parseOptions(table, k, f) { var values = allValues.split("\n"); $.each(values, function (kkk, vvv) { vvv = vvv.toString(); - if(vvv===''){ + if (vvv === '') { return; } if (f.table_secondary_var !== undefined) { @@ -227,7 +227,7 @@ function updateForm(initValues) { function addError(message, errorClass, force) { if (force === true || $('#fields .error').length === 0) { - $("#fields").append('
' + getTranslation(message)+ '
'); + $("#fields").append('
' + getTranslation(message) + '
'); } } @@ -537,7 +537,7 @@ function addField(f, value) { if (f.unit) { res += '' + getTranslation(f.unit) + ''; } - } 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) { @@ -672,15 +672,20 @@ function addField(f, value) { label += '
' + formatHint(f, {'$min': min, '$max': max}) + '
'; } - 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 = '

' + INPUT.product_model + '
' + res.replace(/, /g, ',
') + ' ' + INPUT.result_disclaimer + '
'; - c += '

' + - '

' + - '

'; + c = '

' + INPUT.result_concat.join(' ') + '
' + INPUT.result_disclaimer + '
'; + // c += '

' + + // '

' + + // '

'; } res = '
' + getTranslation(c) + '
'; @@ -705,7 +710,6 @@ function addField(f, value) { } - function evalAndReturn(e) { try { var code = 'var res=' + e + ';';