grocy/js/viewjs/about.js
Katharina Bogad 2a7fbbecf8 Fix bugs
2021-06-24 22:18:19 +02:00

24 lines
477 B
JavaScript

function aboutView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
{
$scope = (selector) => $(scope).find(selector);
}
$scope('[data-toggle="collapse-next"]').on("click", function(e)
{
e.preventDefault();
$(this).parent().next().collapse("toggle");
});
if ((typeof Grocy.GetUriParam("tab") !== "undefined" && Grocy.GetUriParam("tab") === "changelog"))
{
$scope(".nav-tabs a[href='#changelog']").tab("show");
}
}
window.aboutView = aboutView