Fix eslint complaints

This commit is contained in:
Katharina Bogad 2021-06-23 22:33:49 +02:00
parent f2f89830fd
commit 4267b42a0a
82 changed files with 315 additions and 146 deletions

View File

@ -6,8 +6,8 @@ class BasePicker
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
this.picker = null;
this.input_element;

View File

@ -7,8 +7,8 @@ class barcodescanner
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
// init component
this.LiveVideoSizeAdjusted = false;
@ -79,7 +79,7 @@ class barcodescanner
var dialog = bootbox.dialog({
message: '<div id="barcodescanner-container" class="col"><div id="barcodescanner-livestream"></div><div id="debug"></div></div>',
title: Grocy.translate('Scan a barcode'),
title: self.Grocy.translate('Scan a barcode'),
onEscape: function()
{
self.StopScanning();
@ -98,7 +98,7 @@ class barcodescanner
}
},
cancel: {
label: Grocy.translate('Cancel'),
label: self.Grocy.translate('Cancel'),
className: 'btn-secondary responsive-button',
callback: function()
{
@ -228,25 +228,25 @@ class barcodescanner
}
},
locator: {
patchSize: Grocy.UserSettings.quagga2_patchsize,
halfSample: Grocy.UserSettings.quagga2_halfsample,
patchSize: self.Grocy.UserSettings.quagga2_patchsize,
halfSample: self.Grocy.UserSettings.quagga2_halfsample,
debug: {
showCanvas: Grocy.UserSettings.quagga2_debug,
showPatches: Grocy.UserSettings.quagga2_debug,
showFoundPatches: Grocy.UserSettings.quagga2_debug,
showSkeleton: Grocy.UserSettings.quagga2_debug,
showLabels: Grocy.UserSettings.quagga2_debug,
showPatchLabels: Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: Grocy.UserSettings.quagga2_debug,
showCanvas: self.Grocy.UserSettings.quagga2_debug,
showPatches: self.Grocy.UserSettings.quagga2_debug,
showFoundPatches: self.Grocy.UserSettings.quagga2_debug,
showSkeleton: self.Grocy.UserSettings.quagga2_debug,
showLabels: self.Grocy.UserSettings.quagga2_debug,
showPatchLabels: self.Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: self.Grocy.UserSettings.quagga2_debug,
boxFromPatches: {
showTransformed: Grocy.UserSettings.quagga2_debug,
showTransformedBox: Grocy.UserSettings.quagga2_debug,
showBB: Grocy.UserSettings.quagga2_debug
showTransformed: self.Grocy.UserSettings.quagga2_debug,
showTransformedBox: self.Grocy.UserSettings.quagga2_debug,
showBB: self.Grocy.UserSettings.quagga2_debug
}
}
},
numOfWorkers: Grocy.UserSettings.quagga2_numofworkers,
frequency: Grocy.UserSettings.quagga2_frequency,
numOfWorkers: self.Grocy.UserSettings.quagga2_numofworkers,
frequency: self.Grocy.UserSettings.quagga2_frequency,
decoder: {
readers: [
"ean_reader",
@ -254,17 +254,17 @@ class barcodescanner
"code_128_reader"
],
debug: {
showCanvas: Grocy.UserSettings.quagga2_debug,
showPatches: Grocy.UserSettings.quagga2_debug,
showFoundPatches: Grocy.UserSettings.quagga2_debug,
showSkeleton: Grocy.UserSettings.quagga2_debug,
showLabels: Grocy.UserSettings.quagga2_debug,
showPatchLabels: Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: Grocy.UserSettings.quagga2_debug,
showCanvas: self.Grocy.UserSettings.quagga2_debug,
showPatches: self.Grocy.UserSettings.quagga2_debug,
showFoundPatches: self.Grocy.UserSettings.quagga2_debug,
showSkeleton: self.Grocy.UserSettings.quagga2_debug,
showLabels: self.Grocy.UserSettings.quagga2_debug,
showPatchLabels: self.Grocy.UserSettings.quagga2_debug,
showRemainingPatchLabels: self.Grocy.UserSettings.quagga2_debug,
boxFromPatches: {
showTransformed: Grocy.UserSettings.quagga2_debug,
showTransformedBox: Grocy.UserSettings.quagga2_debug,
showBB: Grocy.UserSettings.quagga2_debug
showTransformed: self.Grocy.UserSettings.quagga2_debug,
showTransformedBox: self.Grocy.UserSettings.quagga2_debug,
showBB: self.Grocy.UserSettings.quagga2_debug
}
}
},

View File

@ -8,8 +8,8 @@ class batterycard
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
}
Refresh(batteryId)
@ -39,7 +39,7 @@ class batterycard
console.error(xhr);
}
);
};
}
}
export { batterycard }

View File

@ -5,8 +5,8 @@ class calendarcard
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
this.$('#calendar').datetimepicker(
{

View File

@ -8,8 +8,8 @@ class chorecard
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
}
Refresh(choreId)
@ -46,6 +46,6 @@ class chorecard
console.error(xhr);
}
);
};
}
}
export { chorecard }

View File

@ -8,8 +8,8 @@ class datetimepicker
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
this.basename = basename;
@ -202,19 +202,19 @@ class datetimepicker
if (e.keyCode === 38) // Up
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(-1, 'months').format(format));
this.SetValue(dateObj.add(-1, 'months').format(format));
}
else if (e.keyCode === 40) // Down
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(1, 'months').format(format));
this.SetValue(dateObj.add(1, 'months').format(format));
}
else if (e.keyCode === 37) // Left
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(-1, 'years').format(format));
this.SetValue(dateObj.add(-1, 'years').format(format));
}
else if (e.keyCode === 39) // Right
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(1, 'years').format(format));
this.SetValue(dateObj.add(1, 'years').format(format));
}
}
else
@ -223,19 +223,19 @@ class datetimepicker
if (e.keyCode === 38) // Up
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(-1, 'days').format(format));
this.SetValue(dateObj.add(-1, 'days').format(format));
}
else if (e.keyCode === 40) // Down
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(1, 'days').format(format));
this.SetValue(dateObj.add(1, 'days').format(format));
}
else if (e.keyCode === 37) // Left
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(-1, 'weeks').format(format));
this.SetValue(dateObj.add(-1, 'weeks').format(format));
}
else if (e.keyCode === 39) // Right
{
Grocy.Components.DateTimePicker.SetValue(dateObj.add(1, 'weeks').format(format));
this.SetValue(dateObj.add(1, 'weeks').format(format));
}
}
}

View File

@ -1,5 +1,3 @@
import { EmptyElementWhenMatches } from '../helpers/extensions'
import { RefreshContextualTimeago } from '../configs/timeago'
import { datetimepicker } from './datetimepicker'
class datetimepicker2 extends datetimepicker

View File

@ -5,8 +5,8 @@ class numberpicker
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
var self = this;
this.$(".numberpicker-down-button").unbind('click').on("click", () => self.valueDownHandler(this));
@ -14,7 +14,7 @@ class numberpicker
this.$(".numberpicker").on("keyup", function()
{
$this = $(this)
let $this = $(this)
if ($this.attr("data-not-equal") && !$this.attr("data-not-equal").toString().isEmpty() && $this.attr("data-not-equal") == $this.val())
{
$this[0].setCustomValidity("error");
@ -136,7 +136,7 @@ class numberpicker
if (max.isEmpty())
{
element.parent().find(".invalid-feedback").text(
Grocy.translate("This cannot be lower than %1$s and needs to be a valid number with max. %2$s decimal places",
this.Grocy.translate("This cannot be lower than %1$s and needs to be a valid number with max. %2$s decimal places",
parseFloat(min).toLocaleString(undefined, {
minimumFractionDigits: 0,
maximumFractionDigits: decimals
@ -146,7 +146,7 @@ class numberpicker
else
{
element.parent().find(".invalid-feedback").text(
Grocy.translate("This must between %1$s and %2$s and needs to be a valid number with max. %3$s decimal places",
this.Grocy.translate("This must between %1$s and %2$s and needs to be a valid number with max. %3$s decimal places",
parseFloat(min).toLocaleString(undefined, {
minimumFractionDigits: 0,
maximumFractionDigits: decimals

View File

@ -5,8 +5,8 @@ class productamountpicker
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
Grocy.Use("numberpicker");
this.AllowAnyQuEnabled = false;
@ -26,7 +26,7 @@ class productamountpicker
if (!this.AllowAnyQuEnabled)
{
var qu = thisGrocy.QuantityUnits.find(elem => elem.id == destinationQuId);
var qu = this.Grocy.QuantityUnits.find(elem => elem.id == destinationQuId);
this.qu_id.find("option").remove().end();
this.qu_id.attr("data-destination-qu-name", qu.name);
this.qu_id.attr("data-destination-qu-name-plural", qu.name_plural);
@ -43,7 +43,7 @@ class productamountpicker
{
this.qu_id.append('<option value="' + conversion.to_qu_id + '" data-qu-factor="' + factor + '">' + conversion.to_qu_name + '</option>');
}
};
}
}
if (!this.InitialValueSet || forceInitialDisplayQu)

View File

@ -9,8 +9,8 @@ class productcard
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
this.PriceHistoryChart = null;
var self = this;
@ -133,7 +133,7 @@ class productcard
if (productDetails.product.picture_file_name !== null && !productDetails.product.picture_file_name.isEmpty())
{
self.$("#productcard-product-picture").removeClass("d-none");
self.$("#productcard-product-picture").attr("src", Grocy.FormatUrl('/api/files/productpictures/' + btoa(productDetails.product.picture_file_name) + '?force_serve_as=picture&best_fit_width=400'));
self.$("#productcard-product-picture").attr("src", self.Grocy.FormatUrl('/api/files/productpictures/' + btoa(productDetails.product.picture_file_name) + '?force_serve_as=picture&best_fit_width=400'));
}
else
{
@ -165,7 +165,7 @@ class productcard
var chart = self.PriceHistoryChart.data;
for (let dataPoint of priceHistoryDataPoints)
{
let key = Grocy.translate("Unknown store");
let key = self.Grocy.translate("Unknown store");
if (dataPoint.shopping_location)
{
key = dataPoint.shopping_location.name

View File

@ -231,19 +231,19 @@ class productpicker extends BasePicker
'/product/new?flow=InplaceNewProductWithName' +
'&name=' + encodeURIComponent(input) +
'&returnto=' + encodeURIComponent(
Grocy.CurrentUrlRelative +
self.Grocy.CurrentUrlRelative +
"?flow=InplaceNewProductWithName" +
"&" + self.embedded) +
"&" + self.embedded);
}
},
addbarcode: {
label: '<strong>B</strong> ' + Grocy.translate('Add as barcode to existing product'),
label: '<strong>B</strong> ' + self.Grocy.translate('Add as barcode to existing product'),
className: 'btn-info add-new-barcode-dialog-button responsive-button',
callback: function()
{
self.PopupOpen = false;
window.location.href = Grocy.FormatUrl(
window.location.href = self.Grocy.FormatUrl(
self.Grocy.CurrentUrlRelative +
'?flow=InplaceAddBarcodeToExistingProduct' +
'&barcode=' + encodeURIComponent(input)
@ -251,12 +251,12 @@ class productpicker extends BasePicker
}
},
addnewproductwithbarcode: {
label: '<strong>A</strong> ' + Grocy.translate('Add as new product and prefill barcode'),
label: '<strong>A</strong> ' + self.Grocy.translate('Add as new product and prefill barcode'),
className: 'btn-warning add-new-product-with-barcode-dialog-button responsive-button ' + addProductWorkflowsAdditionalCssClasses,
callback: function()
{
self.PopupOpen = false;
window.location.href = Grocy.FormatUrl(
window.location.href = self.Grocy.FormatUrl(
'/product/new' +
'?flow=InplaceNewProductWithBarcode' +
'&barcode=' + encodeURIComponent(input) +
@ -271,7 +271,7 @@ class productpicker extends BasePicker
}
};
if (!Grocy.FeatureFlags.DISABLE_BROWSER_BARCODE_CAMERA_SCANNING)
if (!this.Grocy.FeatureFlags.DISABLE_BROWSER_BARCODE_CAMERA_SCANNING)
{
buttons.retrycamerascanning = {
label: '<strong>C</strong> <i class="fas fa-camera"></i>',

View File

@ -1,6 +1,6 @@
import { RandomString } from '../helpers/extensions';
import { LoadImagesLazy } from '../configs/lazy'
import uuid from 'uuid';
import * as uuid from 'uuid';
import { datetimepicker } from "./datetimepicker";
class userfieldsform
@ -10,8 +10,8 @@ class userfieldsform
this.Grocy = Grocy;
this.scopeSelector = scopeSelector;
this.scope = scopeSelector != null ? $(scope) : $(document);
this.$ = scopeSelector != null ? $(scope).find : $;
this.scope = scopeSelector != null ? $(scopeSelector) : $(document);
this.$ = scopeSelector != null ? $(scopeSelector).find : $;
this.$(".userfield-link").keyup();
@ -116,7 +116,7 @@ class userfieldsform
}
var self = this;
Grocy.Api.Get('userfields/' + this.$("#userfields-form").data("entity") + '/' + this.Grocy.EditObjectId,
this.Grocy.Api.Get('userfields/' + this.$("#userfields-form").data("entity") + '/' + this.Grocy.EditObjectId,
function(result)
{
$.each(result, function(key, value)

View File

@ -1,6 +1,6 @@
import { ResizeResponsiveEmbeds } from "../helpers/embeds";
import { IsTouchInputDevice } from "../helpers/input";
import { BoolVal, GetFileNameFromPath, GetUriParam } from "../helpers/extensions";
import { BoolVal, GetFileNameFromPath } from "../helpers/extensions";
// This function sets some global state and adds some global event listeners.
function setInitialGlobalState(Grocy)
@ -229,7 +229,7 @@ function setInitialGlobalState(Grocy)
{
e.preventDefault();
var link = GetUriParam("returnto");
var link = Grocy.GetUriParam("returnto");
if (!link || !link.length > 0)
{
window.location.href = $(e.currentTarget).attr("href");

View File

@ -9,7 +9,7 @@ import { WakeLock } from "./lib/WakeLock";
import { UISound } from "./lib/UISound";
import { Nightmode } from "./lib/nightmode";
import { HeaderClock } from "./helpers/clock";
import { animateCSS, BoolVal, EmptyElementWhenMatches, GetUriParam, RemoveUriParam, UpdateUriParam } from "./helpers/extensions";
import { animateCSS, BoolVal, EmptyElementWhenMatches } from "./helpers/extensions";
import Translator from "gettext-translator";
import { WindowMessageBag } from './helpers/messagebag';
import * as components from './components';
@ -143,9 +143,6 @@ class GrocyClass
setDatatableDefaults(grocy);
// add some more functions to the global space
window.GetUriParam = GetUriParam;
window.UpdateUriParam = UpdateUriParam;
window.RemoveUriParam = RemoveUriParam;
window.EmptyElementWhenMatches = EmptyElementWhenMatches;
window.animateCSS = animateCSS;

View File

@ -18,3 +18,6 @@
}
}
window.aboutView = aboutView

View File

@ -105,3 +105,6 @@
});
}
window.barcodescannertestingView = barcodescannertestingView

View File

@ -49,3 +49,6 @@
}
}
window.batteriesView = batteriesView

View File

@ -50,3 +50,6 @@
});
}
window.batteriesjournalView = batteriesjournalView

View File

@ -134,3 +134,6 @@
RefreshStatistics();
}
window.batteriesoverviewView = batteriesoverviewView

View File

@ -13,3 +13,6 @@
RefreshLocaleNumberInput();
}
window.batteriessettingsView = batteriessettingsView

View File

@ -101,3 +101,6 @@ function batteryformView(Grocy, scope = null)
Grocy.FrontendHelpers.ValidateForm('battery-form');
}
window.batteryformView = batteryformView

View File

@ -108,3 +108,6 @@
Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
});
}
window.batterytrackingView = batterytrackingView

View File

@ -105,4 +105,6 @@ function calendarView(Grocy, scope = null)
}
window.calendarView = calendarView;
window.calendarView = calendarView

View File

@ -251,3 +251,6 @@
});
}
window.choreformView = choreformView

View File

@ -48,3 +48,6 @@
}
}
window.choresView = choresView

View File

@ -50,3 +50,6 @@
});
}
window.choresjournalView = choresjournalView

View File

@ -192,3 +192,6 @@
RefreshStatistics();
}
window.choresoverviewView = choresoverviewView

View File

@ -13,3 +13,6 @@
RefreshLocaleNumberInput();
}
window.choressettingsView = choressettingsView

View File

@ -127,3 +127,6 @@
});
}
window.choretrackingView = choretrackingView

View File

@ -655,4 +655,6 @@ function consumeView(Grocy, scope = null)
}
}
window.consumeViw = consumeView;
window.consumeView = consumeView

View File

@ -101,4 +101,6 @@ function equipmentView(Grocy, scope = null)
}
window.equipmentView = equipmentView
window.equipmentView = equipmentView

View File

@ -169,3 +169,6 @@ function equipmentformView(Grocy, scope = null)
});
}
window.equipmentformView = equipmentformView

View File

@ -386,4 +386,6 @@ function inventoryView(Grocy, scope = null)
}
window.inventoryView = inventoryView
window.inventoryView = inventoryView

View File

@ -23,3 +23,6 @@
});
}
window.locationcontentsheetView = locationcontentsheetView

View File

@ -101,4 +101,6 @@ function locationformView(Grocy, scope = null)
}
window.locationformView = locationformView
window.locationformView = locationformView

View File

@ -25,3 +25,6 @@
'/locations'
);
}
window.locationsView = locationsView

View File

@ -15,3 +15,6 @@
}
}
window.loginView = loginView

View File

@ -56,4 +56,6 @@ function manageapikeysView(Grocy, scope = null)
}
window.manageapikeysView = manageapikeysView;
window.manageapikeysView = manageapikeysView

View File

@ -24,6 +24,7 @@ function mealplanView(Grocy, scope = null)
Grocy.Use("numberpicker");
var productamountpicker = Grocy.Use("productamountpicker");
var recipepicker = Grocy.Use("recipepicker");
var productpicker = Grocy.Use("productpicker");
var setLocale = false;
if (__t('fullcalendar_locale').replace(" ", "") !== "" && __t('fullcalendar_locale') != 'x')
@ -875,3 +876,6 @@ function mealplanView(Grocy, scope = null)
});
}
window.mealplanView = mealplanView

View File

@ -1,37 +1,28 @@
function openapiuiView(Grocy, scope = null)
/* global SwaggerUIBundle, SwaggerUIStandalonePreset */
function HideTopbarPlugin()
{
var $scope = $;
if (scope != null)
{
$scope = $(scope).find;
}
/* global SwaggerUIBundle, SwaggerUIStandalonePreset */
function HideTopbarPlugin()
{
return {
components: {
Topbar: function() { return null }
}
return {
components: {
Topbar: function() { return null }
}
}
const swaggerUi = SwaggerUIBundle({
url: Grocy.OpenApi.SpecUrl,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl,
HideTopbarPlugin
],
layout: 'StandaloneLayout',
docExpansion: "list"
});
window.ui = swaggerUi;
}
const swaggerUi = SwaggerUIBundle({
url: Grocy.OpenApi.SpecUrl,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl,
HideTopbarPlugin
],
layout: 'StandaloneLayout',
docExpansion: "list"
});
window.ui = swaggerUi;

View File

@ -122,4 +122,6 @@ function productbarcodeformView(Grocy, scope = null)
}
window.productbarcodeformView = productbarcodeformView
window.productbarcodeformView = productbarcodeformView

View File

@ -477,4 +477,6 @@ function productformView(Grocy, scope = null)
}
window.productformView = productformView
window.productformView = productformView

View File

@ -87,4 +87,6 @@ function productgroupformView(Grocy, scope = null)
}
window.productgroupformView = productgroupformView
window.productgroupformView = productgroupformView

View File

@ -34,3 +34,6 @@
}
});
}
window.productgroupsView = productgroupsView

View File

@ -89,3 +89,6 @@
});
}
window.productsView = productsView

View File

@ -592,4 +592,6 @@ function purchaseView(Grocy, scope = null)
}
window.purchaseView = purchaseView
window.purchaseView = purchaseView

View File

@ -222,4 +222,7 @@ function quantityunitconversionformView(Grocy, scope = null)
}
window.quantityunitconversionformView = quantityunitconversionformView

View File

@ -1,4 +1,6 @@
function quantityunitformView(Grocy, scope = null)
import { WindowMessageBag } from '../helpers/messagebag';
function quantityunitformView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
@ -6,8 +8,6 @@
$scope = $(scope).find;
}
import { WindowMessageBag } from '../helpers/messagebag';
var userfields = Grocy.Use("userfieldsform");
$scope('.save-quantityunit-button').on('click', function(e)
@ -188,3 +188,6 @@
});
}
window.quantityunitformView = quantityunitformView

View File

@ -47,3 +47,6 @@
$scope("#amount").focus();
}
window.quantityunitpluraltestingView = quantityunitpluraltestingView

View File

@ -24,3 +24,6 @@
'/quantityunits'
);
}
window.quantityunitsView = quantityunitsView

View File

@ -347,4 +347,6 @@ function recipeformView(Grocy, scope = null)
}
window.recipeformView = recipeformView
window.recipeformView = recipeformView

View File

@ -11,6 +11,7 @@ function recipeposformView(Grocy, scope = null)
Grocy.Use("numberpicker");
var productamountpicker = Grocy.Use("productamountpicker");
var productcard = Grocy.Use("productcard");
var productpicker = Grocy.Use("productpicker");
Grocy.RecipePosFormInitialLoadDone = false;
@ -179,4 +180,6 @@ function recipeposformView(Grocy, scope = null)
}
window.recipeposformView = recipeposformView
window.recipeposformView = recipeposformView

View File

@ -277,3 +277,6 @@
}
}
window.recipesView = recipesView

View File

@ -17,4 +17,6 @@ function recipessettingsView(Grocy, scope = null)
}
window.recipessettingsView = recipessettingsView
window.recipessettingsView = recipessettingsView

View File

@ -558,4 +558,6 @@ function shoppinglistView(Grocy, scope = null)
}
window.shoppinglistView = shoppinglistView
window.shoppinglistView = shoppinglistView

View File

@ -1,4 +1,6 @@
function shoppinglistformView(Grocy, scope = null)
import { WindowMessageBag } from '../helpers/messagebag';
function shoppinglistformView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
@ -6,8 +8,6 @@
$scope = $(scope).find;
}
import { WindowMessageBag } from '../helpers/messagebag';
var userfields = Grocy.Use("userfieldsform");
$scope('#save-shopping-list-button').on('click', function(e)
@ -90,3 +90,6 @@
Grocy.FrontendHelpers.ValidateForm('shopping-list-form');
}
window.shoppinglistformView = shoppinglistformView

View File

@ -10,6 +10,7 @@ function shoppinglistitemformView(Grocy, scope = null)
var productamountpicker = Grocy.Use("productamountpicker");
var userfields = Grocy.Use("userfieldsform");
var productpicker = Grocy.Use("productpicker");
Grocy.ShoppingListItemFormInitialLoadDone = false;
@ -281,4 +282,6 @@ function shoppinglistitemformView(Grocy, scope = null)
}
window.shoppinglistitemformView = shoppinglistitemformView
window.shoppinglistitemformView = shoppinglistitemformView

View File

@ -22,4 +22,6 @@ function shoppinglistsettingsView(Grocy, scope = null)
}
window.shoppinglistsettingsView = shoppinglistsettingsView
window.shoppinglistsettingsView = shoppinglistsettingsView

View File

@ -101,4 +101,6 @@ function shoppinglocationformView(Grocy, scope = null)
}
window.shoppinglocationformView = shoppinglocationformView;
window.shoppinglocationformView = shoppinglocationformView

View File

@ -25,3 +25,6 @@
'/shoppinglocations'
);
}
window.shoppinglocationsView = shoppinglocationsView

View File

@ -289,3 +289,6 @@
});
}
window.stockentriesView = stockentriesView

View File

@ -132,4 +132,6 @@ function stockentryformView(Grocy, scope = null)
}
window.stockentryformView = stockentryformView;
window.stockentryformView = stockentryformView

View File

@ -60,3 +60,6 @@
});
}
window.stockjournalView = stockjournalView

View File

@ -22,3 +22,6 @@
Grocy.FrontendHelpers.MakeFilterForColumn("#transaction-type-filter", 2, journalSummaryTable);
Grocy.FrontendHelpers.MakeFilterForColumn("#user-filter", 3, journalSummaryTable);
}
window.stockjournalsummaryView = stockjournalsummaryView

View File

@ -338,3 +338,6 @@
});
}
window.stockoverviewView = stockoverviewView

View File

@ -56,4 +56,6 @@ function stocksettingsView(Grocy, scope = null)
}
window.stocksettingsView = stocksettingsView;
window.stocksettingsView = stocksettingsView

View File

@ -25,3 +25,6 @@
'/taskcategories'
);
}
window.taskcategoriesView = taskcategoriesView

View File

@ -1,4 +1,6 @@
function taskcategoryformView(Grocy, scope = null)
import { WindowMessageBag } from '../helpers/messagebag';
function taskcategoryformView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
@ -6,7 +8,7 @@
$scope = $(scope).find;
}
import { WindowMessageBag } from '../helpers/messagebag';
var userfields = Grocy.Use("userfieldsform");
$scope('#save-task-category-button').on('click', function(e)
{
@ -98,3 +100,6 @@
Grocy.FrontendHelpers.ValidateForm('task-category-form');
}
window.taskcategoryformView = taskcategoryformView

View File

@ -1,4 +1,6 @@
function taskformView(Grocy, scope = null)
import { WindowMessageBag } from '../helpers/messagebag';
function taskformView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
@ -6,8 +8,6 @@
$scope = $(scope).find;
}
import { WindowMessageBag } from '../helpers/messagebag';
var datetimepicker = Grocy.Use("datetimepicker");
var userfields = Grocy.Use("userfieldsform");
@ -106,3 +106,6 @@
Grocy.FrontendHelpers.ValidateForm('task-form');
}
window.taskformView = taskformView

View File

@ -172,3 +172,6 @@
RefreshStatistics();
}
window.tasksView = tasksView

View File

@ -13,3 +13,6 @@
RefreshLocaleNumberInput();
}
window.taskssettingsView = taskssettingsView

View File

@ -495,4 +495,6 @@ function transferView(Grocy, scope = null)
}
window.transferView = transferView;
window.transferView = transferView

View File

@ -25,3 +25,6 @@
'/userentities'
);
}
window.userentitiesView = userentitiesView

View File

@ -114,4 +114,6 @@ function userentityformView(Grocy, scope = null)
}
window.userentityformView = userentityformView;
window.userentityformView = userentityformView

View File

@ -129,4 +129,6 @@ function userfieldformView(Grocy, scope = null)
}
window.userfieldformView = userfieldformView;
window.userfieldformView = userfieldformView

View File

@ -52,3 +52,6 @@
}
}
window.userfieldsView = userfieldsView

View File

@ -156,3 +156,6 @@
Grocy.FrontendHelpers.ValidateForm('user-form');
}
window.userformView = userformView

View File

@ -80,4 +80,6 @@ function userobjectformView(Grocy, scope = null)
}
window.userobjectformView = userobjectformView;
window.userobjectformView = userobjectformView

View File

@ -25,3 +25,6 @@
() => window.location.reload()
);
}
window.userobjectsView = userobjectsView

View File

@ -81,3 +81,6 @@
}
}
window.userpermissionsView = userpermissionsView

View File

@ -25,3 +25,6 @@
'/users'
);
}
window.usersView = usersView

View File

@ -11,3 +11,6 @@
RefreshLocaleNumberInput();
}
window.usersettingsView = usersettingsView