Переглянути джерело

Show color data in batch details report tab

Neal Wilson 6 роки тому
джерело
коміт
f22e6a9223
1 змінених файлів з 31 додано та 18 видалено
  1. 31
    18
      config/Windows/batchdetailsnew.xml

+ 31
- 18
config/Windows/batchdetailsnew.xml Переглянути файл

322
                 output.writeEndElement();
322
                 output.writeEndElement();
323
                 output.writeEndElement();
323
                 output.writeEndElement();
324
                 output.writeEndElement();
324
                 output.writeEndElement();
325
+                if(query.value(10).length > 0) {
326
+                    var extradata = JSON.parse(query.value(10));
327
+                    if(extradata.color) {
328
+                        output.writeStartElement("p");
329
+                        output.writeTextElement("strong", TTR("batchDetails", "Degree of Roast"));
330
+                        output.writeEndElement();
331
+                        if(extradata.color.whole) {
332
+                            wholecolor.value = extradata.color.whole;
333
+                            output.writeStartElement("p");
334
+                            output.writeTextElement("strong", TTR("batchDetails", "Whole Bean: "));
335
+                            output.writeTextElement("span", extradata.color.whole);
336
+                            output.writeEndElement();
337
+                        } else {
338
+                            wholecolor.value = "";
339
+                        }
340
+                        if(extradata.color.ground) {
341
+                            groundcolor.value = extradata.color.ground;
342
+                            output.writeStartElement("p");
343
+                            output.writeTextElement("strong", TTR("batchDetails", "Ground: "));
344
+                            output.writeTextElement("span", extradata.color.ground);
345
+                            output.writeEndElement();
346
+                        } else {
347
+                            groundcolor.value = "";
348
+                        }
349
+                    } else {
350
+                        wholecolor.value = "";
351
+                        groundcolor.value = "";
352
+                    }
353
+                }
354
+                
355
+                
325
                 output.writeStartElement("p");
356
                 output.writeStartElement("p");
326
                 output.writeTextElement("strong", TTR("batchDetails", "Approved: "));
357
                 output.writeTextElement("strong", TTR("batchDetails", "Approved: "));
327
                 output.writeCharacters(query.value(6));
358
                 output.writeCharacters(query.value(6));
428
                 annotationField.plainText = query.value(8);
459
                 annotationField.plainText = query.value(8);
429
                 unitEdit.text = unitText;
460
                 unitEdit.text = unitText;
430
                 roastedEdit.text = query.value(5);
461
                 roastedEdit.text = query.value(5);
431
-                if(query.value(10).length > 0) {
432
-                    var extradata = JSON.parse(query.value(10));
433
-                    if(extradata.color) {
434
-                        if(extradata.color.whole) {
435
-                            wholecolor.value = extradata.color.whole;
436
-                        } else {
437
-                            wholecolor.value = "";
438
-                        }
439
-                        if(extradata.color.ground) {
440
-                            groundcolor.value = extradata.color.ground;
441
-                        } else {
442
-                            groundcolor.value = "";
443
-                        }
444
-                    } else {
445
-                        wholecolor.value = "";
446
-                        groundcolor.value = "";
447
-                    }
448
-                }
449
                 query = query.invalidate();
462
                 query = query.invalidate();
450
             }
463
             }
451
             var saveMenu = findChildObject(this, 'save');
464
             var saveMenu = findChildObject(this, 'save');

Завантаження…
Відмінити
Зберегти