From 4368d8a7379ddb2620a326ebae63cdb209370462 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 27 May 2016 21:35:35 +0100 Subject: [PATCH] Start to implement a UI finite state machine Using it should help abstract out UI state changes and avoid situations where operations leave the UI in a muddled state. It also provides a foundation to help make operations transactional. --- src/gui/html/index.html | 1 + src/gui/html/js/events.js | 47 +---- src/gui/html/js/state.js | 125 +++++++++++++ src/tests/gui/html/js/test.html | 3 + src/tests/gui/html/js/test_state.js | 271 ++++++++++++++++++++++++++++ 5 files changed, 405 insertions(+), 42 deletions(-) create mode 100644 src/gui/html/js/state.js create mode 100644 src/tests/gui/html/js/test_state.js diff --git a/src/gui/html/index.html b/src/gui/html/index.html index d4cac4e0..e8e010cd 100644 --- a/src/gui/html/index.html +++ b/src/gui/html/index.html @@ -463,6 +463,7 @@ + + + +