Various small UI refinements

This commit is contained in:
Bernd Bestel 2019-09-26 13:14:24 +02:00
parent 45d3c25b21
commit a2b6d9ae39
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 20 additions and 6 deletions

View File

@ -131,4 +131,5 @@ $("#selectedEquipmentDescriptionToggleFullscreenButton").on('click', function(e)
$("#selectedEquipmentDescriptionCard").toggleClass("fullscreen"); $("#selectedEquipmentDescriptionCard").toggleClass("fullscreen");
$("#selectedEquipmentDescriptionCard .card-header").toggleClass("fixed-top"); $("#selectedEquipmentDescriptionCard .card-header").toggleClass("fixed-top");
$("#selectedEquipmentDescriptionCard .card-body").toggleClass("mt-5"); $("#selectedEquipmentDescriptionCard .card-body").toggleClass("mt-5");
$("body").toggleClass("fullscreen-card");
}); });

View File

@ -116,6 +116,7 @@ var calendar = $("#calendar").fullCalendar({
{ {
RefreshLocaleNumberDisplay(); RefreshLocaleNumberDisplay();
LoadImagesLazy(); LoadImagesLazy();
$('[data-toggle="tooltip"]').tooltip();
if (GetUriParam("week") !== undefined) if (GetUriParam("week") !== undefined)
{ {
@ -213,6 +214,10 @@ $(document).on("keyodwn", "#servings", function(e)
$(document).on('click', '.recipe-order-missing-button', 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 objectName = $(e.currentTarget).attr('data-recipe-name');
var objectId = $(e.currentTarget).attr('data-recipe-id'); var objectId = $(e.currentTarget).attr('data-recipe-id');
var button = $(this); var button = $(this);
@ -262,6 +267,10 @@ $(document).on('click', '.recipe-order-missing-button', function(e)
$(document).on('click', '.recipe-consume-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 objectName = $(e.currentTarget).attr('data-recipe-name');
var objectId = $(e.currentTarget).attr('data-recipe-id'); 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) $(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'); var objectId = $(e.currentTarget).attr('data-recipe-id');
bootbox.dialog({ bootbox.dialog({

View File

@ -61,10 +61,10 @@
<div id="selectedEquipmentInstructionManualCard" class="card"> <div id="selectedEquipmentInstructionManualCard" class="card">
<div class="card-header"> <div class="card-header">
<i class="fas fa-toolbox"></i> <span class="selected-equipment-name"></span>&nbsp;&nbsp; <i class="fas fa-toolbox"></i> <span class="selected-equipment-name"></span>&nbsp;&nbsp;
<a class="btn btn-sm btn-outline-info py-0 equipment-edit-button" href="#"> <a class="btn btn-sm btn-outline-info py-0 equipment-edit-button hide-on-fullscreen-card" href="#">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
</a> </a>
<a class="btn btn-sm btn-outline-danger py-0 equipment-delete-button" href="#" data-equipment-id="{{ $equipmentItem->id }}" data-equipment-name="{{ $equipmentItem->name }}"> <a class="btn btn-sm btn-outline-danger py-0 equipment-delete-button hide-on-fullscreen-card" href="#" data-equipment-id="{{ $equipmentItem->id }}" data-equipment-name="{{ $equipmentItem->name }}">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
</a> </a>
<a id="selectedEquipmentInstructionManualToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $__t('Expand to fullscreen') }}"> <a id="selectedEquipmentInstructionManualToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $__t('Expand to fullscreen') }}">
@ -72,7 +72,7 @@
</a> </a>
</div> </div>
<div class="card-body py-0 px-0"> <div class="card-body py-0 px-0">
<p id="selected-equipment-has-no-instruction-manual-hint" class="text-muted font-italic d-none">{{ $__t('The selected equipment has no instruction manual') }}</p> <p id="selected-equipment-has-no-instruction-manual-hint" class="text-muted font-italic d-none pt-3 pl-3">{{ $__t('The selected equipment has no instruction manual') }}</p>
<embed id="selected-equipment-instruction-manual" class="embed-responsive embed-responsive-4by3" src="" type="application/pdf"> <embed id="selected-equipment-instruction-manual" class="embed-responsive embed-responsive-4by3" src="" type="application/pdf">
</div> </div>
</div> </div>
@ -81,10 +81,10 @@
<div id="selectedEquipmentDescriptionCard" class="card"> <div id="selectedEquipmentDescriptionCard" class="card">
<div class="card-header"> <div class="card-header">
<i class="fas fa-toolbox"></i> <span class="selected-equipment-name"></span>&nbsp;&nbsp; <i class="fas fa-toolbox"></i> <span class="selected-equipment-name"></span>&nbsp;&nbsp;
<a class="btn btn-sm btn-outline-info py-0 equipment-edit-button" href="#"> <a class="btn btn-sm btn-outline-info py-0 equipment-edit-button hide-on-fullscreen-card" href="#">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
</a> </a>
<a class="btn btn-sm btn-outline-danger py-0 equipment-delete-button" href="#" data-equipment-id="{{ $equipmentItem->id }}" data-equipment-name="{{ $equipmentItem->name }}"> <a class="btn btn-sm btn-outline-danger py-0 equipment-delete-button hide-on-fullscreen-card" href="#" data-equipment-id="{{ $equipmentItem->id }}" data-equipment-name="{{ $equipmentItem->name }}">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
</a> </a>
<a id="selectedEquipmentDescriptionToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $__t('Expand to fullscreen') }}"> <a id="selectedEquipmentDescriptionToggleFullscreenButton" class="btn btn-sm btn-outline-secondary py-0 float-right" href="#" data-toggle="tooltip" title="{{ $__t('Expand to fullscreen') }}">

View File

@ -179,7 +179,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group mb-1">
<div class="form-check"> <div class="form-check">
<input type="hidden" name="enable_tare_weight_handling" value="0"> <input type="hidden" name="enable_tare_weight_handling" value="0">
<input @if($mode == 'edit' && $product->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"> <input @if($mode == 'edit' && $product->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">