File tree Expand file tree Collapse file tree 5 files changed +29
-7
lines changed Expand file tree Collapse file tree 5 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,26 @@ $(document).ready(function() {
1515 $ ( '#progressDiv' ) . hide ( ) ;
1616 }
1717
18+ if ( $ ( '#hexGeneratorForm' ) . length > 0 ) {
19+ const buttonEnable = function ( ) {
20+ const imageFile = $ ( 'input[name="imageFile"]:checked' ) . val ( ) ;
21+ const userBinFiles = $ ( '#userBinFile' ) . prop ( 'files' ) ;
22+ if ( ! imageFile || ! userBinFiles || userBinFiles . length != 1 ) {
23+ // Not valid settings
24+ $ ( '#hexGeneratorForm' ) . find ( 'button' ) . attr ( 'disabled' , 'disabled' ) ;
25+ }
26+ else {
27+ $ ( '#hexGeneratorForm' ) . find ( 'button' ) . removeAttr ( 'disabled' ) ;
28+ }
29+ } ;
30+
31+ $ ( 'input' ) . on ( 'change' , buttonEnable ) ;
32+
33+ buttonEnable ( ) ;
34+ }
1835} ) ;
1936
37+
2038async function startFlash ( platform , version ) {
2139 $ ( '#deviceRestoreTable' ) . hide ( ) ;
2240 $ ( '#progressDiv' ) . hide ( ) ;
Original file line number Diff line number Diff line change @@ -38,3 +38,7 @@ div.sideBySide0 {
3838div .sideBySide1 {
3939 flex : 1 ;
4040}
41+
42+ select .carrierListSelect {
43+ height : 31px ;
44+ }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ This tool takes the [restore binaries](/reference/developer-tools/jtag/#restore-
2121
2222- Select your user firmware .bin file:
2323
24- <form >
24+ <form id = " hexGeneratorForm " >
2525<p ><input type =" file " id =" userBinFile " name =" userBinFile " accept =" .bin " ></p >
2626<p ><button type =" button " onclick =" downloadHex ()" >Generate and Download Hex File</button ></p >
2727</form >
Original file line number Diff line number Diff line change 7676 <table >
7777 <tr >
7878 <td class =" carrierFormLabel" >Device:</td >
79- <td ><select id =" deviceList" ></select ></td >
79+ <td ><select id =" deviceList" class = " carrierListSelect " ></select ></td >
8080 </tr >
8181 <tr >
8282 <td class =" carrierFormLabel" >Region:</td >
83- <td ><select id =" regionList" ></select ></td >
83+ <td ><select id =" regionList" class = " carrierListSelect " ></select ></td >
8484 </tr >
8585 </table >
8686 </form >
9999 <form >
100100 <div >
101101 <input type =" radio" id =" country2RegionRadio" name =" country2Radio" value =" region" >
102- <label for =" country2RegionRadio" >Region <select id =" country2RegionSel" >
102+ <label for =" country2RegionRadio" >Region <select id =" country2RegionSel" class = " carrierListSelect " >
103103 </select ></label >
104104
105105 <input type =" radio" id =" country2CountryRadio" name =" country2Radio" value =" country" >
129129 <tr >
130130 <td class =" carrierFormLabel" >Device Family:</td >
131131 <td >
132- <select id =" familyMapSelect" >
132+ <select id =" familyMapSelect" class = " carrierListSelect " >
133133 <option value =" tracker" >Tracker</option >
134134 <option value =" b series" >B Series SoM</option >
135135 <option value =" boron" >Boron</option >
153153 <table >
154154 <tr >
155155 <td class =" carrierFormLabel" >Device:</td >
156- <td ><select id =" countryDetailDeviceList" ></select ></td >
156+ <td ><select id =" countryDetailDeviceList" class = " carrierListSelect " ></select ></td >
157157 </tr >
158158 <tr >
159159 <td class =" carrierFormLabel" >Country:</td >
Original file line number Diff line number Diff line change 1515
1616 <div id =" errorDiv" ></div >
1717
18- <div id =" progressDiv" >
18+ <div id =" progressDiv" style = " display:none; " >
1919 <label for =" progressBar" >Flash progress:</label >
2020 <progress id =" progressBar" value =" 0" max =" 100" ></progress >
2121 </div >
You can’t perform that action at this time.
0 commit comments