From a2b6d9ae39d616387fc2b966d0196e19241e9f1d Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Thu, 26 Sep 2019 13:14:24 +0200 Subject: [PATCH] Various small UI refinements --- public/viewjs/equipment.js | 1 + public/viewjs/mealplan.js | 13 +++++++++++++ views/equipment.blade.php | 10 +++++----- views/productform.blade.php | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/public/viewjs/equipment.js b/public/viewjs/equipment.js index 7d376510..f9198cf9 100644 --- a/public/viewjs/equipment.js +++ b/public/viewjs/equipment.js @@ -131,4 +131,5 @@ $("#selectedEquipmentDescriptionToggleFullscreenButton").on('click', function(e) $("#selectedEquipmentDescriptionCard").toggleClass("fullscreen"); $("#selectedEquipmentDescriptionCard .card-header").toggleClass("fixed-top"); $("#selectedEquipmentDescriptionCard .card-body").toggleClass("mt-5"); + $("body").toggleClass("fullscreen-card"); }); diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 240d502c..09210559 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -116,6 +116,7 @@ var calendar = $("#calendar").fullCalendar({ { RefreshLocaleNumberDisplay(); LoadImagesLazy(); + $('[data-toggle="tooltip"]').tooltip(); if (GetUriParam("week") !== undefined) { @@ -213,6 +214,10 @@ $(document).on("keyodwn", "#servings", function(e) $(document).on('click', '.recipe-order-missing-button', function(e) { + // Remove the focus from the current button + // to prevent that the tooltip stays until clicked anywhere else + document.activeElement.blur(); + var objectName = $(e.currentTarget).attr('data-recipe-name'); var objectId = $(e.currentTarget).attr('data-recipe-id'); var button = $(this); @@ -262,6 +267,10 @@ $(document).on('click', '.recipe-order-missing-button', function(e) $(document).on('click', '.recipe-consume-button', function(e) { + // Remove the focus from the current button + // to prevent that the tooltip stays until clicked anywhere else + document.activeElement.blur(); + var objectName = $(e.currentTarget).attr('data-recipe-name'); var objectId = $(e.currentTarget).attr('data-recipe-id'); @@ -304,6 +313,10 @@ $(document).on('click', '.recipe-consume-button', function(e) $(document).on("click", ".recipe-popup-button", function(e) { + // Remove the focus from the current button + // to prevent that the tooltip stays until clicked anywhere else + document.activeElement.blur(); + var objectId = $(e.currentTarget).attr('data-recipe-id'); bootbox.dialog({ diff --git a/views/equipment.blade.php b/views/equipment.blade.php index 4667288b..cca752f8 100644 --- a/views/equipment.blade.php +++ b/views/equipment.blade.php @@ -61,10 +61,10 @@
-

{{ $__t('The selected equipment has no instruction manual') }}

+

{{ $__t('The selected equipment has no instruction manual') }}

@@ -81,10 +81,10 @@
-
+
enable_tare_weight_handling == 1) checked @endif class="form-check-input" type="checkbox" id="enable_tare_weight_handling" name="enable_tare_weight_handling" value="1">