mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Various JS optimizations
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
"fullcalendar": "^3.10.1",
|
"fullcalendar": "^3.10.1",
|
||||||
"gettext-translator": "3.0.1",
|
"gettext-translator": "3.0.1",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"jquery-lazy": "^1.7.11",
|
|
||||||
"jquery-serializejson": "^2.9.0",
|
"jquery-serializejson": "^2.9.0",
|
||||||
"moment": "^2.27.0",
|
"moment": "^2.27.0",
|
||||||
"nosleep.js": "^0.12.0",
|
"nosleep.js": "^0.12.0",
|
||||||
|
@@ -583,15 +583,6 @@ if (window.location.hash)
|
|||||||
$(window.location.hash).addClass("p-2 border border-info rounded");
|
$(window.location.hash).addClass("p-2 border border-info rounded");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#about-dialog-link").on("click", function()
|
|
||||||
{
|
|
||||||
bootbox.alert({
|
|
||||||
message: '<iframe height="400px" class="embed-responsive" src="' + U("/about?embedded") + '"></iframe>',
|
|
||||||
closeButton: false,
|
|
||||||
size: "large"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function RefreshLocaleNumberDisplay(rootSelector = "#page-content")
|
function RefreshLocaleNumberDisplay(rootSelector = "#page-content")
|
||||||
{
|
{
|
||||||
$(rootSelector + " .locale-number.locale-number-currency").each(function()
|
$(rootSelector + " .locale-number.locale-number-currency").each(function()
|
||||||
@@ -674,22 +665,6 @@ $(document).on("click", ".easy-link-copy-textbox", function()
|
|||||||
$(this).select();
|
$(this).select();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Summernote workaround: Make embeds responsive
|
|
||||||
// By wrapping any embeded video in a container with class "embed-responsive"
|
|
||||||
$(".note-video-clip").each(function()
|
|
||||||
{
|
|
||||||
$(this).parent().html('<div class="embed-responsive embed-responsive-16by9">' + $(this).wrap("<p/>").parent().html() + "</div>");
|
|
||||||
});
|
|
||||||
|
|
||||||
function LoadImagesLazy()
|
|
||||||
{
|
|
||||||
$(".lazy:visible").Lazy({
|
|
||||||
enableThrottle: true,
|
|
||||||
throttle: 500
|
|
||||||
});
|
|
||||||
}
|
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
if (Grocy.CalendarFirstDayOfWeek)
|
if (Grocy.CalendarFirstDayOfWeek)
|
||||||
{
|
{
|
||||||
moment.updateLocale(moment.locale(), {
|
moment.updateLocale(moment.locale(), {
|
||||||
@@ -720,7 +695,7 @@ $(document).on("click", ".show-as-dialog-link", function(e)
|
|||||||
var link = $(e.currentTarget).attr("href");
|
var link = $(e.currentTarget).attr("href");
|
||||||
|
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + link + '"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + link + '" loading="lazy"></iframe>',
|
||||||
size: 'large',
|
size: 'large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
@@ -738,7 +713,7 @@ $(document).on("click", ".show-as-dialog-link", function(e)
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Init Bootstrap tooltips
|
// Init Bootstrap tooltips
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
// serializeJSON defaults
|
// serializeJSON defaults
|
||||||
$.serializeJSON.defaultOptions.checkboxUncheckedValue = "0";
|
$.serializeJSON.defaultOptions.checkboxUncheckedValue = "0";
|
||||||
@@ -750,6 +725,7 @@ $(Grocy.UserPermissions).each(function(index, item)
|
|||||||
$('.permission-' + item.permission_name).addClass('disabled').addClass('not-allowed');
|
$('.permission-' + item.permission_name).addClass('disabled').addClass('not-allowed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.link-return').not(".btn").each(function()
|
$('a.link-return').not(".btn").each(function()
|
||||||
{
|
{
|
||||||
var base = $(this).data('href');
|
var base = $(this).data('href');
|
||||||
@@ -762,8 +738,7 @@ $('a.link-return').not(".btn").each(function()
|
|||||||
$(this).attr('href', base + '?returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative));
|
$(this).attr('href', base + '?returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative));
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
});
|
||||||
|
|
||||||
$(document).on("click", "a.btn.link-return", function(e)
|
$(document).on("click", "a.btn.link-return", function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@@ -324,7 +324,6 @@ $(document).on("click", ".change-table-columns-visibility-toggle", function()
|
|||||||
var dataTable = $(dataTableSelector).DataTable();
|
var dataTable = $(dataTableSelector).DataTable();
|
||||||
|
|
||||||
dataTable.columns(columnIndex).visible(this.checked);
|
dataTable.columns(columnIndex).visible(this.checked);
|
||||||
LoadImagesLazy();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@@ -6,8 +6,15 @@ $("textarea.wysiwyg-editor").summernote({
|
|||||||
{
|
{
|
||||||
// Summernote workaround: Make images responsive
|
// Summernote workaround: Make images responsive
|
||||||
// By adding the "img-fluid" class to the img tag
|
// By adding the "img-fluid" class to the img tag
|
||||||
$img = $('<img>').attr({ src: url, class: "img-fluid" })
|
$img = $('<img>').attr({ src: url, class: "img-fluid", loading: "lazy" })
|
||||||
$(this).summernote("insertNode", $img[0]);
|
$(this).summernote("insertNode", $img[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Summernote workaround: Make embeds responsive
|
||||||
|
// By wrapping any embeded video in a container with class "embed-responsive"
|
||||||
|
$(".note-video-clip").each(function()
|
||||||
|
{
|
||||||
|
$(this).parent().html('<div class="embed-responsive embed-responsive-16by9">' + $(this).wrap("<p/>").parent().html() + "</div>");
|
||||||
|
});
|
||||||
|
@@ -159,7 +159,6 @@ Grocy.Components.UserfieldsForm.Load = function()
|
|||||||
formGroup.find('.userfield-file-show').removeClass('d-none');
|
formGroup.find('.userfield-file-show').removeClass('d-none');
|
||||||
formGroup.find('img.userfield-current-file')
|
formGroup.find('img.userfield-current-file')
|
||||||
.attr('src', U('/files/userfiles/' + value + '?force_serve_as=picture&best_fit_width=250&best_fit_height=250'));
|
.attr('src', U('/files/userfiles/' + value + '?force_serve_as=picture&best_fit_width=250&best_fit_height=250'));
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
formGroup.find('.userfield-file-delete').click(
|
formGroup.find('.userfield-file-delete').click(
|
||||||
function()
|
function()
|
||||||
@@ -240,7 +239,6 @@ Grocy.Components.UserfieldsForm.Clear = function()
|
|||||||
formGroup.find('.userfield-file-show').removeClass('d-none');
|
formGroup.find('.userfield-file-show').removeClass('d-none');
|
||||||
formGroup.find('img.userfield-current-file')
|
formGroup.find('img.userfield-current-file')
|
||||||
.attr('src', U('/files/userfiles/' + value + '?force_serve_as=picture&best_fit_width=250&best_fit_height=250'));
|
.attr('src', U('/files/userfiles/' + value + '?force_serve_as=picture&best_fit_width=250&best_fit_height=250'));
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
formGroup.find('.userfield-file-delete').click(
|
formGroup.find('.userfield-file-delete').click(
|
||||||
function()
|
function()
|
||||||
|
@@ -208,7 +208,7 @@ $(".calendar").each(function()
|
|||||||
|
|
||||||
if (recipe.picture_file_name)
|
if (recipe.picture_file_name)
|
||||||
{
|
{
|
||||||
element.prepend('<div class="mx-auto mb-1"><img data-src="' + U("/api/files/recipepictures/") + btoa(recipe.picture_file_name) + '?force_serve_as=picture&best_fit_width=400" class="img-fluid rounded-circle lazy"></div>')
|
element.prepend('<div class="mx-auto mb-1"><img src="' + U("/api/files/recipepictures/") + btoa(recipe.picture_file_name) + '?force_serve_as=picture&best_fit_width=400" class="img-fluid rounded-circle" loading="lazy"></div>')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.type == "product")
|
else if (event.type == "product")
|
||||||
@@ -279,7 +279,7 @@ $(".calendar").each(function()
|
|||||||
|
|
||||||
if (productDetails.product.picture_file_name)
|
if (productDetails.product.picture_file_name)
|
||||||
{
|
{
|
||||||
element.prepend('<div class="mx-auto mb-1"><img data-src="' + U("/api/files/productpictures/") + btoa(productDetails.product.picture_file_name) + '?force_serve_as=picture&best_fit_width=400" class="img-fluid rounded-circle lazy"></div>')
|
element.prepend('<div class="mx-auto mb-1"><img src="' + U("/api/files/productpictures/") + btoa(productDetails.product.picture_file_name) + '?force_serve_as=picture&best_fit_width=400" class="img-fluid rounded-circle" loading="lazy"></div>')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.type == "note")
|
else if (event.type == "note")
|
||||||
@@ -352,7 +352,6 @@ $(".calendar").each(function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
RefreshLocaleNumberDisplay();
|
RefreshLocaleNumberDisplay();
|
||||||
LoadImagesLazy();
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
||||||
@@ -929,7 +928,7 @@ $(document).on("click", ".display-recipe-button", function(e)
|
|||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + objectId + '#fullscreen"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + objectId + '#fullscreen" loading="lazy"></iframe>',
|
||||||
size: 'extra-large',
|
size: 'extra-large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
});
|
});
|
||||||
$('#products-table tbody').removeClass("d-none");
|
$('#products-table tbody').removeClass("d-none");
|
||||||
productsTable.columns.adjust().draw();
|
productsTable.columns.adjust().draw();
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
$("#search").on("keyup", Delay(function()
|
$("#search").on("keyup", Delay(function()
|
||||||
{
|
{
|
||||||
|
@@ -198,7 +198,7 @@ $("#test-quantityunit-plural-forms-button").on("click", function(e)
|
|||||||
$("#save-quantityunit-button").click();
|
$("#save-quantityunit-button").click();
|
||||||
|
|
||||||
bootbox.alert({
|
bootbox.alert({
|
||||||
message: '<iframe height="400px" class="embed-responsive" src="' + U("/quantityunitpluraltesting?embedded&qu=") + Grocy.EditObjectId.toString() + '"></iframe>',
|
message: '<iframe height="400px" class="embed-responsive" src="' + U("/quantityunitpluraltesting?embedded&qu=") + Grocy.EditObjectId.toString() + '" loading="lazy"></iframe>',
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
size: "large",
|
size: "large",
|
||||||
callback: function(result)
|
callback: function(result)
|
||||||
|
@@ -220,7 +220,7 @@ $(document).on('click', '.recipe-pos-edit-button', function(e)
|
|||||||
var recipePosId = $(e.currentTarget).attr('data-recipe-pos-id');
|
var recipePosId = $(e.currentTarget).attr('data-recipe-pos-id');
|
||||||
|
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipe/") + Grocy.EditObjectId.toString() + '/pos/' + recipePosId.toString() + '?embedded&product=' + productId.toString() + '"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipe/") + Grocy.EditObjectId.toString() + '/pos/' + recipePosId.toString() + '?embedded&product=' + productId.toString() + '" loading="lazy"></iframe>',
|
||||||
size: 'large',
|
size: 'large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
@@ -266,7 +266,7 @@ $("#recipe-pos-add-button").on("click", function(e)
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipe/") + Grocy.EditObjectId + '/pos/new?embedded"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipe/") + Grocy.EditObjectId + '/pos/new?embedded" loading="lazy"></iframe>',
|
||||||
size: 'large',
|
size: 'large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
|
@@ -63,7 +63,6 @@ $("a[data-toggle='tab']").on("shown.bs.tab", function(e)
|
|||||||
{
|
{
|
||||||
var tabId = $(e.target).attr("id");
|
var tabId = $(e.target).attr("id");
|
||||||
window.localStorage.setItem("recipes_last_tab_id", tabId);
|
window.localStorage.setItem("recipes_last_tab_id", tabId);
|
||||||
LoadImagesLazy();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#search").on("keyup", Delay(function()
|
$("#search").on("keyup", Delay(function()
|
||||||
@@ -293,7 +292,7 @@ recipesTables.on('select', function(e, dt, type, indexes)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen" loading="lazy"></iframe>',
|
||||||
size: 'extra-large',
|
size: 'extra-large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
@@ -325,7 +324,7 @@ $(".recipe-gallery-item").on("click", function(e)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bootbox.dialog({
|
bootbox.dialog({
|
||||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen"></iframe>',
|
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + selectedRecipeId + '#fullscreen" loading="lazy"></iframe>',
|
||||||
size: 'extra-large',
|
size: 'extra-large',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
@@ -419,8 +418,6 @@ if (window.location.hash === "#fullscreen")
|
|||||||
$("#selectedRecipeToggleFullscreenButton").click();
|
$("#selectedRecipeToggleFullscreenButton").click();
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
$(document).on('click', '.recipe-grocycode-label-print', function(e)
|
$(document).on('click', '.recipe-grocycode-label-print', function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@@ -35,7 +35,6 @@ var stockOverviewTable = $('#stock-overview-table').DataTable({
|
|||||||
|
|
||||||
$('#stock-overview-table tbody').removeClass("d-none");
|
$('#stock-overview-table tbody').removeClass("d-none");
|
||||||
stockOverviewTable.columns.adjust().draw();
|
stockOverviewTable.columns.adjust().draw();
|
||||||
LoadImagesLazy();
|
|
||||||
|
|
||||||
$("#location-filter").on("change", function()
|
$("#location-filter").on("change", function()
|
||||||
{
|
{
|
||||||
|
@@ -108,7 +108,8 @@
|
|||||||
<p>
|
<p>
|
||||||
@if($mode == 'edit')
|
@if($mode == 'edit')
|
||||||
<img src="{{ $U('/battery/' . $battery->id . '/grocycode?size=60') }}"
|
<img src="{{ $U('/battery/' . $battery->id . '/grocycode?size=60') }}"
|
||||||
class="float-lg-left">
|
class="float-lg-left"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@@ -323,7 +323,8 @@
|
|||||||
<p>
|
<p>
|
||||||
@if($mode == 'edit')
|
@if($mode == 'edit')
|
||||||
<img src="{{ $U('/chore/' . $chore->id . '/grocycode?size=60') }}"
|
<img src="{{ $U('/chore/' . $chore->id . '/grocycode?size=60') }}"
|
||||||
class="float-lg-left">
|
class="float-lg-left"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@@ -79,9 +79,12 @@
|
|||||||
@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)<strong>{{ $__t('Average shelf life') }}:</strong> <span id="productcard-product-average-shelf-life"></span><br>@endif
|
@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)<strong>{{ $__t('Average shelf life') }}:</strong> <span id="productcard-product-average-shelf-life"></span><br>@endif
|
||||||
<strong>{{ $__t('Spoil rate') }}:</strong> <span id="productcard-product-spoil-rate"></span>
|
<strong>{{ $__t('Spoil rate') }}:</strong> <span id="productcard-product-spoil-rate"></span>
|
||||||
|
|
||||||
<p class="w-75 mt-3 mx-auto"><img id="productcard-product-picture"
|
<p class="w-75 mt-3 mx-auto">
|
||||||
data-src=""
|
<img id="productcard-product-picture"
|
||||||
class="img-fluid img-thumbnail d-none lazy"></p>
|
class="img-fluid img-thumbnail d-none"
|
||||||
|
src=""
|
||||||
|
loading="lazy">
|
||||||
|
</p>
|
||||||
|
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
<h5 class="mt-3">{{ $__t('Price history') }}</h5>
|
<h5 class="mt-3">{{ $__t('Price history') }}</h5>
|
||||||
|
@@ -44,9 +44,9 @@ $excludeFieldTypes = [];
|
|||||||
<a class="show-as-dialog-link"
|
<a class="show-as-dialog-link"
|
||||||
href="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture') }}">
|
href="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture') }}">
|
||||||
<img src="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}"
|
<img src="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}"
|
||||||
class="lazy"
|
|
||||||
title="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}"
|
title="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}"
|
||||||
alt="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}">
|
alt="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}"
|
||||||
|
loading="lazy">
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
{{ $userfieldObject->value }}
|
{{ $userfieldObject->value }}
|
||||||
|
@@ -203,8 +203,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<img src=""
|
<img src=""
|
||||||
alt="{{ $userfield->name }}"
|
alt="{{ $userfield->name }}"
|
||||||
class="userfield-current-file userfield-file-show d-none lazy mt-1 discrete-link"
|
class="userfield-current-file userfield-file-show d-none mt-1 discrete-link"
|
||||||
data-uf-name="{{ $userfield->name }}" />
|
loading="lazy" />
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@@ -466,7 +466,8 @@
|
|||||||
<i class="fa-solid fa-user"></i>
|
<i class="fa-solid fa-user"></i>
|
||||||
@else
|
@else
|
||||||
<img class="rounded-circle"
|
<img class="rounded-circle"
|
||||||
src="{{ $U('/files/userpictures/' . base64_encode(GROCY_USER_PICTURE_FILE_NAME) . '_' . base64_encode(GROCY_USER_PICTURE_FILE_NAME) . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}">
|
src="{{ $U('/files/userpictures/' . base64_encode(GROCY_USER_PICTURE_FILE_NAME) . '_' . base64_encode(GROCY_USER_PICTURE_FILE_NAME) . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
{{ GROCY_USER_USERNAME }}
|
{{ GROCY_USER_USERNAME }}
|
||||||
</a>
|
</a>
|
||||||
@@ -666,9 +667,8 @@
|
|||||||
<a class="dropdown-item discrete-link"
|
<a class="dropdown-item discrete-link"
|
||||||
href="{{ $U('/barcodescannertesting') }}"><i class="fa-solid fa-barcode"></i> {{ $__t('Barcode scanner testing') }}</a>
|
href="{{ $U('/barcodescannertesting') }}"><i class="fa-solid fa-barcode"></i> {{ $__t('Barcode scanner testing') }}</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a id="about-dialog-link"
|
<a class="dropdown-item discrete-link show-as-dialog-link"
|
||||||
class="dropdown-item discrete-link"
|
href="{{ $U('/about?embedded') }}"><i class="fa-solid fa-info fa-fw"></i> {{ $__t('About Grocy') }}</a>
|
||||||
href="#"><i class="fa-solid fa-info fa-fw"></i> {{ $__t('About Grocy') }}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -696,7 +696,6 @@
|
|||||||
<script src="{{ $U('/node_modules/toastr/build/toastr.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/toastr/build/toastr.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/sprintf-js/dist/sprintf.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/sprintf-js/dist/sprintf.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/gettext-translator/dist/translator.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/gettext-translator/dist/translator.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/jquery-lazy/jquery.lazy.min.js?v=', true) }}{{ $version }}"></script>
|
|
||||||
<script src="{{ $U('/node_modules/nosleep.js/dist/NoSleep.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/nosleep.js/dist/NoSleep.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
|
|
||||||
@if(in_array('bootstrap-combobox', $GROCY_REQUIRED_FRONTEND_PACKAGES))
|
@if(in_array('bootstrap-combobox', $GROCY_REQUIRED_FRONTEND_PACKAGES))
|
||||||
|
@@ -738,7 +738,8 @@
|
|||||||
<p>
|
<p>
|
||||||
@if($mode == 'edit')
|
@if($mode == 'edit')
|
||||||
<img src="{{ $U('/product/' . $product->id . '/grocycode?size=60') }}"
|
<img src="{{ $U('/product/' . $product->id . '/grocycode?size=60') }}"
|
||||||
class="float-lg-left">
|
class="float-lg-left"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -869,8 +870,9 @@
|
|||||||
</div>
|
</div>
|
||||||
@if($mode == "edit" && !empty($product->picture_file_name))
|
@if($mode == "edit" && !empty($product->picture_file_name))
|
||||||
<img id="current-product-picture"
|
<img id="current-product-picture"
|
||||||
data-src="{{ $U('/api/files/productpictures/' . base64_encode($product->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
src="{{ $U('/api/files/productpictures/' . base64_encode($product->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
||||||
class="img-fluid img-thumbnail mt-2 lazy mb-5">
|
class="img-fluid img-thumbnail mt-2 mb-5"
|
||||||
|
loading="lazy">
|
||||||
<p id="delete-current-product-picture-on-save-hint"
|
<p id="delete-current-product-picture-on-save-hint"
|
||||||
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
||||||
@else
|
@else
|
||||||
|
@@ -212,8 +212,8 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img data-src="{{ $U('/product/' . $product->id . '/grocycode?size=25') }}"
|
<img src="{{ $U('/product/' . $product->id . '/grocycode?size=25') }}"
|
||||||
class="lazy">
|
loading="lazy">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@include('components.userfields_tbody', array(
|
@include('components.userfields_tbody', array(
|
||||||
|
@@ -326,8 +326,9 @@
|
|||||||
</div>
|
</div>
|
||||||
@if(!empty($recipe->picture_file_name))
|
@if(!empty($recipe->picture_file_name))
|
||||||
<img id="current-recipe-picture"
|
<img id="current-recipe-picture"
|
||||||
data-src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
||||||
class="img-fluid img-thumbnail mt-2 lazy mb-5">
|
class="img-fluid img-thumbnail mt-2 mb-5"
|
||||||
|
loading="lazy">
|
||||||
<p id="delete-current-recipe-picture-on-save-hint"
|
<p id="delete-current-recipe-picture-on-save-hint"
|
||||||
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
||||||
@else
|
@else
|
||||||
@@ -350,7 +351,8 @@
|
|||||||
<p>
|
<p>
|
||||||
@if($mode == 'edit')
|
@if($mode == 'edit')
|
||||||
<img src="{{ $U('/recipe/' . $recipe->id . '/grocycode?size=60') }}"
|
<img src="{{ $U('/recipe/' . $recipe->id . '/grocycode?size=60') }}"
|
||||||
class="float-lg-left">
|
class="float-lg-left"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@@ -257,8 +257,9 @@
|
|||||||
<div id="RecipeGalleryCard-{{ $recipe->id }}"
|
<div id="RecipeGalleryCard-{{ $recipe->id }}"
|
||||||
class="card recipe-card">
|
class="card recipe-card">
|
||||||
@if(!empty($recipe->picture_file_name))
|
@if(!empty($recipe->picture_file_name))
|
||||||
<img data-src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
<img src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
||||||
class="card-img-top lazy">
|
class="card-img-top"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<h5 class="card-title mb-1">{{ $recipe->name }}</h5>
|
<h5 class="card-title mb-1">{{ $recipe->name }}</h5>
|
||||||
@@ -323,8 +324,9 @@
|
|||||||
id="recipe-{{ $index + 1 }}"
|
id="recipe-{{ $index + 1 }}"
|
||||||
role="tabpanel">
|
role="tabpanel">
|
||||||
@if(!empty($recipe->picture_file_name))
|
@if(!empty($recipe->picture_file_name))
|
||||||
<img class="card-img-top lazy"
|
<img class="card-img-top"
|
||||||
src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture') }}">
|
src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture') }}"
|
||||||
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="shadow p-4 mb-5 bg-white rounded mt-n5 d-print-none @if(empty($recipe->picture_file_name)) d-none @endif">
|
<div class="shadow p-4 mb-5 bg-white rounded mt-n5 d-print-none @if(empty($recipe->picture_file_name)) d-none @endif">
|
||||||
|
@@ -322,7 +322,8 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<iframe id="shopping-list-stock-add-workflow-purchase-form-frame"
|
<iframe id="shopping-list-stock-add-workflow-purchase-form-frame"
|
||||||
class="embed-responsive"
|
class="embed-responsive"
|
||||||
src=""></iframe>
|
src=""
|
||||||
|
loading="lazy"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<span id="shopping-list-stock-add-workflow-purchase-item-count"
|
<span id="shopping-list-stock-add-workflow-purchase-item-count"
|
||||||
|
@@ -436,8 +436,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if(!empty($currentStockEntry->product_picture_file_name))
|
@if(!empty($currentStockEntry->product_picture_file_name))
|
||||||
<img data-src="{{ $U('/api/files/productpictures/' . base64_encode($currentStockEntry->product_picture_file_name) . '?force_serve_as=picture&best_fit_width=64&best_fit_height=64') }}"
|
<img src="{{ $U('/api/files/productpictures/' . base64_encode($currentStockEntry->product_picture_file_name) . '?force_serve_as=picture&best_fit_width=64&best_fit_height=64') }}"
|
||||||
class="lazy">
|
loading="lazy">
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||||
|
@@ -159,8 +159,9 @@
|
|||||||
</div>
|
</div>
|
||||||
@if(!empty($user->picture_file_name))
|
@if(!empty($user->picture_file_name))
|
||||||
<img id="current-user-picture"
|
<img id="current-user-picture"
|
||||||
data-src="{{ $U('/api/files/userpictures/' . base64_encode($user->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
src="{{ $U('/api/files/userpictures/' . base64_encode($user->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
|
||||||
class="img-fluid img-thumbnail mt-2 lazy mb-5">
|
class="img-fluid img-thumbnail mt-2 mb-5"
|
||||||
|
loading="lazy">
|
||||||
<p id="delete-current-user-picture-on-save-hint"
|
<p id="delete-current-user-picture-on-save-hint"
|
||||||
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted on save') }}</p>
|
||||||
@else
|
@else
|
||||||
|
@@ -1156,19 +1156,12 @@ jpeg-js@^0.4.1:
|
|||||||
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
|
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
|
||||||
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
|
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
|
||||||
|
|
||||||
jquery-lazy@^1.7.11:
|
|
||||||
version "1.7.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/jquery-lazy/-/jquery-lazy-1.7.11.tgz#f4146501ba64cad95cc5c20f184ac1b1d3712fe5"
|
|
||||||
integrity sha512-jNAOMwfgf+lYaOCc/atBVjbOzAIRW5BUyjQ4b4jJPkQM6I0zGZd4m/Y73ekfAlrQQDg3/Dge3YNhW7Cqjgi0UA==
|
|
||||||
dependencies:
|
|
||||||
jquery ">=1.7.2"
|
|
||||||
|
|
||||||
jquery-serializejson@^2.9.0:
|
jquery-serializejson@^2.9.0:
|
||||||
version "2.9.0"
|
version "2.9.0"
|
||||||
resolved "https://registry.yarnpkg.com/jquery-serializejson/-/jquery-serializejson-2.9.0.tgz#03e3764e3a4b42c1c5aae9f93d7f19320c5f35a6"
|
resolved "https://registry.yarnpkg.com/jquery-serializejson/-/jquery-serializejson-2.9.0.tgz#03e3764e3a4b42c1c5aae9f93d7f19320c5f35a6"
|
||||||
integrity sha512-xR7rjl0tRKIVioV5lOkOSv7K8BHMvGzYzC7Ech1iAYuZiYf0ksEpLC8OqjA5VApXf/qn/49O9hTmW70+/EA0vA==
|
integrity sha512-xR7rjl0tRKIVioV5lOkOSv7K8BHMvGzYzC7Ech1iAYuZiYf0ksEpLC8OqjA5VApXf/qn/49O9hTmW70+/EA0vA==
|
||||||
|
|
||||||
jquery@>=1.10, jquery@>=1.12.0, jquery@>=1.7, jquery@>=1.7.2, jquery@^3.6.0:
|
jquery@>=1.10, jquery@>=1.12.0, jquery@>=1.7, jquery@^3.6.0:
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.0.tgz#fe2c01a05da500709006d8790fe21c8a39d75612"
|
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.0.tgz#fe2c01a05da500709006d8790fe21c8a39d75612"
|
||||||
integrity sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==
|
integrity sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==
|
||||||
|
Reference in New Issue
Block a user