From 218abb53583cb2d1a3359e06013e31b0302f59c6 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Tue, 4 Dec 2018 14:01:41 -0500 Subject: Add Nav Button Disabling Behavior Change-Id: I81bb064d83e1dc6df8658cd4cfa2a400c7e723ca Signed-off-by: Sawyer Bergeron --- src/templates/workflow/viewport-base.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/templates') diff --git a/src/templates/workflow/viewport-base.html b/src/templates/workflow/viewport-base.html index fd9b638..37eff27 100644 --- a/src/templates/workflow/viewport-base.html +++ b/src/templates/workflow/viewport-base.html @@ -14,6 +14,9 @@ height: calc(100% - 170px); } + .go_btn_disabled{ + background-color: #ffffff; + } .go_forward{ right: 0px; border-left: none; @@ -208,6 +211,30 @@ function update_breadcrumbs(meta_json) { step = meta_json['active']; page_count = meta_json['steps'].length; + if( step == 0 ) + { + var btn = document.getElementById("gob"); + btn.classList.add("go_btn_disabled"); + btn.disabled = true; + } + else + { + var btn = document.getElementById("gob"); + btn.classList.remove("go_btn_disabled"); + btn.disabled = false; + } + if( step == page_count - 1 ) + { + var btn = document.getElementById("gof"); + btn.classList.add("go_btn_disabled"); + btn.disabled = true; + } + else + { + var btn = document.getElementById("gof"); + btn.classList.remove("go_btn_disabled"); + btn.disabled = false; + } //remove all children of breadcrumbs so we can redraw var container = document.getElementById("breadcrumbs"); while(container.firstChild){ -- cgit 1.2.3-korg