grocy/js/viewjs/locationcontentsheet.js
Katharina Bogad fd61d1ef62 viewjs: Wrap in fuctions
This commit's contents were auto-generated. They wrap all viewjs
in functions and define a common prologue.

New file contents:

```js
function VIEWNAMEView(Grocy, scope = null)
{
    var $scope = $;
    if(scope != null)
    {
        $scope = $(scope).find;
    }

    // original contents indented with \t

}
```
2021-06-22 22:56:57 +02:00

25 lines
639 B
JavaScript

function locationcontentsheetView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
{
$scope = $(scope).find;
}
$(document).on("click", ".print-all-locations-button", function(e)
{
$(".page").removeClass("d-print-none").removeClass("no-page-break");
$(".print-timestamp").text(moment().format("l LT"));
window.print();
});
$(document).on("click", ".print-single-location-button", function(e)
{
$(".page").addClass("d-print-none");
$(e.currentTarget).closest(".page").removeClass("d-print-none").addClass("no-page-break");
$(".print-timestamp").text(moment().format("l LT"));
window.print();
});
}