mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Applied formatting rules for by #1000 changed files
This commit is contained in:
@@ -670,13 +670,15 @@ $(Grocy.UserPermissions).each(function(index, item)
|
||||
$('.permission-' + item.permission_name).addClass('disabled').addClass('not-allowed');
|
||||
}
|
||||
});
|
||||
$('a.link-return').not(".btn").each(function () {
|
||||
var base = $(this).data('href');
|
||||
if(base.contains('?'))
|
||||
$('a.link-return').not(".btn").each(function()
|
||||
{
|
||||
var base = $(this).data('href');
|
||||
if (base.contains('?'))
|
||||
{
|
||||
$(this).attr('href', base + '&returnto' + encodeURIComponent(location.pathname));
|
||||
}
|
||||
else{
|
||||
else
|
||||
{
|
||||
$(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) {
|
||||
if($(e.target).is('div.form-check') || $(e.target).is('div.dropdown-item'))
|
||||
$('.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'))
|
||||
{
|
||||
$(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.GetInputElement().val(value);
|
||||
Grocy.Components.DateTimePicker2.GetInputElement().trigger('change');
|
||||
|
||||
// "Click" the shortcut checkbox when the desired value is
|
||||
// not the shortcut value and it is currently set
|
||||
var shortcutValue = $("#datetimepicker2-shortcut").data("datetimepicker2-shortcut-value");
|
||||
@@ -23,6 +20,9 @@ Grocy.Components.DateTimePicker2.SetValue = function(value)
|
||||
$("#datetimepicker2-shortcut").click();
|
||||
}
|
||||
|
||||
Grocy.Components.DateTimePicker2.GetInputElement().val(value);
|
||||
Grocy.Components.DateTimePicker2.GetInputElement().trigger('change');
|
||||
|
||||
Grocy.Components.DateTimePicker2.GetInputElement().keyup();
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,8 @@
|
||||
{
|
||||
jsonData.best_before_date = Grocy.Components.DateTimePicker.GetValue();
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
jsonData.best_before_date = null;
|
||||
}
|
||||
|
||||
@@ -106,7 +107,7 @@
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user