File tree Expand file tree Collapse file tree 4 files changed +31
-11
lines changed
sourdough/resources/views Expand file tree Collapse file tree 4 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 1313 < div class ="daily-log-input ">
1414 < div class ="daily-log-input__label "> Picture</ div >
1515 < label for ="picture " class ="daily-log-upload-label "> upload</ label >
16- < input type ="file " id ="picture " name ="picture " onchange =" onUpload(this) " >
16+ < input type ="file " id ="picture " name ="picture ">
1717 < div id ="daily-log-upload-indicator "> </ div >
1818 </ div >
19- < div class ="daily-log-form__submit " onclick =" onSubmit() "> Submit </ div >
19+ < div class ="daily-log-form__submit " id =" daily-log-form__submit "> Submit </ div >
2020 </ div >
2121</ div >
22- < script >
23- init ( ) ;
22+ < script type ="text/javascript " nonce ="<%=scriptNonce%> ">
23+ LABKEY . Utils . onReady ( function ( ) {
24+ const el = document . getElementById ( 'picture' ) ;
25+ el [ 'onchange' ] = function ( ) { onUpload ( el ) ; } ;
26+ document . getElementById ( 'daily-log-form__submit' ) [ 'onclick' ] = onSubmit ;
27+ init ( ) ;
28+ } ) ;
2429</ script >
Original file line number Diff line number Diff line change 66 < div id ='myQWP2 '> </ div >
77</ div >
88
9- < script >
10- init ( ) ;
9+ < script type ="text/javascript " nonce ="<%=scriptNonce%> ">
10+ LABKEY . Utils . onReady ( function ( ) {
11+ init ( ) ;
12+ } ) ;
1113</ script >
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ <h3> Welcome to the Sourdough File-based Module! </h3>
66< div >
77 To get started, click below to initialize data import and styling configuration.
88 < div class ="overview ">
9- < div class ="overview__button " onclick =" onInit() "> Initialize </ div >
9+ < div class ="overview__button " id =" overview__button "> Initialize </ div >
1010 < div id ="overview__text "> </ div >
1111 </ div >
1212</ div >
@@ -40,3 +40,8 @@ <h3> Welcome to the Sourdough File-based Module! </h3>
4040 < li > Customizing the login page </ li >
4141 </ ul >
4242</ div >
43+ < script type ="text/javascript " nonce ="<%=scriptNonce%> ">
44+ LABKEY . Utils . onReady ( function ( ) {
45+ document . getElementById ( 'overview__button' ) [ 'onclick' ] = onInit ;
46+ } ) ;
47+ </ script >
Original file line number Diff line number Diff line change 1414
1515 < div class ="buttonRow ">
1616 < div class ="buttonRow__label "> Toggle custom header and footer</ div >
17- < div class ="buttonRow__button " onclick =" setHeaderFooter(true) "> on </ div >
18- < div class ="buttonRow__button " onclick =" setHeaderFooter(false) "> off </ div >
17+ < div class ="buttonRow__button " id =" setHeaderFooterOn "> on </ div >
18+ < div class ="buttonRow__button " id =" setHeaderFooterOff "> off </ div >
1919 </ div >
2020
2121 < div class ="buttonRow ">
2222 < div class ="buttonRow__label "> Toggle custom login page</ div >
23- < div class ="buttonRow__button " onclick =" setLogin(true) "> on </ div >
24- < div class ="buttonRow__button " onclick =" setLogin(false) "> off </ div >
23+ < div class ="buttonRow__button " id =" setLoginOn "> on </ div >
24+ < div class ="buttonRow__button " id =" setLoginOff "> off </ div >
2525 </ div >
2626</ div >
27+ < script type ="text/javascript " nonce ="<%=scriptNonce%> ">
28+ LABKEY . Utils . onReady ( function ( ) {
29+ document . getElementById ( 'setHeaderFooterOn' ) [ 'onclick' ] = function ( ) { setHeaderFooter ( true ) } ;
30+ document . getElementById ( 'setHeaderFooterOff' ) [ 'onclick' ] = function ( ) { setHeaderFooter ( false ) } ;
31+ document . getElementById ( 'setLoginOn' ) [ 'onclick' ] = function ( ) { setLogin ( true ) } ;
32+ document . getElementById ( 'setLoginOff' ) [ 'onclick' ] = function ( ) { setLogin ( false ) } ;
33+ } ) ;
34+ </ script >
You can’t perform that action at this time.
0 commit comments