grocy/js/viewjs/shoppinglistsettings.js
Katharina Bogad 2fbcefa8fd viewjs: scoped jquery
Most instances of $ have been replaced by $scope.
2021-06-23 15:00:53 +02:00

25 lines
599 B
JavaScript

import { BoolVal } from '../helpers/extensions';
function shoppinglistsettingsView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
{
$scope = $(scope).find;
}
if (BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled))
{
$scope("#shopping-list-to-stock-workflow-auto-submit-when-prefilled").prop("checked", true);
}
if (BoolVal(Grocy.UserSettings.shopping_list_show_calendar))
{
$scope("#shopping-list-show-calendar").prop("checked", true);
}
RefreshLocaleNumberInput();
}
window.shoppinglistsettingsView = shoppinglistsettingsView