mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Applied formatting rules for by #1000 changed files
This commit is contained in:
parent
64c050fc0d
commit
4b5b7bcb19
@ -64,7 +64,7 @@ class GenericEntityApiController extends BaseApiController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $this->GenericErrorResponse($response, "Invalid entity");
|
return $this->GenericErrorResponse($response, 'Invalid entity');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,13 +670,15 @@ $(Grocy.UserPermissions).each(function(index, item)
|
|||||||
$('.permission-' + item.permission_name).addClass('disabled').addClass('not-allowed');
|
$('.permission-' + item.permission_name).addClass('disabled').addClass('not-allowed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('a.link-return').not(".btn").each(function () {
|
$('a.link-return').not(".btn").each(function()
|
||||||
var base = $(this).data('href');
|
{
|
||||||
if(base.contains('?'))
|
var base = $(this).data('href');
|
||||||
|
if (base.contains('?'))
|
||||||
{
|
{
|
||||||
$(this).attr('href', base + '&returnto' + encodeURIComponent(location.pathname));
|
$(this).attr('href', base + '&returnto' + encodeURIComponent(location.pathname));
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
$(this).attr('href', base + '?returnto=' + encodeURIComponent(location.pathname));
|
$(this).attr('href', base + '?returnto=' + encodeURIComponent(location.pathname));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,8 +699,9 @@ $(document).on("click", "a.btn.link-return", function(e)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.dropdown-item').has('.form-check input[type=checkbox]').on('click', function (e) {
|
$('.dropdown-item').has('.form-check input[type=checkbox]').on('click', function(e)
|
||||||
if($(e.target).is('div.form-check') || $(e.target).is('div.dropdown-item'))
|
{
|
||||||
|
if ($(e.target).is('div.form-check') || $(e.target).is('div.dropdown-item'))
|
||||||
{
|
{
|
||||||
$(e.target).find('input[type=checkbox]').click();
|
$(e.target).find('input[type=checkbox]').click();
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,6 @@ Grocy.Components.DateTimePicker2.GetValue = function()
|
|||||||
|
|
||||||
Grocy.Components.DateTimePicker2.SetValue = function(value)
|
Grocy.Components.DateTimePicker2.SetValue = function(value)
|
||||||
{
|
{
|
||||||
Grocy.Components.DateTimePicker2.GetInputElement().val(value);
|
|
||||||
Grocy.Components.DateTimePicker2.GetInputElement().trigger('change');
|
|
||||||
|
|
||||||
// "Click" the shortcut checkbox when the desired value is
|
// "Click" the shortcut checkbox when the desired value is
|
||||||
// not the shortcut value and it is currently set
|
// not the shortcut value and it is currently set
|
||||||
var shortcutValue = $("#datetimepicker2-shortcut").data("datetimepicker2-shortcut-value");
|
var shortcutValue = $("#datetimepicker2-shortcut").data("datetimepicker2-shortcut-value");
|
||||||
@ -23,6 +20,9 @@ Grocy.Components.DateTimePicker2.SetValue = function(value)
|
|||||||
$("#datetimepicker2-shortcut").click();
|
$("#datetimepicker2-shortcut").click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Grocy.Components.DateTimePicker2.GetInputElement().val(value);
|
||||||
|
Grocy.Components.DateTimePicker2.GetInputElement().trigger('change');
|
||||||
|
|
||||||
Grocy.Components.DateTimePicker2.GetInputElement().keyup();
|
Grocy.Components.DateTimePicker2.GetInputElement().keyup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
{
|
{
|
||||||
jsonData.best_before_date = Grocy.Components.DateTimePicker.GetValue();
|
jsonData.best_before_date = Grocy.Components.DateTimePicker.GetValue();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
jsonData.best_before_date = null;
|
jsonData.best_before_date = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +107,7 @@
|
|||||||
{
|
{
|
||||||
Grocy.Components.LocationPicker.Clear();
|
Grocy.Components.LocationPicker.Clear();
|
||||||
}
|
}
|
||||||
if(Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
{
|
{
|
||||||
Grocy.Components.DateTimePicker.Clear();
|
Grocy.Components.DateTimePicker.Clear();
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,6 @@ class CalendarService extends BaseService
|
|||||||
$mealPlanDayNotes = $this->getDatabase()->meal_plan()->where('type', 'note');
|
$mealPlanDayNotes = $this->getDatabase()->meal_plan()->where('type', 'note');
|
||||||
$titlePrefix = $this->getLocalizationService()->__t('Meal plan note') . ': ';
|
$titlePrefix = $this->getLocalizationService()->__t('Meal plan note') . ': ';
|
||||||
|
|
||||||
|
|
||||||
foreach ($mealPlanDayNotes as $mealPlanDayNote)
|
foreach ($mealPlanDayNotes as $mealPlanDayNote)
|
||||||
{
|
{
|
||||||
$mealPlanNotesEvents[] = [
|
$mealPlanNotesEvents[] = [
|
||||||
@ -137,7 +136,6 @@ class CalendarService extends BaseService
|
|||||||
$mealPlanDayProducts = $this->getDatabase()->meal_plan()->where('type', 'product');
|
$mealPlanDayProducts = $this->getDatabase()->meal_plan()->where('type', 'product');
|
||||||
$titlePrefix = $this->getLocalizationService()->__t('Meal plan product') . ': ';
|
$titlePrefix = $this->getLocalizationService()->__t('Meal plan product') . ': ';
|
||||||
|
|
||||||
|
|
||||||
foreach ($mealPlanDayProducts as $mealPlanDayProduct)
|
foreach ($mealPlanDayProducts as $mealPlanDayProduct)
|
||||||
{
|
{
|
||||||
$mealPlanProductEvents[] = [
|
$mealPlanProductEvents[] = [
|
||||||
|
@ -35,11 +35,11 @@
|
|||||||
data-target="@productpicker">
|
data-target="@productpicker">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
@foreach($products as $product)
|
@foreach($products as $product)
|
||||||
@php $bc = null;
|
@php $bc = null;
|
||||||
if(isset($barcodes)) {
|
if(isset($barcodes)) {
|
||||||
$bc = FindObjectInArrayByPropertyValue($barcodes, 'product_id', $product->id);
|
$bc = FindObjectInArrayByPropertyValue($barcodes, 'product_id', $product->id);
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<option data-additional-searchdata="@if(isset($bc)){{ $bc->barcodes }}@endif,"
|
<option data-additional-searchdata="@if(isset($bc)){{ $bc->barcodes }}@endif,"
|
||||||
value="{{ $product->id }}">{{ $product->name }}</option>
|
value="{{ $product->id }}">{{ $product->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
data-next-input-selector="{{ $nextInputSelector }}"
|
data-next-input-selector="{{ $nextInputSelector }}"
|
||||||
data-prefill-by-name="{{ $prefillByName }}"
|
data-prefill-by-name="{{ $prefillByName }}"
|
||||||
data-prefill-by-id="{{ $prefillById }}">
|
data-prefill-by-id="{{ $prefillById }}">
|
||||||
<label for="shopping_location_id">{{ $__t($label) }} <span @if(!empty($hintId))id="{{ $hintId }}" @endif
|
<label for="shopping_location_id">{{ $__t($label) }} <span @if(!empty($hintId))id="{{ $hintId }}"
|
||||||
|
@endif
|
||||||
class="small text-muted">{{ $hint }}</span></label>
|
class="small text-muted">{{ $hint }}</span></label>
|
||||||
<select class="form-control shopping-location-combobox"
|
<select class="form-control shopping-location-combobox"
|
||||||
id="shopping_location_id"
|
id="shopping_location_id"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user