display barcode misfires
[xtuple] / lib / enyo-x / source / views / transaction_list_container.js
index f1b9ac3..2116df4 100644 (file)
@@ -33,7 +33,8 @@ trailing:true, white:true, strict:false*/
       onListItemMenuTap: "showListItemMenu",
       onParameterChange: "requery",
       onProcessingChanged: "processingChanged",
-      onSelectionChanged: "selectionChanged"
+      onSelectionChanged: "selectionChanged",
+      onUpdateHeader: "updateHeader"
     },
     init: false,
     components: [
@@ -48,7 +49,7 @@ trailing:true, white:true, strict:false*/
             {kind: "onyx.Menu", name: "actionMenu"}
           ]}
         ]},
-        {classes: "xv-header", content: "_search".loc()},
+        {classes: "xv-header", name: "transactionListHeader", content: "_search".loc()},
         {kind: "XV.ScrollableGroupbox", name: "parameterScroller", classes: "xv-search-container", fit: true}
       ]},
       {name: "listPanel", kind: "FittableRows", components: [
@@ -270,6 +271,14 @@ trailing:true, white:true, strict:false*/
       for (i = 0; i < collection.length; i++) {
         collection.at(i).transactionDate = transDate;
       }
+    },
+    updateHeader: function (inSender, inEvent) {
+      if (inEvent.noItemFound) {
+        this.$.transactionListHeader.setContent("_noItemFound".loc() + ": " + inEvent.data);
+
+      } else if (this.$.transactionListHeader.getContent() !== "_search".loc()) {
+        this.$.transactionListHeader.setContent("");
+      }
     }
   };