From d1521c9e9f43c3a7f94c91ef55054049b8579a4f Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Fri, 8 May 2020 13:50:58 -0500 Subject: [PATCH] Add Spinner --- client/js/masterFilter.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/js/masterFilter.js b/client/js/masterFilter.js index 0cfea7d..2cf82e6 100644 --- a/client/js/masterFilter.js +++ b/client/js/masterFilter.js @@ -31,9 +31,11 @@ let createMasterFilterFrame=()=>{

- + `; - + let _filterContext={}; // TODO: This is bad, grown design - should be replaced with a proper object oriented structure and observer pattern. Object.defineProperty(me,"selectedDate",{ get:_=>{ return (_filterContext.theDate);} @@ -123,11 +125,13 @@ let createMasterFilterFrame=()=>{ } me.requestOptionChain=()=>{ + $("#spinner").show(); $.ajax({ url:"/getOptionChain?Date=" + _filterContext.theDate + "&Symbol=" + _filterContext.theSymbol + "&Time="+ _filterContext.selectedTime }).done(response=>{ dta=JSON.parse(response[0].Data); //console.log("received",dta); + $("#spinner").hide(); displayOptionChain(); $("#tbUnderlyingPrice").text(dta.underlyingPrice.toLocaleString('en',{minimumFractionDigits: 2, maximumFractionDigits: 2})); });