File tree Expand file tree Collapse file tree 2 files changed +35
-10
lines changed Expand file tree Collapse file tree 2 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 6565 > </ textarea >
6666 < input class ="uk-input optionaltext " type ="text " placeholder ="Optional text for print title ">
6767 < label style ="margin: 3px; "> Image Output
68- < select class ="uk-select " onchange ="changeImageInput(this.value) " name ="Image Output " id ="rtf_bool ">
69- < option selected ="selected " default value ="false "> false</ option >
70- < option value ="true ">
71- true
72- </ option >
73- </ select > </ label >
68+ < select class ="uk-select " onchange ="changeImageInput(this.value) " name ="Image Output " id ="rtf_bool ">
69+ < option selected ="selected " default value ="false "> false</ option >
70+ < option value ="true ">
71+ true
72+ </ option >
73+ </ select >
74+ </ label >
7475 < label style ="margin: 3px; "> Page Breaks in prints
7576 < select class ="uk-select " id ="p_b_p ">
7677 < option default value ="false "> false</ option >
7778 < option selected ="selected " value ="true ">
7879 true
7980 </ option >
80- </ select > </ label >
81+ </ select >
82+ </ label >
83+ < strong >
84+ Print list oprations
85+ </ strong >
86+ < label class ="oprations ">
87+ select index to delete from list
88+ < select onchange ="del(this.value) " disabled style ="height: auto; " name ="Delete index " id ="select_del " >
89+ < option default > none</ option >
90+ </ select >
91+ </ label >
8192 < div class ="controls ">
8293 < button onclick ="copyToClipboard(this) " class ="copy ">
8394 Copy
104115 </ div >
105116 < br >
106117 < div class ="msg "> </ div >
118+
107119 < div class ="queue ">
108120 < div id ="list ">
109121
Original file line number Diff line number Diff line change @@ -36,13 +36,18 @@ const addToQueue = () =>{
3636 updateUIqueue ( ) ;
3737} ,
3838updateUIqueue = ( ) => {
39- let html = "" , rtfDisplay ;
39+ let html = "" , rtfDisplay , deleter = $ ( "select#select_del" ) ;
40+ deleter . disabled = true ;
4041 if ( queue . length != 0 ) {
42+ deleter . disabled = false ;
43+ let i = 0 ;
44+ deleter . innerHTML = "<option default>none</option>" ;
4145 queue . forEach ( cq => {
46+ deleter . innerHTML += `<option>${ i + 1 } </option>` ;
4247 if ( cq . rtfBool == "true" ) { rtfDisplay = "inline" } else { rtfDisplay = "none" }
4348 html += `<div style="margin:0 20px;">
4449 <h3>
45- ${ cq . title }
50+ ${ ++ i } . ${ cq . title }
4651 </h3>
4752 <div class="outputBlock" style="margin-top:10px">
4853 <p class="filenames"><span class="filename">${ cq . filename } </span></p>
@@ -63,10 +68,18 @@ updateUIqueue = () =>{
6368 } )
6469 show_message ( "Added " + queue [ queue . length - 1 ] . filename + " to list successfully" ) ;
6570 } else {
66- html = "Noting found in queue"
71+ html = "Nothing found in queue"
6772 }
6873 $ ( "div.queue #list" ) . innerHTML = html ;
6974} ,
75+ del = index => {
76+ if ( index != "none" )
77+ {
78+ queue . splice ( index - 1 , 1 ) ;
79+ console . log ( queue ) ;
80+ updateUIqueue ( ) ;
81+ }
82+ } ,
7083sendCodeHighlight = ( val , lang ) => {
7184 let htmlBlock = "" , htmlLine , tempBlock ;
7285 tempBlock = getHighlight ( val , lang )
You can’t perform that action at this time.
0 commit comments