mirror of
https://github.com/grocy/grocy.git
synced 2025-08-21 04:43:32 +00:00
Finalized frontend external barcode lookup implementation (references #158)
This commit is contained in:
@@ -250,9 +250,13 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
Grocy.Components.ProductPicker.PopupOpen = false;
|
||||
window.location.href = U('/product/new?flow=InplaceNewProductWithBarcode&barcode=' + encodeURIComponent(input) + '&returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative + "?flow=InplaceAddBarcodeToExistingProduct&barcode=" + input + "&" + embedded) + "&" + embedded);
|
||||
}
|
||||
},
|
||||
barcodepluginlookup: {
|
||||
label: '<strong>E</strong> ' + __t('External barcode lookup (via plugin)'),
|
||||
}
|
||||
};
|
||||
|
||||
if (Grocy.ExternalBarcodeLookupPluginName)
|
||||
{
|
||||
buttons.barcodepluginlookup = {
|
||||
label: '<strong>E</strong> ' + __t('External barcode lookup') + ' <span class="badge badge-pill badge-light">' + Grocy.ExternalBarcodeLookupPluginName + '</span>',
|
||||
className: 'btn-dark add-new-product-plugin-dialog-button responsive-button ' + addProductWorkflowsAdditionalCssClasses,
|
||||
callback: function()
|
||||
{
|
||||
@@ -279,8 +283,8 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_DISABLE_BROWSER_BARCODE_CAMERA_SCANNING)
|
||||
{
|
||||
@@ -332,7 +336,8 @@ $('#product_id_text_input').on('blur', function(e)
|
||||
size: 'large',
|
||||
backdrop: true,
|
||||
closeButton: false,
|
||||
buttons: buttons
|
||||
buttons: buttons,
|
||||
className: "wider"
|
||||
}).on('keypress', function(e)
|
||||
{
|
||||
if (e.key === 'B' || e.key === 'b')
|
||||
|
Reference in New Issue
Block a user