mirror of
https://github.com/grocy/grocy.git
synced 2026-04-09 14:06:16 +02:00
viewjs: Wrap in fuctions
This commit's contents were auto-generated. They wrap all viewjs
in functions and define a common prologue.
New file contents:
```js
function VIEWNAMEView(Grocy, scope = null)
{
var $scope = $;
if(scope != null)
{
$scope = $(scope).find;
}
// original contents indented with \t
}
```
This commit is contained in:
parent
151722ea38
commit
fd61d1ef62
|
|
@ -1,4 +1,12 @@
|
||||||
$('[data-toggle="collapse-next"]').on("click", function(e)
|
function aboutView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('[data-toggle="collapse-next"]').on("click", function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).parent().next().collapse("toggle");
|
$(this).parent().next().collapse("toggle");
|
||||||
|
|
@ -8,3 +16,5 @@ if ((typeof GetUriParam("tab") !== "undefined" && GetUriParam("tab") === "change
|
||||||
{
|
{
|
||||||
$(".nav-tabs a[href='#changelog']").tab("show");
|
$(".nav-tabs a[href='#changelog']").tab("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("barcodescanner");
|
function barcodescannertestingView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("barcodescanner");
|
||||||
Grocy.BarCodeScannerTestingHitCount = 0;
|
Grocy.BarCodeScannerTestingHitCount = 0;
|
||||||
Grocy.BarCodeScannerTestingMissCount = 0;
|
Grocy.BarCodeScannerTestingMissCount = 0;
|
||||||
|
|
||||||
|
|
@ -95,3 +103,5 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||||
|
|
||||||
OnBarcodeScanned(barcode);
|
OnBarcodeScanned(barcode);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var batteriesTable = $('#batteries-table').DataTable({
|
function batteriesView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var batteriesTable = $('#batteries-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -39,3 +47,5 @@ if (GetUriParam('include_disabled'))
|
||||||
{
|
{
|
||||||
$("#show-disabled").prop('checked', true);
|
$("#show-disabled").prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var batteriesJournalTable = $('#batteries-journal-table').DataTable({
|
function batteriesjournalView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var batteriesJournalTable = $('#batteries-journal-table').DataTable({
|
||||||
'paginate': true,
|
'paginate': true,
|
||||||
'order': [[2, 'desc']],
|
'order': [[2, 'desc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
|
|
@ -38,3 +46,5 @@ $(document).on('click', '.undo-battery-execution-button', function(e)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("batterycard");
|
function batteriesoverviewView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("batterycard");
|
||||||
|
|
||||||
var batteriesOverviewTable = $('#batteries-overview-table').DataTable({
|
var batteriesOverviewTable = $('#batteries-overview-table').DataTable({
|
||||||
'order': [[4, 'asc']],
|
'order': [[4, 'asc']],
|
||||||
|
|
@ -120,3 +128,5 @@ function RefreshStatistics()
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshStatistics();
|
RefreshStatistics();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
Grocy.Use("numberpicker");
|
function batteriessettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
$("#batteries_due_soon_days").val(Grocy.UserSettings.batteries_due_soon_days);
|
$("#batteries_due_soon_days").val(Grocy.UserSettings.batteries_due_soon_days);
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function batteryformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
@ -91,3 +99,5 @@ $('#battery-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('battery-form');
|
Grocy.FrontendHelpers.ValidateForm('battery-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("batterycard");
|
function batterytrackingView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("batterycard");
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
|
|
||||||
$('#save-batterytracking-button').on('click', function(e)
|
$('#save-batterytracking-button').on('click', function(e)
|
||||||
|
|
@ -101,3 +109,5 @@ $('#tracked_time').find('input').on('keypress', function(e)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
/* global fullcalendarEventSources */
|
function calendarView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* global fullcalendarEventSources */
|
||||||
|
|
||||||
import { Calendar } from '@fullcalendar/core';
|
import { Calendar } from '@fullcalendar/core';
|
||||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||||
|
|
@ -90,3 +98,5 @@ $(window).one("resize", function()
|
||||||
calendar.changeView("dayGridMonth");
|
calendar.changeView("dayGridMonth");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("numberpicker");
|
function choreformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
$('#save-chore-button').on('click', function(e)
|
$('#save-chore-button').on('click', function(e)
|
||||||
|
|
@ -240,3 +248,5 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var choresTable = $('#chores-table').DataTable({
|
function choresView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var choresTable = $('#chores-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -38,3 +46,5 @@ if (GetUriParam('include_disabled'))
|
||||||
{
|
{
|
||||||
$("#show-disabled").prop('checked', true);
|
$("#show-disabled").prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var choresJournalTable = $('#chores-journal-table').DataTable({
|
function choresjournalView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var choresJournalTable = $('#chores-journal-table').DataTable({
|
||||||
'paginate': true,
|
'paginate': true,
|
||||||
'order': [[2, 'desc']],
|
'order': [[2, 'desc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
|
|
@ -38,3 +46,5 @@ $(document).on('click', '.undo-chore-execution-button', function(e)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("chorecard");
|
function choresoverviewView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("chorecard");
|
||||||
|
|
||||||
var choresOverviewTable = $('#chores-overview-table').DataTable({
|
var choresOverviewTable = $('#chores-overview-table').DataTable({
|
||||||
'order': [[2, 'asc']],
|
'order': [[2, 'asc']],
|
||||||
|
|
@ -180,3 +188,5 @@ if (GetUriParam("user") !== undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshStatistics();
|
RefreshStatistics();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
Grocy.Use("numberpicker");
|
function choressettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
$("#chores_due_soon_days").val(Grocy.UserSettings.chores_due_soon_days);
|
$("#chores_due_soon_days").val(Grocy.UserSettings.chores_due_soon_days);
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("chorecard");
|
function choretrackingView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("chorecard");
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
Grocy.Use("userpicker");
|
Grocy.Use("userpicker");
|
||||||
|
|
||||||
|
|
@ -117,3 +125,5 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keypress', function(e)
|
||||||
{
|
{
|
||||||
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function consumeView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("productamountpicker");
|
Grocy.Use("productamountpicker");
|
||||||
|
|
@ -641,3 +649,4 @@ function RefreshForm()
|
||||||
|
|
||||||
Grocy.FrontendHelpers.ValidateForm("consume-form");
|
Grocy.FrontendHelpers.ValidateForm("consume-form");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { ResizeResponsiveEmbeds } from "../helpers/embeds";
|
function equipmentView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { ResizeResponsiveEmbeds } from "../helpers/embeds";
|
||||||
|
|
||||||
var equipmentTable = $('#equipment-table').DataTable({
|
var equipmentTable = $('#equipment-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
|
|
@ -90,3 +98,5 @@ $("#selectedEquipmentDescriptionToggleFullscreenButton").on('click', function(e)
|
||||||
$("#selectedEquipmentDescriptionCard .card-body").toggleClass("mt-5");
|
$("#selectedEquipmentDescriptionCard .card-body").toggleClass("mt-5");
|
||||||
$("body").toggleClass("fullscreen-card");
|
$("body").toggleClass("fullscreen-card");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { RandomString } from '../helpers/extensions';
|
function equipmentformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { RandomString } from '../helpers/extensions';
|
||||||
import { ResizeResponsiveEmbeds } from '../helpers/embeds';
|
import { ResizeResponsiveEmbeds } from '../helpers/embeds';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
@ -159,3 +167,5 @@ $("#instruction-manual").on("change", function(e)
|
||||||
$("#current-instruction-manuale").addClass("d-none");
|
$("#current-instruction-manuale").addClass("d-none");
|
||||||
Grocy.DeleteProductPictureOnSave = false;
|
Grocy.DeleteProductPictureOnSave = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function inventoryView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
if (Grocy.UserSettings.show_purchased_date_on_purchase)
|
if (Grocy.UserSettings.show_purchased_date_on_purchase)
|
||||||
|
|
@ -374,3 +382,5 @@ $('#display_amount').on('keyup', function(e)
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#display_amount").attr("min", "0");
|
$("#display_amount").attr("min", "0");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
$(document).on("click", ".print-all-locations-button", function(e)
|
function locationcontentsheetView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on("click", ".print-all-locations-button", function(e)
|
||||||
{
|
{
|
||||||
$(".page").removeClass("d-print-none").removeClass("no-page-break");
|
$(".page").removeClass("d-print-none").removeClass("no-page-break");
|
||||||
$(".print-timestamp").text(moment().format("l LT"));
|
$(".print-timestamp").text(moment().format("l LT"));
|
||||||
|
|
@ -12,3 +20,5 @@ $(document).on("click", ".print-single-location-button", function(e)
|
||||||
$(".print-timestamp").text(moment().format("l LT"));
|
$(".print-timestamp").text(moment().format("l LT"));
|
||||||
window.print();
|
window.print();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function locationformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -90,3 +98,5 @@ $('#location-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
Grocy.FrontendHelpers.ValidateForm('location-form');
|
Grocy.FrontendHelpers.ValidateForm('location-form');
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var locationsTable = $('#locations-table').DataTable({
|
function locationsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var locationsTable = $('#locations-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/locations/',
|
'objects/locations/',
|
||||||
'/locations'
|
'/locations'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,17 @@
|
||||||
$('#username').focus();
|
function loginView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#username').focus();
|
||||||
|
|
||||||
if (GetUriParam('invalid') === 'true')
|
if (GetUriParam('invalid') === 'true')
|
||||||
{
|
{
|
||||||
$('#login-error').text(__t('Invalid credentials, please try again'));
|
$('#login-error').text(__t('Invalid credentials, please try again'));
|
||||||
$('#login-error').removeClass('d-none');
|
$('#login-error').removeClass('d-none');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { QrCodeImgHtml } from "../helpers/qrcode";
|
function manageapikeysView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { QrCodeImgHtml } from "../helpers/qrcode";
|
||||||
|
|
||||||
var apiKeysTable = $('#apikeys-table').DataTable({
|
var apiKeysTable = $('#apikeys-table').DataTable({
|
||||||
'order': [[4, 'desc']],
|
'order': [[4, 'desc']],
|
||||||
|
|
@ -45,3 +53,5 @@ $('.apikey-show-qr-button').on('click', function()
|
||||||
closeButton: false
|
closeButton: false
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
/* global fullcalendarEventSources, internalRecipes, recipesResolved */
|
function mealplanView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* global fullcalendarEventSources, internalRecipes, recipesResolved */
|
||||||
|
|
||||||
import { Calendar } from '@fullcalendar/core';
|
import { Calendar } from '@fullcalendar/core';
|
||||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||||
|
|
@ -862,3 +870,5 @@ Grocy.Components.RecipePicker.GetPicker().on('change', function(e)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
/* global SwaggerUIBundle, SwaggerUIStandalonePreset */
|
function openapiuiView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* global SwaggerUIBundle, SwaggerUIStandalonePreset */
|
||||||
function HideTopbarPlugin()
|
function HideTopbarPlugin()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
|
@ -25,3 +33,5 @@ const swaggerUi = SwaggerUIBundle({
|
||||||
});
|
});
|
||||||
|
|
||||||
window.ui = swaggerUi;
|
window.ui = swaggerUi;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function productbarcodeformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use('barcodescanner');
|
Grocy.Use('barcodescanner');
|
||||||
Grocy.Use("productamountpicker");
|
Grocy.Use("productamountpicker");
|
||||||
|
|
@ -109,3 +117,5 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||||
|
|
||||||
$("#barcode").val(barcode);
|
$("#barcode").val(barcode);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function productformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("shoppinglocationpicker");
|
Grocy.Use("shoppinglocationpicker");
|
||||||
|
|
@ -511,3 +519,5 @@ else if (Grocy.EditMode === 'create')
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.FrontendHelpers.ValidateForm("product-form");
|
Grocy.FrontendHelpers.ValidateForm("product-form");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function productgroupformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -76,3 +84,5 @@ $('#product-group-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('product-group-form');
|
Grocy.FrontendHelpers.ValidateForm('product-group-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var groupsTable = $('#productgroups-table').DataTable({
|
function productgroupsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var groupsTable = $('#productgroups-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -25,3 +33,5 @@ $(window).on("message", function(e)
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var productsTable = $('#products-table').DataTable({
|
function productsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var productsTable = $('#products-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -79,3 +87,5 @@ $("#merge-products-save-button").on("click", function()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function purchaseView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
|
|
@ -580,3 +588,5 @@ $('#qu_id').on('change', function(e)
|
||||||
priceTypeUnitPriceLabel.text($("#qu_id option:selected").text() + " " + __t("price"));
|
priceTypeUnitPriceLabel.text($("#qu_id option:selected").text() + " " + __t("price"));
|
||||||
refreshPriceHint();
|
refreshPriceHint();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function quantityunitconversionformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
@ -211,3 +219,5 @@ if (GetUriParam("qu-unit") !== undefined)
|
||||||
{
|
{
|
||||||
$("#from_qu_id").attr("disabled", "");
|
$("#from_qu_id").attr("disabled", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function quantityunitformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -177,3 +185,5 @@ $("#test-quantityunit-plural-forms-button").on("click", function(e)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("numberpicker");
|
function quantityunitpluraltestingView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
$("#qu_id").change(function(event)
|
$("#qu_id").change(function(event)
|
||||||
{
|
{
|
||||||
|
|
@ -37,3 +45,5 @@ if (GetUriParam("qu") !== undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#amount").focus();
|
$("#amount").focus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var quantityUnitsTable = $('#quantityunits-table').DataTable({
|
function quantityunitsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var quantityUnitsTable = $('#quantityunits-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -15,3 +23,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/quantity_units/',
|
'objects/quantity_units/',
|
||||||
'/quantityunits'
|
'/quantityunits'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function recipeformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("recipepicker");
|
Grocy.Use("recipepicker");
|
||||||
|
|
@ -334,3 +342,5 @@ $(window).on("message", function(e)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function recipeposformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
Grocy.Use("productamountpicker");
|
Grocy.Use("productamountpicker");
|
||||||
|
|
@ -168,3 +176,5 @@ if ($("#only_check_single_unit_in_stock").prop("checked"))
|
||||||
{
|
{
|
||||||
Grocy.Components.ProductAmountPicker.AllowAnyQu(true);
|
Grocy.Components.ProductAmountPicker.AllowAnyQu(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("numberpicker");
|
function recipesView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
var recipesTables = $('#recipes-table').DataTable({
|
var recipesTables = $('#recipes-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
|
|
@ -265,3 +273,5 @@ if (window.location.hash === "#fullscreen")
|
||||||
{
|
{
|
||||||
$("#selectedRecipeToggleFullscreenButton").click();
|
$("#selectedRecipeToggleFullscreenButton").click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function recipessettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
|
|
||||||
if (BoolVal(Grocy.UserSettings.recipe_ingredients_group_by_product_group))
|
if (BoolVal(Grocy.UserSettings.recipe_ingredients_group_by_product_group))
|
||||||
{
|
{
|
||||||
|
|
@ -6,3 +14,5 @@ if (BoolVal(Grocy.UserSettings.recipe_ingredients_group_by_product_group))
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
function shoppinglistView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
// this needs to be explicitly imported for some reason,
|
// this needs to be explicitly imported for some reason,
|
||||||
// otherwise rollup complains.
|
// otherwise rollup complains.
|
||||||
import bwipjs from '../../node_modules/bwip-js/dist/bwip-js.mjs';
|
import bwipjs from '../../node_modules/bwip-js/dist/bwip-js.mjs';
|
||||||
|
|
@ -543,3 +551,5 @@ if ($(window).width() < 768 || !Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
||||||
{
|
{
|
||||||
$("#filter-container").removeClass("border-bottom");
|
$("#filter-container").removeClass("border-bottom");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function shoppinglistformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -80,3 +88,5 @@ $('#shopping-list-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('shopping-list-form');
|
Grocy.FrontendHelpers.ValidateForm('shopping-list-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function shoppinglistitemformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("productamountpicker");
|
Grocy.Use("productamountpicker");
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
@ -269,3 +277,5 @@ if (GetUriParam("product-name") != null)
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function shoppinglistsettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
|
|
||||||
if (BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled))
|
if (BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled))
|
||||||
{
|
{
|
||||||
|
|
@ -11,3 +19,5 @@ if (BoolVal(Grocy.UserSettings.shopping_list_show_calendar))
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function shoppinglocationformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -90,3 +98,5 @@ $('#shoppinglocation-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form');
|
Grocy.FrontendHelpers.ValidateForm('shoppinglocation-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
function shoppinglocationsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
var locationsTable = $('#shoppinglocations-table').DataTable({
|
var locationsTable = $('#shoppinglocations-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/shopping_locations/',
|
'objects/shopping_locations/',
|
||||||
'/shoppinglocations'
|
'/shoppinglocations'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("productcard");
|
function stockentriesView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("productcard");
|
||||||
Grocy.Use("productpicker");
|
Grocy.Use("productpicker");
|
||||||
|
|
||||||
var stockEntriesTable = $('#stockentries-table').DataTable({
|
var stockEntriesTable = $('#stockentries-table').DataTable({
|
||||||
|
|
@ -274,3 +282,5 @@ $(document).on("click", ".product-name-cell", function(e)
|
||||||
Grocy.Components.ProductCard.Refresh($(e.currentTarget).attr("data-product-id"));
|
Grocy.Components.ProductCard.Refresh($(e.currentTarget).attr("data-product-id"));
|
||||||
$("#productcard-modal").modal("show");
|
$("#productcard-modal").modal("show");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function stockentryformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
Grocy.Use("datetimepicker2");
|
Grocy.Use("datetimepicker2");
|
||||||
|
|
@ -121,3 +129,5 @@ $("#amount").on("focus", function(e)
|
||||||
});
|
});
|
||||||
$("#amount").focus();
|
$("#amount").focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm("stockentry-form");
|
Grocy.FrontendHelpers.ValidateForm("stockentry-form");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var stockJournalTable = $('#stock-journal-table').DataTable({
|
function stockjournalView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var stockJournalTable = $('#stock-journal-table').DataTable({
|
||||||
'paginate': true,
|
'paginate': true,
|
||||||
'order': [[3, 'desc']],
|
'order': [[3, 'desc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
|
|
@ -49,3 +57,5 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
function stockjournalsummaryView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
var journalSummaryTable = $('#stock-journal-summary-table').DataTable({
|
var journalSummaryTable = $('#stock-journal-summary-table').DataTable({
|
||||||
'paginate': true,
|
'paginate': true,
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
|
|
@ -13,3 +21,4 @@ Grocy.FrontendHelpers.InitDataTable(journalSummaryTable);
|
||||||
Grocy.FrontendHelpers.MakeFilterForColumn("#product-filter", 1, journalSummaryTable);
|
Grocy.FrontendHelpers.MakeFilterForColumn("#product-filter", 1, journalSummaryTable);
|
||||||
Grocy.FrontendHelpers.MakeFilterForColumn("#transaction-type-filter", 2, journalSummaryTable);
|
Grocy.FrontendHelpers.MakeFilterForColumn("#transaction-type-filter", 2, journalSummaryTable);
|
||||||
Grocy.FrontendHelpers.MakeFilterForColumn("#user-filter", 3, journalSummaryTable);
|
Grocy.FrontendHelpers.MakeFilterForColumn("#user-filter", 3, journalSummaryTable);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("productcard");
|
function stockoverviewView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("productcard");
|
||||||
|
|
||||||
var stockOverviewTable = $('#stock-overview-table').DataTable({
|
var stockOverviewTable = $('#stock-overview-table').DataTable({
|
||||||
'order': [[5, 'asc']],
|
'order': [[5, 'asc']],
|
||||||
|
|
@ -327,3 +335,5 @@ $(window).on("message", function(e)
|
||||||
RefreshStatistics();
|
RefreshStatistics();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { BoolVal } from '../helpers/extensions';
|
function stocksettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { BoolVal } from '../helpers/extensions';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
|
|
@ -44,3 +52,5 @@ $("#stock_default_consume_amount_use_quick_consume_amount").on("click", function
|
||||||
$("#stock_default_consume_amount").removeAttr("disabled");
|
$("#stock_default_consume_amount").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var categoriesTable = $('#taskcategories-table').DataTable({
|
function taskcategoriesView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var categoriesTable = $('#taskcategories-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/task_categories/',
|
'objects/task_categories/',
|
||||||
'/taskcategories'
|
'/taskcategories'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function taskcategoryformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
$('#save-task-category-button').on('click', function(e)
|
$('#save-task-category-button').on('click', function(e)
|
||||||
{
|
{
|
||||||
|
|
@ -88,3 +96,5 @@ $('#task-category-form input').keydown(function(event)
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('task-category-form');
|
Grocy.FrontendHelpers.ValidateForm('task-category-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function taskformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("datetimepicker");
|
Grocy.Use("datetimepicker");
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
@ -96,3 +104,5 @@ Grocy.Components.UserfieldsForm.Load();
|
||||||
$('#name').focus();
|
$('#name').focus();
|
||||||
Grocy.Components.DateTimePicker.GetInputElement().trigger('input');
|
Grocy.Components.DateTimePicker.GetInputElement().trigger('input');
|
||||||
Grocy.FrontendHelpers.ValidateForm('task-form');
|
Grocy.FrontendHelpers.ValidateForm('task-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("userpicker");
|
function tasksView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("userpicker");
|
||||||
|
|
||||||
var tasksTable = $('#tasks-table').DataTable({
|
var tasksTable = $('#tasks-table').DataTable({
|
||||||
'order': [[2, 'asc']],
|
'order': [[2, 'asc']],
|
||||||
|
|
@ -159,3 +167,5 @@ function RefreshStatistics()
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshStatistics();
|
RefreshStatistics();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
Grocy.Use("numberpicker");
|
function taskssettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
$("#tasks_due_soon_days").val(Grocy.UserSettings.tasks_due_soon_days);
|
$("#tasks_due_soon_days").val(Grocy.UserSettings.tasks_due_soon_days);
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function transferView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("productpicker");
|
Grocy.Use("productpicker");
|
||||||
Grocy.Use("productamountpicker");
|
Grocy.Use("productamountpicker");
|
||||||
|
|
@ -483,3 +491,5 @@ if (GetUriParam("embedded") !== undefined)
|
||||||
|
|
||||||
// Default input field
|
// Default input field
|
||||||
Grocy.Components.ProductPicker.GetInputElement().focus();
|
Grocy.Components.ProductPicker.GetInputElement().focus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var userentitiesTable = $('#userentities-table').DataTable({
|
function userentitiesView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userentitiesTable = $('#userentities-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/userentities/',
|
'objects/userentities/',
|
||||||
'/userentities'
|
'/userentities'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function userentityformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
$('#save-userentity-button').on('click', function(e)
|
$('#save-userentity-button').on('click', function(e)
|
||||||
{
|
{
|
||||||
|
|
@ -103,3 +111,5 @@ Grocy.FrontendHelpers.ValidateForm('userentity-form');
|
||||||
// Click twice to trigger on-click but not change the actual checked state
|
// Click twice to trigger on-click but not change the actual checked state
|
||||||
$("#show_in_sidebar_menu").click();
|
$("#show_in_sidebar_menu").click();
|
||||||
$("#show_in_sidebar_menu").click();
|
$("#show_in_sidebar_menu").click();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function userfieldformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("numberpicker");
|
Grocy.Use("numberpicker");
|
||||||
|
|
||||||
|
|
@ -118,3 +126,5 @@ if (typeof GetUriParam("entity") !== "undefined" && !GetUriParam("entity").isEmp
|
||||||
|
|
||||||
$("#type").trigger("change");
|
$("#type").trigger("change");
|
||||||
Grocy.FrontendHelpers.ValidateForm('userfield-form');
|
Grocy.FrontendHelpers.ValidateForm('userfield-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var userfieldsTable = $('#userfields-table').DataTable({
|
function userfieldsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userfieldsTable = $('#userfields-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -42,3 +50,5 @@ if (GetUriParam("entity") != undefined && !GetUriParam("entity").isEmpty())
|
||||||
$("#entity-filter").trigger("change");
|
$("#entity-filter").trigger("change");
|
||||||
$("#name").focus();
|
$("#name").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
Grocy.Use("userfieldsform");
|
function userformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
function SaveUserPicture(result, jsonData)
|
function SaveUserPicture(result, jsonData)
|
||||||
{
|
{
|
||||||
|
|
@ -146,3 +154,5 @@ $("#delete-current-user-picture-button").on("click", function(e)
|
||||||
|
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
Grocy.FrontendHelpers.ValidateForm('user-form');
|
Grocy.FrontendHelpers.ValidateForm('user-form');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
import { WindowMessageBag } from '../helpers/messagebag';
|
function userobjectformView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
import { WindowMessageBag } from '../helpers/messagebag';
|
||||||
|
|
||||||
Grocy.Use("userfieldsform");
|
Grocy.Use("userfieldsform");
|
||||||
|
|
||||||
|
|
@ -69,3 +77,5 @@ $('#save-userobject-button').on('click', function(e)
|
||||||
|
|
||||||
Grocy.Components.UserfieldsForm.Load();
|
Grocy.Components.UserfieldsForm.Load();
|
||||||
$("#userfields-form").removeClass("border").removeClass("border-info").removeClass("p-2").find("h2").addClass("d-none");
|
$("#userfields-form").removeClass("border").removeClass("border-info").removeClass("p-2").find("h2").addClass("d-none");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var userobjectsTable = $('#userobjects-table').DataTable({
|
function userobjectsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userobjectsTable = $('#userobjects-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'objects/userobjects/',
|
'objects/userobjects/',
|
||||||
() => window.location.reload()
|
() => window.location.reload()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,11 @@
|
||||||
|
function userpermissionsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
$('input.permission-cb').click(
|
$('input.permission-cb').click(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
|
|
@ -71,3 +79,5 @@ if (Grocy.EditObjectId == Grocy.UserId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
var usersTable = $('#users-table').DataTable({
|
function usersView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
|
var usersTable = $('#users-table').DataTable({
|
||||||
'order': [[1, 'asc']],
|
'order': [[1, 'asc']],
|
||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
|
|
@ -16,3 +24,4 @@ Grocy.FrontendHelpers.MakeDeleteConfirmBox(
|
||||||
'users/',
|
'users/',
|
||||||
'/users'
|
'/users'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
||||||
|
function usersettingsView(Grocy, scope = null)
|
||||||
|
{
|
||||||
|
var $scope = $;
|
||||||
|
if (scope != null)
|
||||||
|
{
|
||||||
|
$scope = $(scope).find;
|
||||||
|
}
|
||||||
|
|
||||||
$("#locale").val(Grocy.UserSettings.locale);
|
$("#locale").val(Grocy.UserSettings.locale);
|
||||||
|
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user