Add Spinner
This commit is contained in:
@@ -31,7 +31,9 @@ let createMasterFilterFrame=()=>{
|
||||
|
||||
<h2 id='tbSelectedTime'></h2>
|
||||
|
||||
<!--button onclick='rq()'>LOAD</button-->
|
||||
<div id='spinner' style='z-index:100; position:absolute;display:none'>
|
||||
<h1 style='color:red'>*</h1>
|
||||
</div>
|
||||
`;
|
||||
|
||||
let _filterContext={}; // TODO: This is bad, grown design - should be replaced with a proper object oriented structure and observer pattern.
|
||||
@@ -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}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user