Merge pull request #45 from cvium/fix_data_backbutton

Fix data-backbutton logic
This commit is contained in:
Andrew Rabert 2019-01-20 20:34:13 -05:00 committed by GitHub
commit 16e46d065c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 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

@ -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

@ -735,14 +735,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");