Finalize recipes feature

This commit is contained in:
Bernd Bestel
2018-07-15 09:56:10 +02:00
parent be650d093d
commit ea0f5101ec
9 changed files with 108 additions and 38 deletions

View File

@@ -49,6 +49,15 @@ a.discrete-link:focus {
font-size: 95%;
}
.fullscreen {
z-index: 9999;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
}
/* Navigation style customizations */
#mainNav {
background-color: #e5e5e5 !important;

View File

@@ -120,3 +120,10 @@ $(document).on('click', '.recipe-pos-order-missing-button', function(e)
}
);
});
$(document).on('click', '.recipe-pos-show-note-button', function(e)
{
var note = $(e.currentTarget).attr('data-recipe-pos-note');
bootbox.alert(note);
});

View File

@@ -11,6 +11,12 @@
'select': 'single'
});
var rowSelect = GetUriParam("row");
if (typeof rowSelect !== "undefined")
{
recipesTables.row(rowSelect).select();
}
$("#search").on("keyup", function()
{
var value = $(this).val();
@@ -93,3 +99,17 @@ $(document).on('click', '.recipe-order-missing-button', function(e)
}
});
});
recipesTables.on('select', function(e, dt, type, indexes)
{
if (type === 'row')
{
var selectedRecipeId = $(recipesTables.row(indexes[0]).node()).data("recipe-id");
window.location.href = U('/recipes?recipe=' + selectedRecipeId.toString() + "&row=" + indexes[0].toString());
}
});
$("#selectedRecipeToggleFullscreenButton").on('click', function(e)
{
$("#selectedRecipeCard").toggleClass("fullscreen");
});