@@ -144,18 +144,21 @@ function generate_decision_message_block() {
144
144
} else if ( justification_type2_checked_count > 0 ) {
145
145
msg = "GATEKEEP" ;
146
146
document . getElementById ( "deviation_reasonable" ) . style . display = "block" ;
147
+ document . getElementById ( "Supplementary Materials" ) . style . display = "block" ;
147
148
document . getElementById ( "Desirable" ) . style . display = "block" ;
148
149
document . getElementById ( "Extraordinary" ) . style . display = "block" ;
149
150
150
151
// if number of type 1 is greater than 0
151
152
} else if ( justification_type1_checked_count > 0 ) {
152
153
msg = "ACCEPT" ;
153
154
document . getElementById ( "deviation_reasonable" ) . style . display = "block" ;
155
+ document . getElementById ( "Supplementary Materials" ) . style . display = "block" ;
154
156
document . getElementById ( "Desirable" ) . style . display = "block" ;
155
157
document . getElementById ( "Extraordinary" ) . style . display = "block" ;
156
158
157
159
} else {
158
160
msg = "ACCEPT" ;
161
+ document . getElementById ( "Supplementary Materials" ) . style . display = "block" ;
159
162
document . getElementById ( "Desirable" ) . style . display = "block" ;
160
163
document . getElementById ( "Extraordinary" ) . style . display = "block" ;
161
164
@@ -679,8 +682,9 @@ function generate_two_phase_reviewer_deviation_block(checklistItem_id) {
679
682
return deviation_block ;
680
683
}
681
684
685
+
682
686
// convert from Markdown to HTML checklists
683
- function convert_MD_standard_checklists_to_html_standard_checklists ( standardName , checklistName , checklistText , footnotes ) {
687
+ function convert_MD_standard_checklists_to_html_standard_checklists ( standardName , checklistName , checklistText , footnotes , supCheckList ) {
684
688
685
689
// ???????
686
690
tester = getParameterByName ( 'y' ) [ 0 ] == 'noval' ? true : false ;
@@ -735,13 +739,19 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName
735
739
// !!!!!!!!!!!!!!!! we dont need this part in the checklist
736
740
if ( line_text . includes ( "complies with all applicable empirical standards" ) )
737
741
continue ;
738
-
742
+
739
743
// if line_text includes a specific regex set to true ( line break with horizontal rule)
740
744
IMRaD_line_break = line_text . includes ( '<br\/>_hr_' ) ? true : false ;
741
745
742
746
// Replace line break and horizontal rule with empty string
743
747
line_text = line_text . replace ( / ( < b r \/ > _ h r _ ) + / g, '' ) ;
744
748
749
+ //comment later
750
+ if ( line_text . includes ( "{supplement}" ) && checklistName !== "Supplementary" ) {
751
+ supCheckList . items += "- [ ]" + line_text ;
752
+ continue ;
753
+ }
754
+
745
755
// Change the text to the string held in line_text
746
756
checklistItemLI . setAttribute ( "text" , line_text ) ;
747
757
@@ -816,6 +826,7 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName
816
826
checklists . appendChild ( checklistItemLI ) ;
817
827
}
818
828
}
829
+
819
830
return checklists ;
820
831
}
821
832
@@ -902,10 +913,10 @@ function create_role_heading(){
902
913
}
903
914
904
915
// Prepare unordered lists
905
- function preparation_to_convert_MD_to_HTML ( standardTagName , checklistTagName , checklistInnerHTML , footnotes ) {
916
+ function preparation_to_convert_MD_to_HTML ( standardTagName , checklistTagName , checklistInnerHTML , footnotes , supCheckList ) {
906
917
907
918
// superscript tags
908
- checklistInnerHTML = checklistInnerHTML . replaceAll ( "<sup>" , "{sup}" ) . replaceAll ( "</sup>" , "{/sup}" ) ;
919
+ checklistInnerHTML = checklistInnerHTML . replaceAll ( "<sup>" , "{sup}" ) . replaceAll ( "</sup>" , "{/sup}" ) . replaceAll ( "<supplement>" , "{supplement}" ) ;
909
920
910
921
var tempDivElement = document . createElement ( "div" ) ;
911
922
tempDivElement . innerHTML = checklistInnerHTML ;
@@ -922,8 +933,9 @@ function preparation_to_convert_MD_to_HTML(standardTagName, checklistTagName, ch
922
933
// Supplement Files - Change from docs to link, change from .md file to nothing
923
934
checklistText = checklistText . replaceAll ( 'https://github.com/acmsigsoft/EmpiricalStandards/blob/master/Supplements/' , '../Supplements?supplement=' ) . replaceAll ( '.md' , '' ) ;
924
935
936
+
925
937
// Convert Markdown Checklists to HTML checklists
926
- checklists = convert_MD_standard_checklists_to_html_standard_checklists ( standardTagName , checklistTagName , checklistText , footnotes )
938
+ checklists = convert_MD_standard_checklists_to_html_standard_checklists ( standardTagName , checklistTagName , checklistText , footnotes , supCheckList )
927
939
928
940
return checklists ;
929
941
}
@@ -986,6 +998,8 @@ function create_requirements_checklist(){
986
998
form . id = "checklists" ;
987
999
form . name = "checklists" ;
988
1000
1001
+ var supCheckList = { items :"" } ;
1002
+
989
1003
// create Header for Essential Requirements with an unordered list
990
1004
var EssentialUL = create_requirements_heading_with_UL ( "Essential" ) ;
991
1005
@@ -1001,13 +1015,13 @@ function create_requirements_checklist(){
1001
1015
// hide desirable and extraordinary list of requirements for One Phase Reviewer
1002
1016
if ( role == "\"one-phase-reviewer\"" ) {
1003
1017
DesirableUL . style = "padding: 0px; display:none;" ;
1004
- SupplementaryUL . style = "padding: 0px; display:none ;" ;
1018
+ SupplementaryUL . style = "padding: 0px; display:block ;" ;
1005
1019
ExtraordinaryUL . style = "padding: 0px; display:none;" ;
1006
1020
}
1007
1021
// hide desirable and extraordinary list of requirements for Two Phase Reviewer
1008
1022
else if ( role == "\"two-phase-reviewer\"" ) {
1009
1023
DesirableUL . style = "padding: 0px; display:none;" ;
1010
- SupplementaryUL . style = "padding: 0px; display:none ;" ;
1024
+ SupplementaryUL . style = "padding: 0px; display:block ;" ;
1011
1025
ExtraordinaryUL . style = "padding: 0px; display:none;" ;
1012
1026
}
1013
1027
@@ -1065,18 +1079,20 @@ function create_requirements_checklist(){
1065
1079
EssentialUL . appendChild ( Yes_No ) ;
1066
1080
//EssentialUL.appendChild(checklists);
1067
1081
}
1082
+
1068
1083
else if ( checklistTag . getAttribute ( 'name' ) == "Desirable" ) {
1069
1084
//DesirableUL.appendChild(standard_header_rule);
1070
1085
1071
1086
// Change from Markdown to HTML elements
1072
- checklists = preparation_to_convert_MD_to_HTML ( standardTag . getAttribute ( 'name' ) , checklistTag . getAttribute ( 'name' ) , checklistHTML , footnotes ) ;
1087
+ checklists = preparation_to_convert_MD_to_HTML ( standardTag . getAttribute ( 'name' ) , checklistTag . getAttribute ( 'name' ) , checklistHTML , footnotes , supCheckList ) ;
1073
1088
DesirableUL . appendChild ( checklists ) ;
1074
1089
}
1090
+
1075
1091
else if ( checklistTag . getAttribute ( 'name' ) == "Extraordinary" ) {
1076
1092
//ExtraordinaryUL.appendChild(standard_header_rule);
1077
1093
1078
1094
// Change from Markdown to HTML elements
1079
- checklists = preparation_to_convert_MD_to_HTML ( standardTag . getAttribute ( 'name' ) , checklistTag . getAttribute ( 'name' ) , checklistHTML , footnotes ) ;
1095
+ checklists = preparation_to_convert_MD_to_HTML ( standardTag . getAttribute ( 'name' ) , checklistTag . getAttribute ( 'name' ) , checklistHTML , footnotes , supCheckList ) ;
1080
1096
ExtraordinaryUL . appendChild ( checklists ) ;
1081
1097
}
1082
1098
}
@@ -1089,15 +1105,22 @@ function create_requirements_checklist(){
1089
1105
notify_testers ( ) ;
1090
1106
1091
1107
// Change from Markdown to HTML elements
1092
- checklists = preparation_to_convert_MD_to_HTML ( "" , 'Essential' , all_essential_IMRaD_items_innerHTML , footnotes ) ;
1108
+ checklists = preparation_to_convert_MD_to_HTML ( "" , 'Essential' , all_essential_IMRaD_items_innerHTML , footnotes , supCheckList ) ;
1093
1109
EssentialUL . appendChild ( checklists ) ;
1094
-
1110
+
1111
+ checklists = preparation_to_convert_MD_to_HTML ( standardTag . getAttribute ( 'name' ) , "Supplementary" , supCheckList . items . replaceAll ( "{supplement}" , "" ) , footnotes , supCheckList ) ;
1112
+ SupplementaryUL . appendChild ( checklists ) ;
1113
+
1114
+
1095
1115
// Add Essential Attributes to the form
1096
1116
form . appendChild ( EssentialUL ) ;
1097
1117
1098
1118
// Create download button
1099
1119
var download = create_download_button ( ) ;
1100
1120
1121
+ //append supplementary material list
1122
+ form . appendChild ( SupplementaryUL ) ;
1123
+
1101
1124
// (All 'Yes' -> accept manuscript)
1102
1125
var decision_msg = generate_message ( "decision_msg" , "red" , ( role != "\"author\"" ? "The manuscript meets all essential criteria: ACCEPT." : "" ) , 2 , 0 ) ;
1103
1126
form . appendChild ( decision_msg ) ;
@@ -1131,6 +1154,7 @@ function create_requirements_checklist(){
1131
1154
}
1132
1155
1133
1156
// Add Desirable and Extraordinary Unordered List to Form
1157
+
1134
1158
form . appendChild ( DesirableUL ) ;
1135
1159
form . appendChild ( ExtraordinaryUL ) ;
1136
1160
0 commit comments