aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSawyer Bergeron <sawyerbergeron@gmail.com>2018-12-04 14:01:41 -0500
committerSawyer Bergeron <sawyerbergeron@gmail.com>2018-12-04 14:03:13 -0500
commit218abb53583cb2d1a3359e06013e31b0302f59c6 (patch)
treea3fd54c7bf76672e36dd09cf86f22189de2f4dff
parentb361d6df77ab59bb0f227aec00c19b080f31bc50 (diff)
Add Nav Button Disabling Behavior
Change-Id: I81bb064d83e1dc6df8658cd4cfa2a400c7e723ca Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
-rw-r--r--src/templates/workflow/viewport-base.html27
1 files changed, 27 insertions, 0 deletions
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){