mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Replaced jQuery UI by Animate.css (better, faster, lighter)
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
- Slightly optimized table loading & search performance (thanks @lwis)
|
- Slightly optimized table loading & search performance (thanks @lwis)
|
||||||
- Added that the currently active sidebar menu item is always in view
|
- Added that the currently active sidebar menu item is always in view
|
||||||
- Reordered the sidebar menu items a little bit, grouped them by borders and made them a little smaller to waste less space
|
- Reordered the sidebar menu items a little bit, grouped them by borders and made them a little smaller to waste less space
|
||||||
|
- Changed/removed some animations (and replaced jQuery UI by [Animate.css](https://daneden.github.io/animate.css/)) to improve responsiveness
|
||||||
- Fixed that also the first column (where in most tables only buttons/menus are displayed) in tables was searched when using the general search field
|
- Fixed that also the first column (where in most tables only buttons/menus are displayed) in tables was searched when using the general search field
|
||||||
- Fixed that the meal plan menu entry (sidebar) was not visible when the calendar was disabled (`FEATURE_FLAG_CALENDAR`) (thanks @lwis)
|
- Fixed that the meal plan menu entry (sidebar) was not visible when the calendar was disabled (`FEATURE_FLAG_CALENDAR`) (thanks @lwis)
|
||||||
- For integration: If a `GET` parameter `closeAfterCreation` is passed to the product edit page, the window will be closed on save (due to Browser restrictions, this only works when the window was opened from JavaScript) (thanks @Forceu)
|
- For integration: If a `GET` parameter `closeAfterCreation` is passed to the product edit page, the window will be closed on save (due to Browser restrictions, this only works when the window was opened from JavaScript) (thanks @Forceu)
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
"@danielfarrell/bootstrap-combobox": "https://github.com/berrnd/bootstrap-combobox.git#master",
|
"@danielfarrell/bootstrap-combobox": "https://github.com/berrnd/bootstrap-combobox.git#master",
|
||||||
"@fortawesome/fontawesome-free": "^5.11.1",
|
"@fortawesome/fontawesome-free": "^5.11.1",
|
||||||
"TagManager": "https://github.com/max-favilli/tagmanager.git#master",
|
"TagManager": "https://github.com/max-favilli/tagmanager.git#master",
|
||||||
|
"animate.css": "^3.7.2",
|
||||||
"bootbox": "^5.3.2",
|
"bootbox": "^5.3.2",
|
||||||
"bootstrap": "^4.3.1",
|
"bootstrap": "^4.3.1",
|
||||||
"bootstrap-select": "^1.13.10",
|
"bootstrap-select": "^1.13.10",
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
"jquery": "^3.4.1",
|
"jquery": "^3.4.1",
|
||||||
"jquery-lazy": "^1.7.10",
|
"jquery-lazy": "^1.7.10",
|
||||||
"jquery-serializejson": "^2.9.0",
|
"jquery-serializejson": "^2.9.0",
|
||||||
"jquery-ui-dist": "^1.12.1",
|
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"nosleep.js": "^0.9.0",
|
"nosleep.js": "^0.9.0",
|
||||||
"quagga": "^0.12.1",
|
"quagga": "^0.12.1",
|
||||||
|
@@ -153,3 +153,22 @@ $.fn.isVisibleInViewport = function(extraHeightPadding = 0)
|
|||||||
|
|
||||||
return elementTop + $(this).outerHeight() > viewportTop && elementTop < viewportTop + $(window).height();
|
return elementTop + $(this).outerHeight() > viewportTop && elementTop < viewportTop + $(window).height();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function animateCSS(selector, animationName, callback, speed = "faster")
|
||||||
|
{
|
||||||
|
var nodes = $(selector);
|
||||||
|
nodes.addClass('animated').addClass(speed).addClass(animationName);
|
||||||
|
|
||||||
|
function handleAnimationEnd()
|
||||||
|
{
|
||||||
|
nodes.removeClass('animated').removeClass(speed).removeClass(animationName);
|
||||||
|
nodes.unbind('animationend', handleAnimationEnd);
|
||||||
|
|
||||||
|
if (typeof callback === 'function')
|
||||||
|
{
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nodes.on('animationend', handleAnimationEnd);
|
||||||
|
}
|
||||||
|
@@ -61,20 +61,16 @@ function OnBarcodeScanned(barcode)
|
|||||||
Grocy.BarCodeScannerTestingMissCount++;
|
Grocy.BarCodeScannerTestingMissCount++;
|
||||||
bgClass = "bg-danger";
|
bgClass = "bg-danger";
|
||||||
|
|
||||||
$("#miss-count").fadeOut(200, function ()
|
$("#miss-count").text(Grocy.BarCodeScannerTestingMissCount);
|
||||||
{
|
animateCSS("#miss-count", "pulse");
|
||||||
$(this).text(Grocy.BarCodeScannerTestingMissCount).fadeIn(200);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Grocy.BarCodeScannerTestingHitCount++;
|
Grocy.BarCodeScannerTestingHitCount++;
|
||||||
bgClass = "bg-success";
|
bgClass = "bg-success";
|
||||||
|
|
||||||
$("#hit-count").fadeOut(200, function ()
|
$("#hit-count").text(Grocy.BarCodeScannerTestingHitCount);
|
||||||
{
|
animateCSS("#hit-count", "pulse");
|
||||||
$(this).text(Grocy.BarCodeScannerTestingHitCount).fadeIn(200);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#scanned_codes").prepend("<option class='" + bgClass + "'>" + barcode + "</option>");
|
$("#scanned_codes").prepend("<option class='" + bgClass + "'>" + barcode + "</option>");
|
||||||
|
@@ -76,20 +76,13 @@ $(document).on('click', '.track-charge-cycle-button', function(e)
|
|||||||
batteryRow.addClass("table-warning");
|
batteryRow.addClass("table-warning");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#battery-' + batteryId + '-last-tracked-time').parent().effect('highlight', { }, 500);
|
animateCSS("#battery-" + batteryId + "-row td:not(:first)", "shake");
|
||||||
$('#battery-' + batteryId + '-last-tracked-time').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(trackedTime).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#battery-' + batteryId + '-last-tracked-time-timeago').attr('datetime', trackedTime);
|
|
||||||
|
|
||||||
|
$('#battery-' + batteryId + '-last-tracked-time').text(trackedTime);
|
||||||
|
$('#battery-' + batteryId + '-last-tracked-time-timeago').attr('datetime', trackedTime);
|
||||||
if (result.battery.charge_interval_days != 0)
|
if (result.battery.charge_interval_days != 0)
|
||||||
{
|
{
|
||||||
$('#battery-' + batteryId + '-next-charge-time').parent().effect('highlight', { }, 500);
|
$('#battery-' + batteryId + '-next-charge-time').text(result.next_estimated_charge_time);
|
||||||
$('#battery-' + batteryId + '-next-charge-time').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.next_estimated_charge_time).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#battery-' + batteryId + '-next-charge-time-timeago').attr('datetime', result.next_estimated_charge_time);
|
$('#battery-' + batteryId + '-next-charge-time-timeago').attr('datetime', result.next_estimated_charge_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -113,30 +113,20 @@ $(document).on('click', '.track-chore-button', function(e)
|
|||||||
$('#chore-' + choreId + '-due-filter-column').html("duesoon");
|
$('#chore-' + choreId + '-due-filter-column').html("duesoon");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#chore-' + choreId + '-last-tracked-time').parent().effect('highlight', { }, 500);
|
animateCSS("#chore-" + choreId + "-row td:not(:first)", "shake");
|
||||||
$('#chore-' + choreId + '-last-tracked-time').fadeOut(500, function()
|
|
||||||
{
|
$('#chore-' + choreId + '-last-tracked-time').text(trackedTime);
|
||||||
$(this).text(trackedTime).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#chore-' + choreId + '-last-tracked-time-timeago').attr('datetime', trackedTime);
|
$('#chore-' + choreId + '-last-tracked-time-timeago').attr('datetime', trackedTime);
|
||||||
|
|
||||||
if (result.chore.period_type == "dynamic-regular")
|
if (result.chore.period_type == "dynamic-regular")
|
||||||
{
|
{
|
||||||
$('#chore-' + choreId + '-next-execution-time').parent().effect('highlight', { }, 500);
|
$('#chore-' + choreId + '-next-execution-time').text(result.next_estimated_execution_time);
|
||||||
$('#chore-' + choreId + '-next-execution-time').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.next_estimated_execution_time).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#chore-' + choreId + '-next-execution-time-timeago').attr('datetime', result.next_estimated_execution_time);
|
$('#chore-' + choreId + '-next-execution-time-timeago').attr('datetime', result.next_estimated_execution_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.chore.next_execution_assigned_to_user_id != null)
|
if (result.chore.next_execution_assigned_to_user_id != null)
|
||||||
{
|
{
|
||||||
$('#chore-' + choreId + '-next-execution-assigned-user').parent().effect('highlight', {}, 500);
|
$('#chore-' + choreId + '-next-execution-assigned-user').text(result.next_execution_assigned_user.display_name);
|
||||||
$('#chore-' + choreId + '-next-execution-assigned-user').fadeOut(500, function ()
|
|
||||||
{
|
|
||||||
$(this).text(result.next_execution_assigned_user.display_name).fadeIn(500);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.FrontendHelpers.EndUiBusy();
|
Grocy.FrontendHelpers.EndUiBusy();
|
||||||
|
@@ -11,7 +11,7 @@ apiKeysTable.columns.adjust().draw();
|
|||||||
var createdApiKeyId = GetUriParam('CreatedApiKeyId');
|
var createdApiKeyId = GetUriParam('CreatedApiKeyId');
|
||||||
if (createdApiKeyId !== undefined)
|
if (createdApiKeyId !== undefined)
|
||||||
{
|
{
|
||||||
$('#apiKeyRow_' + createdApiKeyId).effect('highlight', {}, 3000);
|
animateCSS("#apiKeyRow_" + createdApiKeyId, "pulse");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#search").on("keyup", Delay(function()
|
$("#search").on("keyup", Delay(function()
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
RefreshQuPluralTestingResult();
|
RefreshQuPluralTestingResult();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#amount").keyup(function (event)
|
$("#amount").keyup(function(event)
|
||||||
{
|
{
|
||||||
RefreshQuPluralTestingResult();
|
RefreshQuPluralTestingResult();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#amount").change(function (event)
|
$("#amount").change(function(event)
|
||||||
{
|
{
|
||||||
RefreshQuPluralTestingResult();
|
RefreshQuPluralTestingResult();
|
||||||
});
|
});
|
||||||
@@ -24,11 +24,8 @@ function RefreshQuPluralTestingResult()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#result").parent().effect("highlight", {}, 100);
|
animateCSS("h2", "shake");
|
||||||
$("#result").fadeOut(100, function ()
|
$("#result").text(__n(amount, singularForm, pluralForm));
|
||||||
{
|
|
||||||
$(this).text(__n(amount, singularForm, pluralForm)).fadeIn(100);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetUriParam("qu") !== undefined)
|
if (GetUriParam("qu") !== undefined)
|
||||||
|
@@ -98,10 +98,10 @@ $(document).on('click', '.shoppinglist-delete-button', function(e)
|
|||||||
Grocy.Api.Delete('objects/shopping_list/' + shoppingListItemId, {},
|
Grocy.Api.Delete('objects/shopping_list/' + shoppingListItemId, {},
|
||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
$('#shoppinglistitem-' + shoppingListItemId + '-row').fadeOut(500, function()
|
animateCSS("#shoppinglistitem-" + shoppingListItemId + "-row", "fadeOut", function()
|
||||||
{
|
{
|
||||||
Grocy.FrontendHelpers.EndUiBusy();
|
Grocy.FrontendHelpers.EndUiBusy();
|
||||||
$(this).remove();
|
$("#shoppinglistitem-" + shoppingListItemId + "-row").remove();
|
||||||
OnListItemRemoved();
|
OnListItemRemoved();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -151,10 +151,10 @@ $(document).on('click', '#clear-shopping-list', function(e)
|
|||||||
Grocy.Api.Post('stock/shoppinglist/clear', { "list_id": $("#selected-shopping-list").val() },
|
Grocy.Api.Post('stock/shoppinglist/clear', { "list_id": $("#selected-shopping-list").val() },
|
||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
$('#shoppinglist-table tbody tr').fadeOut(500, function()
|
animateCSS("#shoppinglist-table tbody tr", "fadeOut", function()
|
||||||
{
|
{
|
||||||
Grocy.FrontendHelpers.EndUiBusy();
|
Grocy.FrontendHelpers.EndUiBusy();
|
||||||
$(this).remove();
|
$("#shoppinglist-table tbody tr").remove();
|
||||||
OnListItemRemoved();
|
OnListItemRemoved();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -128,9 +128,9 @@ function RefreshStockEntryRow(stockRowId)
|
|||||||
|
|
||||||
if (result == null || result.amount == 0)
|
if (result == null || result.amount == 0)
|
||||||
{
|
{
|
||||||
stockRow.fadeOut(500, function()
|
animateCSS("#stock-" + stockRowId + "-row", "fadeOut", function()
|
||||||
{
|
{
|
||||||
$(this).addClass("d-none");
|
$("#stock-" + stockRowId + "-row").addClass("d-none");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -153,20 +153,13 @@ function RefreshStockEntryRow(stockRowId)
|
|||||||
stockRow.addClass("table-warning");
|
stockRow.addClass("table-warning");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#stock-' + stockRowId + '-amount').parent().effect('highlight', { }, 500);
|
animateCSS("#stock-" + stockRowId + "-row td:not(:first)", "shake");
|
||||||
$('#stock-' + stockRowId + '-amount').fadeOut(500, function ()
|
|
||||||
{
|
|
||||||
$(this).text(result.amount).fadeIn(500);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#stock-' + stockRowId + '-best-before-date').parent().effect('highlight', { }, 500);
|
$('#stock-' + stockRowId + '-amount').text(result.amount);
|
||||||
$('#stock-' + stockRowId + '-best-before-date').fadeOut(500, function()
|
$('#stock-' + stockRowId + '-best-before-date').text(result.best_before_date);
|
||||||
{
|
|
||||||
$(this).text(result.best_before_date).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#stock-' + stockRowId + '-best-before-date-timeago').attr('datetime', result.best_before_date + ' 23:59:59');
|
$('#stock-' + stockRowId + '-best-before-date-timeago').attr('datetime', result.best_before_date + ' 23:59:59');
|
||||||
|
|
||||||
$(".stock-consume-button").attr('data-location-id',result.location_id);
|
$(".stock-consume-button").attr('data-location-id', result.location_id);
|
||||||
|
|
||||||
var locationName = "";
|
var locationName = "";
|
||||||
Grocy.Api.Get("objects/locations/" + result.location_id,
|
Grocy.Api.Get("objects/locations/" + result.location_id,
|
||||||
@@ -179,39 +172,21 @@ function RefreshStockEntryRow(stockRowId)
|
|||||||
console.error(xhr);
|
console.error(xhr);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$('#stock-' + stockRowId + '-location').parent().effect('highlight', { }, 500);
|
$('#stock-' + stockRowId + '-location').attr('data-location-id', result.location_id);
|
||||||
$('#stock-' + stockRowId + '-location').fadeOut(500, function()
|
$('#stock-' + stockRowId + '-location').text(locationName);
|
||||||
{
|
$('#stock-' + stockRowId + '-price').text(result.price);
|
||||||
$(this).attr('data-location-id',result.location_id);
|
$('#stock-' + stockRowId + '-purchased-date').text(result.purchased_date);
|
||||||
$(this).text(locationName).fadeIn(500);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#stock-' + stockRowId + '-price').parent().effect('highlight', { }, 500);
|
|
||||||
$('#stock-' + stockRowId + '-price').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.price).fadeIn(500);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#stock-' + stockRowId + '-purchased-date').parent().effect('highlight', { }, 500);
|
|
||||||
$('#stock-' + stockRowId + '-purchased-date').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.purchased_date).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#stock-' + stockRowId + '-purchased-date-timeago').attr('datetime', result.purchased_date + ' 23:59:59');
|
$('#stock-' + stockRowId + '-purchased-date-timeago').attr('datetime', result.purchased_date + ' 23:59:59');
|
||||||
|
|
||||||
$('#stock-' + stockRowId + '-opened-amount').parent().effect('highlight', {}, 500);
|
if (result.open == 1)
|
||||||
$('#stock-' + stockRowId + '-opened-amount').fadeOut(500, function ()
|
|
||||||
{
|
{
|
||||||
if (result.open == 1)
|
$('#stock-' + stockRowId + '-opened-amount').text(__t('Opened'));
|
||||||
{
|
}
|
||||||
$(this).text(__t('Opened')).fadeIn(500);
|
else
|
||||||
}
|
{
|
||||||
else
|
$('#stock-' + stockRowId + '-opened-amount').text("");
|
||||||
{
|
$(".product-open-button[data-stockrow-id='" + stockRowId + "']").removeClass("disabled");
|
||||||
$(this).text("").fadeIn(500);
|
}
|
||||||
$(".product-open-button[data-stockrow-id='" + stockRowId + "']").removeClass("disabled");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Needs to be delayed because of the animation above the date-text would be wrong if fired immediately...
|
// Needs to be delayed because of the animation above the date-text would be wrong if fired immediately...
|
||||||
|
@@ -42,7 +42,6 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
|
|||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var element = $(e.currentTarget);
|
|
||||||
var bookingId = $(e.currentTarget).attr('data-booking-id');
|
var bookingId = $(e.currentTarget).attr('data-booking-id');
|
||||||
var correlationId = $("#stock-booking-" + bookingId + "-row").attr("data-correlation-id");
|
var correlationId = $("#stock-booking-" + bookingId + "-row").attr("data-correlation-id");
|
||||||
|
|
||||||
|
@@ -230,42 +230,32 @@ function RefreshProductRow(productId)
|
|||||||
|
|
||||||
if (result.stock_amount == 0 && result.product.min_stock_amount == 0)
|
if (result.stock_amount == 0 && result.product.min_stock_amount == 0)
|
||||||
{
|
{
|
||||||
$('#product-' + productId + '-row').fadeOut(500, function()
|
animateCSS("#product-" + productId + "-row", "fadeOut", function()
|
||||||
{
|
{
|
||||||
$(this).tooltip("hide");
|
$("#product-" + productId + "-row").tooltip("hide");
|
||||||
$(this).addClass("d-none");
|
$("#product-" + productId + "-row").addClass("d-none");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
animateCSS("#product-" + productId + "-row td:not(:first)", "shake");
|
||||||
|
|
||||||
$('#product-' + productId + '-qu-name').text(__n(result.stock_amount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural));
|
$('#product-' + productId + '-qu-name').text(__n(result.stock_amount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural));
|
||||||
$('#product-' + productId + '-amount').parent().effect('highlight', { }, 500);
|
$('#product-' + productId + '-amount').text(result.stock_amount);
|
||||||
$('#product-' + productId + '-amount').fadeOut(500, function ()
|
|
||||||
{
|
|
||||||
$(this).text(result.stock_amount).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#product-' + productId + '-consume-all-button').attr('data-consume-amount', result.stock_amount);
|
$('#product-' + productId + '-consume-all-button').attr('data-consume-amount', result.stock_amount);
|
||||||
|
|
||||||
$('#product-' + productId + '-next-best-before-date').parent().effect('highlight', { }, 500);
|
$('#product-' + productId + '-next-best-before-date').text(result.next_best_before_date);
|
||||||
$('#product-' + productId + '-next-best-before-date').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.next_best_before_date).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#product-' + productId + '-next-best-before-date-timeago').attr('datetime', result.next_best_before_date);
|
$('#product-' + productId + '-next-best-before-date-timeago').attr('datetime', result.next_best_before_date);
|
||||||
|
|
||||||
var openedAmount = result.stock_amount_opened || 0;
|
var openedAmount = result.stock_amount_opened || 0;
|
||||||
$('#product-' + productId + '-opened-amount').parent().effect('highlight', {}, 500);
|
if (openedAmount > 0)
|
||||||
$('#product-' + productId + '-opened-amount').fadeOut(500, function ()
|
|
||||||
{
|
{
|
||||||
if (openedAmount > 0)
|
$('#product-' + productId + '-opened-amount').text(__t('%s opened', openedAmount));
|
||||||
{
|
}
|
||||||
$(this).text(__t('%s opened', openedAmount)).fadeIn(500);
|
else
|
||||||
}
|
{
|
||||||
else
|
$('#product-' + productId + '-opened-amount').text("");
|
||||||
{
|
}
|
||||||
$(this).text("").fadeIn(500);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.stock_amount == 0 && result.product.min_stock_amount > 0)
|
if (result.stock_amount == 0 && result.product.min_stock_amount > 0)
|
||||||
{
|
{
|
||||||
@@ -273,20 +263,12 @@ function RefreshProductRow(productId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#product-' + productId + '-next-best-before-date').parent().effect('highlight', {}, 500);
|
$('#product-' + productId + '-next-best-before-date').text(result.next_best_before_date);
|
||||||
$('#product-' + productId + '-next-best-before-date').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(result.next_best_before_date).fadeIn(500);
|
|
||||||
});
|
|
||||||
$('#product-' + productId + '-next-best-before-date-timeago').attr('datetime', result.next_best_before_date + ' 23:59:59');
|
$('#product-' + productId + '-next-best-before-date-timeago').attr('datetime', result.next_best_before_date + ' 23:59:59');
|
||||||
|
|
||||||
if (result.stock_amount_opened > 0)
|
if (result.stock_amount_opened > 0)
|
||||||
{
|
{
|
||||||
$('#product-' + productId + '-opened-amount').parent().effect('highlight', {}, 500);
|
$('#product-' + productId + '-opened-amount').text(__t('%s opened', result.stock_amount_opened));
|
||||||
$('#product-' + productId + '-opened-amount').fadeOut(500, function()
|
|
||||||
{
|
|
||||||
$(this).text(__t('%s opened', result.stock_amount_opened)).fadeIn(500);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -295,18 +277,11 @@ function RefreshProductRow(productId)
|
|||||||
|
|
||||||
if (parseInt(result.is_aggregated_amount) === 1)
|
if (parseInt(result.is_aggregated_amount) === 1)
|
||||||
{
|
{
|
||||||
$('#product-' + productId + '-amount-aggregated').fadeOut(500, function()
|
$('#product-' + productId + '-amount-aggregated').text(result.stock_amount_aggregated);
|
||||||
{
|
|
||||||
$(this).text(result.stock_amount_aggregated).fadeIn(500);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.stock_amount_opened_aggregated > 0)
|
if (result.stock_amount_opened_aggregated > 0)
|
||||||
{
|
{
|
||||||
$('#product-' + productId + '-opened-amount-aggregated').parent().effect('highlight', {}, 500);
|
$('#product-' + productId + '-opened-amount-aggregated').text(__t('%s opened', result.stock_amount_opened_aggregated));
|
||||||
$('#product-' + productId + '-opened-amount-aggregated').fadeOut(500, function ()
|
|
||||||
{
|
|
||||||
$(this).text(__t('%s opened', result.stock_amount_opened_aggregated)).fadeIn(500);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -63,10 +63,10 @@ $(document).on('click', '.do-task-button', function(e)
|
|||||||
{
|
{
|
||||||
if (!$("#show-done-tasks").is(":checked"))
|
if (!$("#show-done-tasks").is(":checked"))
|
||||||
{
|
{
|
||||||
$('#task-' + taskId + '-row').fadeOut(500, function ()
|
animateCSS("#task-" + taskId + "-row", "fadeOut", function()
|
||||||
{
|
{
|
||||||
$(this).tooltip("hide");
|
$("#task-" + taskId + "-row").tooltip("hide");
|
||||||
$(this).remove();
|
$("#task-" + taskId + "-row").remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -142,10 +142,10 @@ $(document).on('click', '.delete-task-button', function (e)
|
|||||||
Grocy.Api.Delete('objects/tasks/' + objectId, {},
|
Grocy.Api.Delete('objects/tasks/' + objectId, {},
|
||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
$('#task-' + objectId + '-row').fadeOut(500, function ()
|
animateCSS("#task-" + objectId + "-row", "fadeOut", function()
|
||||||
{
|
{
|
||||||
$(this).tooltip("hide");
|
$("#task-" + objectId + "-row").tooltip("hide");
|
||||||
$(this).remove();
|
$("#task-" + objectId + "-row").remove();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function(xhr)
|
function(xhr)
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
@section('viewJsName', 'barcodescannertesting')
|
@section('viewJsName', 'barcodescannertesting')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
@section('activeNav', 'batteriesoverview')
|
@section('activeNav', 'batteriesoverview')
|
||||||
@section('viewJsName', 'batteriesoverview')
|
@section('viewJsName', 'batteriesoverview')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageStyles')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
@section('activeNav', 'choresoverview')
|
@section('activeNav', 'choresoverview')
|
||||||
@section('viewJsName', 'choresoverview')
|
@section('viewJsName', 'choresoverview')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageStyles')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
@section('activeNav', '')
|
@section('activeNav', '')
|
||||||
@section('viewJsName', 'manageapikeys')
|
@section('viewJsName', 'manageapikeys')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageStyles')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
@section('viewJsName', 'quantityunitpluraltesting')
|
@section('viewJsName', 'quantityunitpluraltesting')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageStyles')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
@section('viewJsName', 'shoppinglist')
|
@section('viewJsName', 'shoppinglist')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
|
||||||
<script src="{{ $U('/node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('pageStyles')
|
@push('pageStyles')
|
||||||
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
@@ -3,8 +3,11 @@
|
|||||||
@section('title', $__t('Stock entries'))
|
@section('title', $__t('Stock entries'))
|
||||||
@section('viewJsName', 'stockentries')
|
@section('viewJsName', 'stockentries')
|
||||||
|
|
||||||
|
@push('pageStyles')
|
||||||
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
|
@endpush
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
|
||||||
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
@@ -4,8 +4,11 @@
|
|||||||
@section('activeNav', 'stockoverview')
|
@section('activeNav', 'stockoverview')
|
||||||
@section('viewJsName', 'stockoverview')
|
@section('viewJsName', 'stockoverview')
|
||||||
|
|
||||||
|
@push('pageStyles')
|
||||||
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
|
@endpush
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
|
||||||
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
@section('viewJsName', 'tasks')
|
@section('viewJsName', 'tasks')
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/jquery-ui-dist/jquery-ui.min.js?v=', true) }}{{ $version }}"></script>
|
|
||||||
<script src="{{ $U('/node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('pageStyles')
|
@push('pageStyles')
|
||||||
|
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||||
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
10
yarn.lock
10
yarn.lock
@@ -27,6 +27,11 @@ ajv@^6.5.5:
|
|||||||
json-schema-traverse "^0.4.1"
|
json-schema-traverse "^0.4.1"
|
||||||
uri-js "^4.2.2"
|
uri-js "^4.2.2"
|
||||||
|
|
||||||
|
animate.css@^3.7.2:
|
||||||
|
version "3.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/animate.css/-/animate.css-3.7.2.tgz#e73e0d50e92cb1cfef1597d9b38a9481020e08ea"
|
||||||
|
integrity sha512-0bE8zYo7C0KvgOYrSVfrzkbYk6IOTVPNqkiHg2cbyF4Pq/PXzilz4BRWA3hwEUBoMp5VBgrC29lQIZyhRWdBTw==
|
||||||
|
|
||||||
asn1@~0.2.3:
|
asn1@~0.2.3:
|
||||||
version "0.2.4"
|
version "0.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
|
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
|
||||||
@@ -458,11 +463,6 @@ jquery-serializejson@^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-ui-dist@^1.12.1:
|
|
||||||
version "1.12.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/jquery-ui-dist/-/jquery-ui-dist-1.12.1.tgz#5c0815d3cc6f90ff5faaf5b268a6e23b4ca904fa"
|
|
||||||
integrity sha1-XAgV08xvkP9fqvWyaKbiO0ypBPo=
|
|
||||||
|
|
||||||
jquery.easing@^1.4.1:
|
jquery.easing@^1.4.1:
|
||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/jquery.easing/-/jquery.easing-1.4.1.tgz#47982c5836bd758fd48494923c4a101ef6e93e3b"
|
resolved "https://registry.yarnpkg.com/jquery.easing/-/jquery.easing-1.4.1.tgz#47982c5836bd758fd48494923c4a101ef6e93e3b"
|
||||||
|
Reference in New Issue
Block a user