jsharmony 1.40.11 → 1.40.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/clientjs/XAPI.Grid.js
CHANGED
|
@@ -108,7 +108,7 @@ exports = module.exports = function(jsh){
|
|
|
108
108
|
|
|
109
109
|
if(!_.includes(['null','notnull','contains','notcontains','=','<>','beginswith','endswith','>','<','>=','<='], exp.Comparison)){ exprslt.push(null); continue; }
|
|
110
110
|
|
|
111
|
-
for(var j=0;j<vals.length;j++){
|
|
111
|
+
for(var j=0;(j<vals.length)&&(cmprslt==false);j++){
|
|
112
112
|
val = vals[j];
|
|
113
113
|
var cmpval = exp.Value;
|
|
114
114
|
if(exp.Comparison=='null'){
|
package/clientjs/XBarcode.js
CHANGED
|
@@ -84,6 +84,7 @@ exports = module.exports = function(jsh){
|
|
|
84
84
|
startKeys: ['^17', '^66', '^85'],
|
|
85
85
|
endKeys: ['13'],
|
|
86
86
|
ignoreKeys: [],
|
|
87
|
+
scanlessEnd: false,
|
|
87
88
|
autoEnd: false, // Call onBarcodeEnd after timeout
|
|
88
89
|
onKey: null, // function(e, isScanning){}
|
|
89
90
|
destroyHandler: null, // [] Array of function(){}
|
|
@@ -152,7 +153,7 @@ exports = module.exports = function(jsh){
|
|
|
152
153
|
if(options.onKey) options.onKey(e, isScanning);
|
|
153
154
|
for(i=0;i<options.endKeys.length;i++){
|
|
154
155
|
if(keyMatches(options.endKeys[i])){
|
|
155
|
-
if(isScanning){
|
|
156
|
+
if(isScanning || options.scanlessEnd){
|
|
156
157
|
isScanning = false;
|
|
157
158
|
if (onBarcodeEnd){
|
|
158
159
|
if (onBarcodeEnd.call(this) === false) {
|
package/clientjs/XExt.js
CHANGED
|
@@ -414,7 +414,8 @@ exports = module.exports = function(jsh){
|
|
|
414
414
|
XExt.endsWith = function (str, suffix) {
|
|
415
415
|
str = (str || '').toString();
|
|
416
416
|
suffix = (suffix || '').toString();
|
|
417
|
-
|
|
417
|
+
var idx = str.lastIndexOf(suffix);
|
|
418
|
+
return (idx >= 0) && (idx == (str.length - suffix.length));
|
|
418
419
|
};
|
|
419
420
|
XExt.beginsWith = function (str, prefix) {
|
|
420
421
|
return (str||'').toString().indexOf(prefix) === 0;
|
package/lib/Helper.js
CHANGED
|
@@ -316,7 +316,8 @@ exports.js_proxy_error = function (err) {
|
|
|
316
316
|
exports.endsWith = function(str, suffix) {
|
|
317
317
|
str = (str || '').toString();
|
|
318
318
|
suffix = (suffix || '').toString();
|
|
319
|
-
|
|
319
|
+
var idx = str.lastIndexOf(suffix);
|
|
320
|
+
return (idx >= 0) && (idx == (str.length - suffix.length));
|
|
320
321
|
};
|
|
321
322
|
exports.beginsWith = function (str, prefix) {
|
|
322
323
|
return str.indexOf(prefix) === 0;
|