]> _ Git - sandvik-apps.git/commitdiff
wip #4905 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 7 Feb 2022 14:37:06 +0000 (15:37 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 7 Feb 2022 14:37:06 +0000 (15:37 +0100)
ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx [deleted file]
ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.2-Draft.xlsx [new file with mode: 0644]
ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.4-Draft.xlsx [new file with mode: 0644]
ScreeningMediaSelection/js/script.js

diff --git a/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.1-Draft.xlsx
deleted file mode 100644 (file)
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 (file)
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 (file)
index 0000000..120a776
Binary files /dev/null and b/ScreeningMediaSelection/_doc/ScreenMediaSelection-2.0.4-Draft.xlsx differ
index 9d120f35ee25c963ed78e2f58879940f5667294e..cd5cf10bfa32fed8a3f4818dbc0137244eab9f8f 100644 (file)
@@ -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('<div class="error ' + errorClass + '">' + getTranslation(message)+ '</div>');
+        $("#fields").append('<div class="error ' + errorClass + '">' + getTranslation(message) + '</div>');
     }
 }
 
@@ -537,7 +537,7 @@ function addField(f, value) {
         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) {
@@ -672,15 +672,20 @@ function addField(f, value) {
         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>';
@@ -705,7 +710,6 @@ function addField(f, value) {
 }
 
 
-
 function evalAndReturn(e) {
     try {
         var code = 'var res=' + e + ';';