From 9afed0c00729f700655e3aac53d848659626e1e4 Mon Sep 17 00:00:00 2001 From: Katharina Bogad Date: Thu, 24 Jun 2021 00:11:44 +0200 Subject: [PATCH] scoping: Fix viewjs jQuery proxy --- js/viewjs/about.js | 2 +- js/viewjs/barcodescannertesting.js | 2 +- js/viewjs/batteries.js | 2 +- js/viewjs/batteriesjournal.js | 2 +- js/viewjs/batteriesoverview.js | 2 +- js/viewjs/batteriessettings.js | 2 +- js/viewjs/batteryform.js | 2 +- js/viewjs/batterytracking.js | 2 +- js/viewjs/calendar.js | 2 +- js/viewjs/choreform.js | 2 +- js/viewjs/chores.js | 2 +- js/viewjs/choresjournal.js | 2 +- js/viewjs/choresoverview.js | 2 +- js/viewjs/choressettings.js | 2 +- js/viewjs/choretracking.js | 2 +- js/viewjs/consume.js | 2 +- js/viewjs/equipment.js | 2 +- js/viewjs/equipmentform.js | 2 +- js/viewjs/inventory.js | 2 +- js/viewjs/locationcontentsheet.js | 2 +- js/viewjs/locationform.js | 2 +- js/viewjs/locations.js | 2 +- js/viewjs/login.js | 2 +- js/viewjs/manageapikeys.js | 2 +- js/viewjs/mealplan.js | 2 +- js/viewjs/productbarcodeform.js | 2 +- js/viewjs/productform.js | 2 +- js/viewjs/productgroupform.js | 2 +- js/viewjs/productgroups.js | 2 +- js/viewjs/products.js | 2 +- js/viewjs/purchase.js | 2 +- js/viewjs/quantityunitconversionform.js | 2 +- js/viewjs/quantityunitform.js | 2 +- js/viewjs/quantityunitpluraltesting.js | 2 +- js/viewjs/quantityunits.js | 2 +- js/viewjs/recipeform.js | 2 +- js/viewjs/recipeposform.js | 2 +- js/viewjs/recipes.js | 2 +- js/viewjs/recipessettings.js | 2 +- js/viewjs/shoppinglist.js | 2 +- js/viewjs/shoppinglistform.js | 2 +- js/viewjs/shoppinglistitemform.js | 2 +- js/viewjs/shoppinglistsettings.js | 2 +- js/viewjs/shoppinglocationform.js | 2 +- js/viewjs/shoppinglocations.js | 2 +- js/viewjs/stockentries.js | 2 +- js/viewjs/stockentryform.js | 2 +- js/viewjs/stockjournal.js | 2 +- js/viewjs/stockjournalsummary.js | 2 +- js/viewjs/stockoverview.js | 2 +- js/viewjs/stocksettings.js | 2 +- js/viewjs/taskcategories.js | 2 +- js/viewjs/taskcategoryform.js | 2 +- js/viewjs/taskform.js | 2 +- js/viewjs/tasks.js | 2 +- js/viewjs/taskssettings.js | 2 +- js/viewjs/transfer.js | 2 +- js/viewjs/userentities.js | 2 +- js/viewjs/userentityform.js | 2 +- js/viewjs/userfieldform.js | 2 +- js/viewjs/userfields.js | 2 +- js/viewjs/userform.js | 2 +- js/viewjs/userobjectform.js | 2 +- js/viewjs/userobjects.js | 2 +- js/viewjs/userpermissions.js | 2 +- js/viewjs/users.js | 2 +- js/viewjs/usersettings.js | 2 +- 67 files changed, 67 insertions(+), 67 deletions(-) diff --git a/js/viewjs/about.js b/js/viewjs/about.js index 09414bb2..ec11b0c8 100644 --- a/js/viewjs/about.js +++ b/js/viewjs/about.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } $scope('[data-toggle="collapse-next"]').on("click", function(e) diff --git a/js/viewjs/barcodescannertesting.js b/js/viewjs/barcodescannertesting.js index 94e78c44..10b5ef98 100644 --- a/js/viewjs/barcodescannertesting.js +++ b/js/viewjs/barcodescannertesting.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("barcodescanner"); diff --git a/js/viewjs/batteries.js b/js/viewjs/batteries.js index d27a0bf9..5c99e0ed 100644 --- a/js/viewjs/batteries.js +++ b/js/viewjs/batteries.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var batteriesTable = $scope('#batteries-table').DataTable({ diff --git a/js/viewjs/batteriesjournal.js b/js/viewjs/batteriesjournal.js index 049415b7..0548f436 100644 --- a/js/viewjs/batteriesjournal.js +++ b/js/viewjs/batteriesjournal.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var batteriesJournalTable = $scope('#batteries-journal-table').DataTable({ diff --git a/js/viewjs/batteriesoverview.js b/js/viewjs/batteriesoverview.js index 2d29ed7d..59b59eba 100644 --- a/js/viewjs/batteriesoverview.js +++ b/js/viewjs/batteriesoverview.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var batterycard = Grocy.Use("batterycard"); diff --git a/js/viewjs/batteriessettings.js b/js/viewjs/batteriessettings.js index 65541c3d..6c49d146 100644 --- a/js/viewjs/batteriessettings.js +++ b/js/viewjs/batteriessettings.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/batteryform.js b/js/viewjs/batteryform.js index 897c7a9d..c2247291 100644 --- a/js/viewjs/batteryform.js +++ b/js/viewjs/batteryform.js @@ -5,7 +5,7 @@ function batteryformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/batterytracking.js b/js/viewjs/batterytracking.js index 1dce797c..f7d4e245 100644 --- a/js/viewjs/batterytracking.js +++ b/js/viewjs/batterytracking.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var batterycard = Grocy.Use("batterycard"); diff --git a/js/viewjs/calendar.js b/js/viewjs/calendar.js index 3d8f8c73..f941364c 100644 --- a/js/viewjs/calendar.js +++ b/js/viewjs/calendar.js @@ -21,7 +21,7 @@ function calendarView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); $viewport = $(scope); } diff --git a/js/viewjs/choreform.js b/js/viewjs/choreform.js index 0ba5bb10..37b8da7f 100644 --- a/js/viewjs/choreform.js +++ b/js/viewjs/choreform.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/chores.js b/js/viewjs/chores.js index ffac1e32..15809503 100644 --- a/js/viewjs/chores.js +++ b/js/viewjs/chores.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var choresTable = $scope('#chores-table').DataTable({ diff --git a/js/viewjs/choresjournal.js b/js/viewjs/choresjournal.js index 6f262cbc..0e6202e8 100644 --- a/js/viewjs/choresjournal.js +++ b/js/viewjs/choresjournal.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var choresJournalTable = $scope('#chores-journal-table').DataTable({ diff --git a/js/viewjs/choresoverview.js b/js/viewjs/choresoverview.js index 26fc0f24..ae821435 100644 --- a/js/viewjs/choresoverview.js +++ b/js/viewjs/choresoverview.js @@ -5,7 +5,7 @@ if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var chorecard = Grocy.Use("chorecard"); diff --git a/js/viewjs/choressettings.js b/js/viewjs/choressettings.js index 3975a7b0..efe6621c 100644 --- a/js/viewjs/choressettings.js +++ b/js/viewjs/choressettings.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/choretracking.js b/js/viewjs/choretracking.js index f9965132..b52143d9 100644 --- a/js/viewjs/choretracking.js +++ b/js/viewjs/choretracking.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var chorecard = Grocy.Use("chorecard"); diff --git a/js/viewjs/consume.js b/js/viewjs/consume.js index ae23c54e..287e59fc 100644 --- a/js/viewjs/consume.js +++ b/js/viewjs/consume.js @@ -8,7 +8,7 @@ function consumeView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productamountpicker = Grocy.Use("productamountpicker"); diff --git a/js/viewjs/equipment.js b/js/viewjs/equipment.js index da7012aa..2651d31b 100644 --- a/js/viewjs/equipment.js +++ b/js/viewjs/equipment.js @@ -5,7 +5,7 @@ function equipmentView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var equipmentTable = $scope('#equipment-table').DataTable({ diff --git a/js/viewjs/equipmentform.js b/js/viewjs/equipmentform.js index 5189d5c5..c18791dd 100644 --- a/js/viewjs/equipmentform.js +++ b/js/viewjs/equipmentform.js @@ -6,7 +6,7 @@ function equipmentformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/inventory.js b/js/viewjs/inventory.js index 27faf2ab..22b3934d 100644 --- a/js/viewjs/inventory.js +++ b/js/viewjs/inventory.js @@ -5,7 +5,7 @@ function inventoryView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var dt1 = Grocy.Use("datetimepicker"); diff --git a/js/viewjs/locationcontentsheet.js b/js/viewjs/locationcontentsheet.js index 608afb13..3029fcf4 100644 --- a/js/viewjs/locationcontentsheet.js +++ b/js/viewjs/locationcontentsheet.js @@ -4,7 +4,7 @@ var top = scope != null ? $(scope) : $(document); if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } top.on("click", ".print-all-locations-button", function(e) diff --git a/js/viewjs/locationform.js b/js/viewjs/locationform.js index 2c06e0d6..21fff94f 100644 --- a/js/viewjs/locationform.js +++ b/js/viewjs/locationform.js @@ -5,7 +5,7 @@ function locationformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/locations.js b/js/viewjs/locations.js index 2239b71c..fb48d790 100644 --- a/js/viewjs/locations.js +++ b/js/viewjs/locations.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var locationsTable = $scope('#locations-table').DataTable({ diff --git a/js/viewjs/login.js b/js/viewjs/login.js index 87706ebf..e9abd8fa 100644 --- a/js/viewjs/login.js +++ b/js/viewjs/login.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } $scope('#username').focus(); diff --git a/js/viewjs/manageapikeys.js b/js/viewjs/manageapikeys.js index 578152b7..afc02d5f 100644 --- a/js/viewjs/manageapikeys.js +++ b/js/viewjs/manageapikeys.js @@ -5,7 +5,7 @@ function manageapikeysView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var apiKeysTable = $scope('#apikeys-table').DataTable({ diff --git a/js/viewjs/mealplan.js b/js/viewjs/mealplan.js index 48019764..0e975d29 100644 --- a/js/viewjs/mealplan.js +++ b/js/viewjs/mealplan.js @@ -18,7 +18,7 @@ function mealplanView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/productbarcodeform.js b/js/viewjs/productbarcodeform.js index 46c3441f..e598d84f 100644 --- a/js/viewjs/productbarcodeform.js +++ b/js/viewjs/productbarcodeform.js @@ -7,7 +7,7 @@ function productbarcodeformView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use('barcodescanner'); diff --git a/js/viewjs/productform.js b/js/viewjs/productform.js index 867d66d9..7cecef37 100644 --- a/js/viewjs/productform.js +++ b/js/viewjs/productform.js @@ -7,7 +7,7 @@ function productformView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/productgroupform.js b/js/viewjs/productgroupform.js index 8b7e8945..32718edc 100644 --- a/js/viewjs/productgroupform.js +++ b/js/viewjs/productgroupform.js @@ -5,7 +5,7 @@ function productgroupformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/productgroups.js b/js/viewjs/productgroups.js index 7b0e4462..b618cc3e 100644 --- a/js/viewjs/productgroups.js +++ b/js/viewjs/productgroups.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var groupsTable = $scope('#productgroups-table').DataTable({ diff --git a/js/viewjs/products.js b/js/viewjs/products.js index 04300147..a1ba3a4c 100644 --- a/js/viewjs/products.js +++ b/js/viewjs/products.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productsTable = $scope('#products-table').DataTable({ diff --git a/js/viewjs/purchase.js b/js/viewjs/purchase.js index 3c3c75f5..54d24b4d 100644 --- a/js/viewjs/purchase.js +++ b/js/viewjs/purchase.js @@ -6,7 +6,7 @@ function purchaseView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var datetimepicker = Grocy.Use("datetimepicker"); diff --git a/js/viewjs/quantityunitconversionform.js b/js/viewjs/quantityunitconversionform.js index 5000a9ad..db895586 100644 --- a/js/viewjs/quantityunitconversionform.js +++ b/js/viewjs/quantityunitconversionform.js @@ -5,7 +5,7 @@ function quantityunitconversionformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/quantityunitform.js b/js/viewjs/quantityunitform.js index 87a99204..7db364ca 100644 --- a/js/viewjs/quantityunitform.js +++ b/js/viewjs/quantityunitform.js @@ -5,7 +5,7 @@ function quantityunitformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/quantityunitpluraltesting.js b/js/viewjs/quantityunitpluraltesting.js index d919fc88..0fea8ab1 100644 --- a/js/viewjs/quantityunitpluraltesting.js +++ b/js/viewjs/quantityunitpluraltesting.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/quantityunits.js b/js/viewjs/quantityunits.js index 6674a8d4..4774e607 100644 --- a/js/viewjs/quantityunits.js +++ b/js/viewjs/quantityunits.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var quantityUnitsTable = $scope('#quantityunits-table').DataTable({ diff --git a/js/viewjs/recipeform.js b/js/viewjs/recipeform.js index 57349125..eff9ac1b 100644 --- a/js/viewjs/recipeform.js +++ b/js/viewjs/recipeform.js @@ -6,7 +6,7 @@ function recipeformView(Grocy, scope = null) var top = scope != null ? $(scope) : $(document); if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/recipeposform.js b/js/viewjs/recipeposform.js index c34cbd9e..91d05fcc 100644 --- a/js/viewjs/recipeposform.js +++ b/js/viewjs/recipeposform.js @@ -5,7 +5,7 @@ function recipeposformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/recipes.js b/js/viewjs/recipes.js index 1111f554..8ed2517f 100644 --- a/js/viewjs/recipes.js +++ b/js/viewjs/recipes.js @@ -5,7 +5,7 @@ var top = scope != null ? $(scope) : $(document) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/recipessettings.js b/js/viewjs/recipessettings.js index 092e6977..226b3127 100644 --- a/js/viewjs/recipessettings.js +++ b/js/viewjs/recipessettings.js @@ -5,7 +5,7 @@ function recipessettingsView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } if (BoolVal(Grocy.UserSettings.recipe_ingredients_group_by_product_group)) diff --git a/js/viewjs/shoppinglist.js b/js/viewjs/shoppinglist.js index a39b7b73..866f43b2 100644 --- a/js/viewjs/shoppinglist.js +++ b/js/viewjs/shoppinglist.js @@ -12,7 +12,7 @@ function shoppinglistView(Grocy, scope = null) if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("calendarcard"); diff --git a/js/viewjs/shoppinglistform.js b/js/viewjs/shoppinglistform.js index 978062e8..c95d22f2 100644 --- a/js/viewjs/shoppinglistform.js +++ b/js/viewjs/shoppinglistform.js @@ -5,7 +5,7 @@ function shoppinglistformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/shoppinglistitemform.js b/js/viewjs/shoppinglistitemform.js index 94d29afa..cc4638ee 100644 --- a/js/viewjs/shoppinglistitemform.js +++ b/js/viewjs/shoppinglistitemform.js @@ -5,7 +5,7 @@ function shoppinglistitemformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productamountpicker = Grocy.Use("productamountpicker"); diff --git a/js/viewjs/shoppinglistsettings.js b/js/viewjs/shoppinglistsettings.js index f1c65921..ef6e9d19 100644 --- a/js/viewjs/shoppinglistsettings.js +++ b/js/viewjs/shoppinglistsettings.js @@ -5,7 +5,7 @@ function shoppinglistsettingsView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } if (BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled)) diff --git a/js/viewjs/shoppinglocationform.js b/js/viewjs/shoppinglocationform.js index be9ec779..89a3fa9d 100644 --- a/js/viewjs/shoppinglocationform.js +++ b/js/viewjs/shoppinglocationform.js @@ -5,7 +5,7 @@ function shoppinglocationformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/shoppinglocations.js b/js/viewjs/shoppinglocations.js index a4cab1fc..7b866aeb 100644 --- a/js/viewjs/shoppinglocations.js +++ b/js/viewjs/shoppinglocations.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var locationsTable = $scope('#shoppinglocations-table').DataTable({ diff --git a/js/viewjs/stockentries.js b/js/viewjs/stockentries.js index dae325b0..667fb77c 100644 --- a/js/viewjs/stockentries.js +++ b/js/viewjs/stockentries.js @@ -5,7 +5,7 @@ if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productcard = Grocy.Use("productcard"); diff --git a/js/viewjs/stockentryform.js b/js/viewjs/stockentryform.js index eb0f1946..5e654742 100644 --- a/js/viewjs/stockentryform.js +++ b/js/viewjs/stockentryform.js @@ -5,7 +5,7 @@ function stockentryformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var datetimepicker = Grocy.Use("datetimepicker"); diff --git a/js/viewjs/stockjournal.js b/js/viewjs/stockjournal.js index 7564b663..c08b3a30 100644 --- a/js/viewjs/stockjournal.js +++ b/js/viewjs/stockjournal.js @@ -4,7 +4,7 @@ var top = scope != null ? $(scope) : $(document); if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var stockJournalTable = $scope('#stock-journal-table').DataTable({ diff --git a/js/viewjs/stockjournalsummary.js b/js/viewjs/stockjournalsummary.js index 319d2f0d..2626ea3f 100644 --- a/js/viewjs/stockjournalsummary.js +++ b/js/viewjs/stockjournalsummary.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var journalSummaryTable = $scope('#stock-journal-summary-table').DataTable({ diff --git a/js/viewjs/stockoverview.js b/js/viewjs/stockoverview.js index 43f0d31d..0d036db1 100755 --- a/js/viewjs/stockoverview.js +++ b/js/viewjs/stockoverview.js @@ -4,7 +4,7 @@ var top = scope != null ? $(scope) : $(document); if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productcard = Grocy.Use("productcard"); diff --git a/js/viewjs/stocksettings.js b/js/viewjs/stocksettings.js index 57956120..fee1ee00 100644 --- a/js/viewjs/stocksettings.js +++ b/js/viewjs/stocksettings.js @@ -5,7 +5,7 @@ function stocksettingsView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } diff --git a/js/viewjs/taskcategories.js b/js/viewjs/taskcategories.js index 6ab7b856..f45af240 100644 --- a/js/viewjs/taskcategories.js +++ b/js/viewjs/taskcategories.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var categoriesTable = $scope('#taskcategories-table').DataTable({ diff --git a/js/viewjs/taskcategoryform.js b/js/viewjs/taskcategoryform.js index 1e4ff1e5..45739bf1 100644 --- a/js/viewjs/taskcategoryform.js +++ b/js/viewjs/taskcategoryform.js @@ -5,7 +5,7 @@ function taskcategoryformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/taskform.js b/js/viewjs/taskform.js index 1b3a6de8..07d0a41a 100644 --- a/js/viewjs/taskform.js +++ b/js/viewjs/taskform.js @@ -5,7 +5,7 @@ function taskformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var datetimepicker = Grocy.Use("datetimepicker"); diff --git a/js/viewjs/tasks.js b/js/viewjs/tasks.js index 207c4d90..9c13597d 100644 --- a/js/viewjs/tasks.js +++ b/js/viewjs/tasks.js @@ -5,7 +5,7 @@ if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var tasksTable = $scope('#tasks-table').DataTable({ diff --git a/js/viewjs/taskssettings.js b/js/viewjs/taskssettings.js index fffb15b7..e7fb65e9 100644 --- a/js/viewjs/taskssettings.js +++ b/js/viewjs/taskssettings.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/transfer.js b/js/viewjs/transfer.js index 36fd11e4..4c1ba3f2 100644 --- a/js/viewjs/transfer.js +++ b/js/viewjs/transfer.js @@ -5,7 +5,7 @@ function transferView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var productpicker = Grocy.Use("productpicker"); diff --git a/js/viewjs/userentities.js b/js/viewjs/userentities.js index 1bda7428..8920222b 100644 --- a/js/viewjs/userentities.js +++ b/js/viewjs/userentities.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userentitiesTable = $scope('#userentities-table').DataTable({ diff --git a/js/viewjs/userentityform.js b/js/viewjs/userentityform.js index f98bf1a5..3047958b 100644 --- a/js/viewjs/userentityform.js +++ b/js/viewjs/userentityform.js @@ -5,7 +5,7 @@ function userentityformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } $scope('#save-userentity-button').on('click', function(e) diff --git a/js/viewjs/userfieldform.js b/js/viewjs/userfieldform.js index dec9119a..a14bb7d0 100644 --- a/js/viewjs/userfieldform.js +++ b/js/viewjs/userfieldform.js @@ -5,7 +5,7 @@ function userfieldformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } Grocy.Use("numberpicker"); diff --git a/js/viewjs/userfields.js b/js/viewjs/userfields.js index 67ecde6c..bd944152 100644 --- a/js/viewjs/userfields.js +++ b/js/viewjs/userfields.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfieldsTable = $scope('#userfields-table').DataTable({ diff --git a/js/viewjs/userform.js b/js/viewjs/userform.js index ec8dfea1..d42b804e 100644 --- a/js/viewjs/userform.js +++ b/js/viewjs/userform.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/userobjectform.js b/js/viewjs/userobjectform.js index aea1d624..383fe0c1 100644 --- a/js/viewjs/userobjectform.js +++ b/js/viewjs/userobjectform.js @@ -5,7 +5,7 @@ function userobjectformView(Grocy, scope = null) var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userfields = Grocy.Use("userfieldsform"); diff --git a/js/viewjs/userobjects.js b/js/viewjs/userobjects.js index e0aa19c3..f4d6f65b 100644 --- a/js/viewjs/userobjects.js +++ b/js/viewjs/userobjects.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var userobjectsTable = $scope('#userobjects-table').DataTable({ diff --git a/js/viewjs/userpermissions.js b/js/viewjs/userpermissions.js index aa3b6c3b..20975ade 100644 --- a/js/viewjs/userpermissions.js +++ b/js/viewjs/userpermissions.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } $scope('input.permission-cb').click( diff --git a/js/viewjs/users.js b/js/viewjs/users.js index 0447025b..36426856 100644 --- a/js/viewjs/users.js +++ b/js/viewjs/users.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } var usersTable = $scope('#users-table').DataTable({ diff --git a/js/viewjs/usersettings.js b/js/viewjs/usersettings.js index a93cc6c1..0425b78d 100644 --- a/js/viewjs/usersettings.js +++ b/js/viewjs/usersettings.js @@ -3,7 +3,7 @@ var $scope = $; if (scope != null) { - $scope = $(scope).find; + $scope = (scope) => $(scope).find(scope); } $scope("#locale").val(Grocy.UserSettings.locale);