File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -22,25 +22,25 @@ <h1 class="h1">Import Annotations</h1>
2222 < h3 class ="h "> Info</ h3 >
2323 < br >
2424 < div class ="slide " >
25- < input type ="text " name ="slide_id " placeholder ="Slide Id: "> < br >
25+ < input type ="text " name ="slide_id " id =" slide_id " placeholder ="Slide Id: "> < br >
2626 </ div >
2727 < br >
2828 < div class ="slide ">
29- < input type ="text " name ="annot_name " placeholder ="Annotation Name: "> < br >
29+ < input type ="text " name ="annot_name " id =" annot_name " placeholder ="Annotation Name: "> < br >
3030 </ div >
3131 < h3 class ="h2 "> File Contents</ h3 >
3232 < div class ="slide ">
33- < textarea name ="input " class ="slide " rows ="5 " cols ="75 " placeholder ="Input Here "> </ textarea > < br >
33+ < textarea name ="input " class ="slide " id =" xml_in " rows ="5 " cols ="75 " placeholder ="Input Here "> </ textarea > < br >
3434 </ div >
3535 < br >
3636 < div class ="btns ">
3737 < button id ="convert_btn btn1 " class ="buttons " onclick ="xml2geo() " type ="button "> Convert from XML</ button >
3838 < button id ="prepare_btn btn2 " class ="buttons " onclick ="prepareAnnot() " type ="button "> Prepare JSON</ button >
3939 </ div >
4040 < br >
41- < textarea name ="input " class ="slide " rows ="5 " cols ="75 " placeholder ="Output: "> </ textarea > < br >
41+ < textarea name ="input " class ="slide " id =" output " rows ="5 " cols ="75 " placeholder ="Output: "> </ textarea > < br >
4242 < button id ="post_btn " class ="buttons btnn " onclick ="saveAnnot() " type ="button "> Post</ button >
4343 </ div >
4444</ body >
4545
46- </ html >
46+ </ html >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const store = new Store('../../data');
22
33function prepareAnnot ( ) {
44 try {
5- let output = JSON . parse ( document . getElementById ( 'input' ) ) ;
5+ let output = JSON . parse ( document . getElementById ( 'input' ) . value ) ;
66 output [ 'provenance' ] [ 'image' ] [ 'slide' ] = document . getElementById ( 'slide_id' ) . value ;
77 output [ 'provenance' ] [ 'analysis' ] [ 'execution' ] = document . getElementById ( 'annot_name' ) . value ;
88 output [ 'properties' ] [ 'annotations' ] [ 'name' ] = document . getElementById ( 'annot_name' ) . value ;
@@ -14,7 +14,7 @@ function prepareAnnot() {
1414
1515function saveAnnot ( ) {
1616 try {
17- let doc = JSON . parse ( document . getElementById ( 'output' ) ) ;
17+ let doc = JSON . parse ( document . getElementById ( 'output' ) . value ) ;
1818 } catch ( e ) {
1919 alert ( e ) ;
2020 }
You can’t perform that action at this time.
0 commit comments