Fix data-backbutton logic

This commit is contained in:
Claus Vium 2019-01-20 09:07:28 +01:00
parent 791d1ea373
commit 47f5cd330f
3 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<div id="dashboardPage" data-role="page" class="page type-interior dashboardHomePage fullWidthContent"> <div id="dashboardPage" data-role="page" class="page type-interior dashboardHomePage fullWidthContent" data-backbutton="false">
<div class="content-primary"> <div class="content-primary">

View File

@ -1,4 +1,4 @@
<div id="editItemMetadataPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-title="${MetadataManager}" data-require="scripts/editorsidebar,scripts/edititemmetadata"> <div id="editItemMetadataPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-title="${MetadataManager}" data-require="scripts/editorsidebar,scripts/edititemmetadata" data-backbutton="false">
<style> <style>
#editItemMetadataPage .editMetadataForm { #editItemMetadataPage .editMetadataForm {
@ -14,4 +14,4 @@
<div class="editPageInnerContent padded-top padded-bottom-page"> <div class="editPageInnerContent padded-top padded-bottom-page">
</div> </div>
</div> </div>
</div> </div>

View File

@ -742,14 +742,12 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
} }
function updateBackButton(page) { function updateBackButton(page) {
var isDashboardPage = page.classList.contains("type-interior");
if (!headerBackButton) { if (!headerBackButton) {
headerBackButton = document.querySelector(".headerBackButton"); headerBackButton = document.querySelector(".headerBackButton");
} }
if (headerBackButton) { if (headerBackButton) {
if (page.getAttribute("data-backbutton") && appRouter.canGoBack()) { if ("false" !== page.getAttribute("data-backbutton") && appRouter.canGoBack()) {
headerBackButton.classList.remove("hide"); headerBackButton.classList.remove("hide");
} else { } else {
headerBackButton.classList.add("hide"); headerBackButton.classList.add("hide");