From b5f71423b3d7de0efd579c222197b0753abda19d Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Sat, 25 Apr 2020 14:18:07 -0500 Subject: [PATCH] Better usability and nicer look: Change buttons to bootstrap standard --- client/css/optiTrainer.css | 44 ++++++++++++++++++++---------- client/js/masterFilter.js | 55 +++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 32 deletions(-) diff --git a/client/css/optiTrainer.css b/client/css/optiTrainer.css index b14961f..1a38374 100644 --- a/client/css/optiTrainer.css +++ b/client/css/optiTrainer.css @@ -15,33 +15,49 @@ body { list-style-type: none; } -#lbSymbol { - position: absolute; - top: 0; - left: 300; - width: 100px; +#grpSymbol { + position:absolute; + left:300px; } -#lbTime { +.ddMnuBtn { + width:245px +} + +#lbSymbol { + width: 150px; +} + +#grpTime { position: absolute; - top: 0; - left: 410; - width: 100px; + left:300px; + top:40px; +} +#lbTime { } #tbSymbol { position: absolute; top: 0; - left: 550; + left: 550px; width: 100px; - margin-top:0 + margin-top:0px; } #tbUnderlyingPrice { position: absolute; - top: 30; - left: 550; + top: 00; + left: 660px; width: 100px; + margin-top:3px; +} + +#tbSelectedTime { + position: absolute; + top: 00; + left: 550px; + width: 100px; + margin-top:43px; } #frmMasterFilter { @@ -76,7 +92,7 @@ body { background-color: #EEEEFF; position:absolute; left:300; - top:100px; + top:80px; width:800px; } diff --git a/client/js/masterFilter.js b/client/js/masterFilter.js index 9fdccd7..b300220 100644 --- a/client/js/masterFilter.js +++ b/client/js/masterFilter.js @@ -9,16 +9,30 @@ let createMasterFilterFrame=()=>{ theFrameDiv.innerHTML=`
- - - + -

+ + + +

SELECT SYMBOL!

+ +

+ `; @@ -55,10 +69,11 @@ let fetchSymbols=()=>{ } let getCurrentSymbol=()=>{ - return(filterContext.theSymbol=$("#lbSymbol").val()); + return(filterContext.theSymbol); } -let symbolChanged=_=>{ - console.log("symbolChanged",getCurrentSymbol()); +let symbolChanged=(newSymbol)=>{ + console.log("symbolChanged",newSymbol); + filterContext.theSymbol=newSymbol document.title=getCurrentSymbol(); $("#tbSymbol").text(getCurrentSymbol()); getAvailDatesForSymbol(getCurrentSymbol()).done(_=>{ @@ -75,10 +90,11 @@ let symbolChanged=_=>{ }); } -let timeChanged=()=>{ - if (filterContext.selectedTime!==$("#lbTime").val()){ - filterContext.selectedTime=$("#lbTime").val(); - console.log("Time changed", ); +let timeChanged=(newTime)=>{ + if (filterContext.selectedTime!==newTime){ + filterContext.selectedTime=newTime; + $("#tbSelectedTime").text(newTime); + console.log("Time changed", newTime); requestOptionChain(); } } @@ -107,9 +123,12 @@ let showTimesForDay=()=>{ theTime=allTimes[i].Time; let selectedFlag=""; if (i==4) { - selectedFlag="selected"; + // select the 4th time in the day... that's usually around 9:30 + timeChanged(theTime); } - lbTime.append($(``)) + //lbTime.append($(``)) + lbTime.append($(``)) + } $("#lbTime").change(); }); @@ -132,6 +151,6 @@ let refreshSymbolList=(allSymbols)=>{ for (let i=0;i${theSymbol}`)) + lbSymbol.append($(``)) } }