"_noDescription": "No Description",
"_noDocumentFound": "No Document Found.",
"_noEligibleActions": "No Eligible Actions",
+ "_noItemFound": "No item found",
"_noOldPassword": "Please enter your old password",
"_unsavedChanges": "You have unsaved changes.",
"_saveYourWork?": "Do you want to save your work?"
events: {
onProcessingChanged: "",
onOrderChanged: "",
- onShipmentChanged: ""
+ onShipmentChanged: "",
+ onUpdateHeader: ""
},
handlers: {
onBarcodeCapture: "captureBarcode"
});
if (models.length > 0) {
this.transact(models, true, true);
+ } else {
+ inEvent.noItemFound = true;
}
+
+ this.doUpdateHeader(inEvent);
},
/**
Helper function for transacting `transact` on an array of models.
onListItemMenuTap: "showListItemMenu",
onParameterChange: "requery",
onProcessingChanged: "processingChanged",
- onSelectionChanged: "selectionChanged"
+ onSelectionChanged: "selectionChanged",
+ onUpdateHeader: "updateHeader"
},
init: false,
components: [
{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: [
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("");
+ }
}
};