psdi-data-conversion 0.0.33__py3-none-any.whl → 0.0.36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. psdi_data_conversion/app.py +23 -3
  2. psdi_data_conversion/constants.py +2 -0
  3. psdi_data_conversion/converter.py +16 -6
  4. psdi_data_conversion/converters/atomsk.py +3 -1
  5. psdi_data_conversion/converters/base.py +99 -39
  6. psdi_data_conversion/converters/c2x.py +3 -1
  7. psdi_data_conversion/converters/openbabel.py +40 -1
  8. psdi_data_conversion/database.py +5 -0
  9. psdi_data_conversion/main.py +18 -10
  10. psdi_data_conversion/static/content/accessibility.htm +5 -5
  11. psdi_data_conversion/static/content/convert.htm +31 -15
  12. psdi_data_conversion/static/content/convertato.htm +46 -28
  13. psdi_data_conversion/static/content/convertc2x.htm +47 -28
  14. psdi_data_conversion/static/content/documentation.htm +4 -4
  15. psdi_data_conversion/static/content/download.htm +4 -1
  16. psdi_data_conversion/static/content/feedback.htm +4 -4
  17. psdi_data_conversion/static/content/index-versions/psdi-common-header.html +1 -1
  18. psdi_data_conversion/static/content/psdi-common-header.html +1 -1
  19. psdi_data_conversion/static/content/report.htm +9 -7
  20. psdi_data_conversion/static/javascript/common.js +20 -0
  21. psdi_data_conversion/static/javascript/convert.js +1 -2
  22. psdi_data_conversion/static/javascript/convert_common.js +100 -7
  23. psdi_data_conversion/static/javascript/convertato.js +1 -2
  24. psdi_data_conversion/static/javascript/convertc2x.js +1 -2
  25. psdi_data_conversion/static/javascript/format.js +12 -0
  26. psdi_data_conversion/static/javascript/report.js +6 -0
  27. psdi_data_conversion/static/styles/format.css +13 -0
  28. psdi_data_conversion/static/styles/psdi-common.css +5 -2
  29. psdi_data_conversion/templates/index.htm +4 -1
  30. psdi_data_conversion/testing/conversion_test_specs.py +240 -149
  31. psdi_data_conversion/testing/utils.py +22 -7
  32. {psdi_data_conversion-0.0.33.dist-info → psdi_data_conversion-0.0.36.dist-info}/METADATA +29 -6
  33. {psdi_data_conversion-0.0.33.dist-info → psdi_data_conversion-0.0.36.dist-info}/RECORD +36 -36
  34. {psdi_data_conversion-0.0.33.dist-info → psdi_data_conversion-0.0.36.dist-info}/WHEEL +0 -0
  35. {psdi_data_conversion-0.0.33.dist-info → psdi_data_conversion-0.0.36.dist-info}/entry_points.txt +0 -0
  36. {psdi_data_conversion-0.0.33.dist-info → psdi_data_conversion-0.0.36.dist-info}/licenses/LICENSE +0 -0
@@ -10,13 +10,23 @@
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <title>PSDI Data Conversion Service</title>
12
12
  <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+
13
14
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
15
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
16
+
17
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
18
+
19
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
20
+ crossorigin="anonymous"></script>
21
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
23
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
24
+
15
25
  <link rel="stylesheet" href="../styles/format.css">
16
26
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
27
  <script src="../javascript/common.js" type="module"></script>
19
28
  <script src="../javascript/psdi-common.js" type="module"></script>
29
+ <script src="../javascript/convert.js" type="module" language="JavaScript"></script>
20
30
  </head>
21
31
 
22
32
  <body marginwidth="0">
@@ -32,8 +42,13 @@
32
42
  </div>
33
43
  </div>
34
44
 
35
- <form name="gui">
45
+ <form name="gui" class="gui">
36
46
  <div class="max-width-box">
47
+ <a href="../../">
48
+ <input type="button" class="button" value=" ← Return to Format Selection " name="returnHome" id="returnHome">
49
+ </a>
50
+ <br>
51
+ <br>
37
52
  <p>Zero to two option flag select boxes and zero to two sets of option flag check boxes may be displayed,
38
53
  depending on the conversion and the degree of completion of the database. Further information may be displayed
39
54
  underneath the select boxes if available. One or more input or output flags may be selected if required (command
@@ -46,7 +61,7 @@
46
61
  <div id="inFlagList">
47
62
  <p>
48
63
  <label for="inFlags" id="in_label">Read (input) option flags
49
- (select all required):</label>
64
+ (hold CTRL to select multiple, or CTRL+click a selected option to unselect):</label>
50
65
  <div id="in_flag_break"></div>
51
66
  <select id="inFlags" class="large-width" size="4" multiple="multiple"></select>
52
67
  <div id=inFlagInfo></div>
@@ -55,7 +70,7 @@
55
70
  <div id="outFlagList">
56
71
  <p>
57
72
  <label for="outFlags" id="out_label">Write (output) option flags
58
- (select all required):</label>
73
+ (hold CTRL to select multiple, or CTRL+click a selected option to unselect):</label>
59
74
  <div id="out_flag_break"></div>
60
75
  <select id="outFlags" class="large-width" size="4" multiple="multiple"></select>
61
76
  <div id=outFlagInfo></div>
@@ -96,27 +111,28 @@
96
111
  <input type="radio" name="coordOptions" id="coordOptions" value="better" disabled=true> better
97
112
  <input type="radio" name="coordOptions" id="coordOptions" value="best" disabled=true> best
98
113
  </p>
99
- <p id="fileChecking">
100
- </p>
101
114
  <p id="convertFile">
102
- <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
115
+ <input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and files
103
116
  contained in archives) all have the correct extension<br>
104
- <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
105
- Select file to convert:
106
- <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
117
+ <input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
118
+ Select file to convert<span class="max-file-size"></span>:
119
+ <br>
120
+ <input type="file" name="fileToUpload" id="fileToUpload">
121
+ <input type="button" class="button" value=" Clear Uploaded File " name="clearUpload" id="clearUpload">
122
+ <br>
107
123
  If you have sensitive data you might prefer to use
108
124
  <a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
109
125
  our service.<br>
110
- <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
111
- disabled=true>
126
+ <span class="convert-button-and-spinner">
127
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
128
+ disabled=true>
129
+ <span class="loading-spinner spinner-border"></span>
130
+ </span>
112
131
  </p>
113
132
  <div class="medGap"></div>
114
133
  </div>
115
134
  </form>
116
135
 
117
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
118
- crossorigin="anonymous"></script>
119
- <script src="../javascript/convert.js" type="module" language="JavaScript"></script>
120
136
 
121
137
  <footer class="footer" id="psdi-footer"></footer>
122
138
 
@@ -10,13 +10,23 @@
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <title>PSDI Data Conversion Service</title>
12
12
  <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
13
+
13
14
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
15
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
16
+
17
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
18
+
19
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
20
+ crossorigin="anonymous"></script>
21
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
23
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
24
+
15
25
  <link rel="stylesheet" href="../styles/format.css">
16
26
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
27
  <script src="../javascript/common.js" type="module"></script>
19
28
  <script src="../javascript/psdi-common.js" type="module"></script>
29
+ <script src="../javascript/convertato.js" type="module" language="JavaScript"></script>
20
30
  </head>
21
31
 
22
32
  <body marginwidth="0">
@@ -32,36 +42,44 @@
32
42
  </div>
33
43
  </div>
34
44
 
35
- <form name="gui">
36
- <div>
37
- <p>
38
- Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
39
- 'Convert'
40
- uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
41
- are
42
- encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation bar.
43
- </p>
44
- <h6 id="heading"></h6>
45
- <p id="convertFile">
46
- <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
47
- contained in archives) all have the correct extension<br>
48
- <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
49
- Select file to convert:
50
- <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
51
- If you have sensitive data you might prefer to use
52
- <a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
53
- our service.<br>
54
- <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
55
- disabled=true>
56
- </p>
45
+ <form name="gui" class="gui">
46
+ <div class="max-width-box">
47
+ <div>
48
+ <a href="../../">
49
+ <input type="button" class="button" value=" ← Return to Format Selection " name="returnHome" id="returnHome">
50
+ </a>
51
+ <br>
52
+ <br>
53
+ <p>
54
+ Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
55
+ 'Convert' uploads and converts the file. The output file is automatically downloaded, along with a log file.
56
+ If any issues are encountered (e.g., the output file does not download), please click on 'Provide Feedback' in
57
+ the navigation bar.
58
+ </p>
59
+ <h6 id="heading"></h6>
60
+ <p id="convertFile">
61
+ <input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and files
62
+ contained in archives) all have the correct extension<br>
63
+ <input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
64
+ Select file to convert<span class="max-file-size"></span>:
65
+ <br>
66
+ <input type="file" name="fileToUpload" id="fileToUpload">
67
+ <input type="button" class="button" value=" Clear Uploaded File " name="clearUpload" id="clearUpload">
68
+ <br>
69
+ If you have sensitive data you might prefer to use
70
+ <a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
71
+ our service.<br>
72
+ <span class="convert-button-and-spinner">
73
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
74
+ disabled=true>
75
+ <span class="loading-spinner spinner-border"></span>
76
+ </span>
77
+ </p>
78
+ </div>
79
+ <div class="largeGap"></div>
57
80
  </div>
58
- <div class="largeGap"></div>
59
81
  </form>
60
82
 
61
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
62
- crossorigin="anonymous"></script>
63
- <script src="../javascript/convertato.js" type="module" language="JavaScript"></script>
64
-
65
83
  <footer class="footer" id="psdi-footer"></footer>
66
84
 
67
85
  </body>
@@ -7,16 +7,27 @@
7
7
  <html>
8
8
 
9
9
  <head>
10
+
10
11
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
12
  <title>PSDI Data Conversion Service</title>
12
13
  <link rel="icon" type="image/x-icon" href="../img/psdi-icon-dark.svg">
14
+
13
15
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
16
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
17
+
18
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
19
+
20
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
21
+ crossorigin="anonymous"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
23
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
24
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
25
+
15
26
  <link rel="stylesheet" href="../styles/format.css">
16
27
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
28
  <script src="../javascript/common.js" type="module"></script>
19
29
  <script src="../javascript/psdi-common.js" type="module"></script>
30
+ <script src="../javascript/convertc2x.js" type="module" language="JavaScript"></script>
20
31
  </head>
21
32
 
22
33
  <body marginwidth="0">
@@ -32,36 +43,44 @@
32
43
  </div>
33
44
  </div>
34
45
 
35
- <form name="gui">
36
- <div>
37
- <p>
38
- Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
39
- 'Convert'
40
- uploads and converts the file. The output file is automatically downloaded, along with a log file. If any issues
41
- are
42
- encountered (e.g., the output file does not download), please click on 'Provide Feedback' in the navigation bar.
43
- </p>
44
- <h6 id="heading"></h6>
45
- <p id="convertFile">
46
- <input type="checkbox" checked id="extCheck">Enforce file naming checking to ensure uploaded files (and files
47
- contained in archives) all have the correct extension<br>
48
- <input type="checkbox" id="requestLog">Also download log file for the conversion<br>
49
- Select file to convert:
50
- <br><input type="file" name="fileToUpload" id="fileToUpload"><br>
51
- If you have sensitive data you might prefer to use
52
- <a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
53
- our service.<br>
54
- <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
55
- disabled=true>
56
- </p>
46
+ <form name="gui" class="gui">
47
+ <div class="max-width-box">
48
+ <div>
49
+ <a href="../../">
50
+ <input type="button" class="button" value=" ← Return to Format Selection " name="returnHome" id="returnHome">
51
+ </a>
52
+ <br>
53
+ <br>
54
+ <p>
55
+ Click on 'Choose file' and then select an input file of the correct format (and extension). Clicking on
56
+ 'Convert' uploads and converts the file. The output file is automatically downloaded, along with a log file.
57
+ If any issues are encountered (e.g., the output file does not download), please click on 'Provide Feedback' in
58
+ the navigation bar.
59
+ </p>
60
+ <h6 id="heading"></h6>
61
+ <p id="convertFile">
62
+ <input type="checkbox" checked id="extCheck"> Enforce file naming checking to ensure uploaded files (and files
63
+ contained in archives) all have the correct extension<br>
64
+ <input type="checkbox" id="requestLog"> Also download log file for the conversion<br>
65
+ Select file to convert<span class="max-file-size"></span>:
66
+ <br>
67
+ <input type="file" name="fileToUpload" id="fileToUpload">
68
+ <input type="button" class="button" value=" Clear Uploaded File " name="clearUpload" id="clearUpload">
69
+ <br>
70
+ If you have sensitive data you might prefer to use
71
+ <a href="download.htm">one of our downloadable tools or Python library</a> rather than uploading your data to
72
+ our service.<br>
73
+ <span class="convert-button-and-spinner">
74
+ <input type="button" class="button init-disabled" value=" Convert " name="uploadButton" id="uploadButton"
75
+ disabled=true>
76
+ <span class="loading-spinner spinner-border"></span>
77
+ </span>
78
+ </p>
79
+ </div>
80
+ <div class="largeGap"></div>
57
81
  </div>
58
- <div class="largeGap"></div>
59
82
  </form>
60
83
 
61
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
62
- crossorigin="anonymous"></script>
63
- <script src="../javascript/convertc2x.js" type="module" language="JavaScript"></script>
64
-
65
84
  <footer class="footer" id="psdi-footer"></footer>
66
85
 
67
86
  </body>
@@ -13,8 +13,11 @@
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
15
  <link rel="stylesheet" href="../styles/format.css">
16
+
17
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
+ crossorigin="anonymous"></script>
19
+
16
20
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
21
  <script src="../javascript/common.js" type="module"></script>
19
22
  <script src="../javascript/psdi-common.js" type="module"></script>
20
23
  </head>
@@ -85,9 +88,6 @@
85
88
  </div>
86
89
  </form>
87
90
 
88
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
89
- crossorigin="anonymous"></script>
90
-
91
91
  <footer class="footer" id="psdi-footer"></footer>
92
92
 
93
93
  </body>
@@ -13,8 +13,11 @@
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
15
  <link rel="stylesheet" href="../styles/format.css">
16
+
17
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
+ crossorigin="anonymous"></script>
19
+
16
20
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
21
  <script src="../javascript/common.js" type="module"></script>
19
22
  <script src="../javascript/psdi-common.js" type="module"></script>
20
23
  </head>
@@ -13,8 +13,11 @@
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
15
  <link rel="stylesheet" href="../styles/format.css">
16
+
17
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
+ crossorigin="anonymous"></script>
19
+
16
20
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
21
  <script src="../javascript/common.js" type="module"></script>
19
22
  <script src="../javascript/psdi-common.js" type="module"></script>
20
23
  </head>
@@ -44,9 +47,6 @@
44
47
  </div>
45
48
  </form>
46
49
 
47
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
48
- crossorigin="anonymous"></script>
49
-
50
50
  <footer class="footer" id="psdi-footer"></footer>
51
51
 
52
52
  </body>
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </div>
18
18
  <div class="navbar__items navbar__items--right">
19
- <!-- This file contains the links that will appear in the top-right of the header bar for .html files in the index.htm page. --> <a href="./" class="navbar__item navbar__link">Home</a> <a href="static/content/report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="static/content/feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="static/content/documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="static/content/accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto: psdi@soton.ac.uk" class="navbar__item navbar__link" id="mail">Contact</a>
19
+ <!-- This file contains the links that will appear in the top-right of the header bar for .html files in the index.htm page. --> <a href="./" class="navbar__item navbar__link">Home</a> <a href="static/content/report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="static/content/feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="static/content/documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="static/content/download.htm" class="navbar__item navbar__link service-only">Download</a> <a href="static/content/accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto: psdi@soton.ac.uk" class="navbar__item navbar__link" id="mail">Contact</a>
20
20
  <button class="clean-btn color-mode-toggle" title="Switch between dark and light mode"
21
21
  aria-label="Lightmode/darkmode toggle button">
22
22
  <img src="static/img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </div>
18
18
  <div class="navbar__items navbar__items--right">
19
- <!-- This file contains the links that will appear in the top-right of the header bar for .html files in this directory. --> <a href="../../" class="navbar__item navbar__link">Home</a> <a href="report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto:support@psdi.ac.uk" class="navbar__item navbar__link" id="mail">Contact Us</a>
19
+ <!-- This file contains the links that will appear in the top-right of the header bar for .html files in this directory. --> <a href="../../" class="navbar__item navbar__link">Home</a> <a href="report.htm" class="navbar__item navbar__link">Report Missing Format/Conversion</a> <a href="feedback.htm" class="navbar__item navbar__link">Provide Feedback</a> <a href="documentation.htm" class="navbar__item navbar__link">Documentation</a> <a href="download.htm" class="navbar__item navbar__link service-only">Download</a> <a href="accessibility.htm" class="navbar__item navbar__link">Accessibility</a> <a href="mailto:support@psdi.ac.uk" class="navbar__item navbar__link" id="mail">Contact Us</a>
20
20
  <button class="clean-btn color-mode-toggle" title="Switch between dark and light mode"
21
21
  aria-label="Lightmode/darkmode toggle button">
22
22
  <img src="../img/colormode-toggle-lm.svg" alt="Lightmode toggle icon"
@@ -13,10 +13,16 @@
13
13
  <link href="https://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
14
14
  <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700" rel="stylesheet" type="text/css">
15
15
  <link rel="stylesheet" href="../styles/format.css">
16
+
17
+ <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
18
+ crossorigin="anonymous"></script>
19
+ <script src="https://cdn.jsdelivr.net/jquery.dirtyforms/2.0.0/jquery.dirtyforms.min.js"></script>
20
+
16
21
  <script src="../javascript/load_accessibility.js"></script>
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
18
22
  <script src="../javascript/common.js" type="module"></script>
19
23
  <script src="../javascript/psdi-common.js" type="module"></script>
24
+ <script src="../javascript/report.js" type="module" language="JavaScript"></script>
25
+
20
26
  </head>
21
27
 
22
28
  <body marginwidth="0">
@@ -32,7 +38,7 @@
32
38
  </div>
33
39
  </div>
34
40
 
35
- <form name="gui" class="service-only">
41
+ <form name="gui" class="gui service-only">
36
42
  <div class="max-width-box">
37
43
  <p>Select the type of report (missing file format or conversion) and then follow the instructions that appear.
38
44
  <p><b>Finally:</b> click on 'Report.'</p><br>
@@ -81,7 +87,7 @@
81
87
  </div>
82
88
  </form>
83
89
 
84
- <form name="gui" class="local-only">
90
+ <form name="gui" class="gui local-only">
85
91
  <div class="max-width-box">
86
92
  <div class="smallGap"></div>
87
93
  <p>
@@ -93,10 +99,6 @@
93
99
  </div>
94
100
  </form>
95
101
 
96
- <script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
97
- crossorigin="anonymous"></script>
98
- <script src="../javascript/report.js" type="module" language="JavaScript"></script>
99
-
100
102
  <footer class="footer" id="psdi-footer"></footer>
101
103
 
102
104
  </body>
@@ -4,6 +4,26 @@
4
4
  * @author Bryan Gillis
5
5
  */
6
6
 
7
+ export function initDirtyForms() {
8
+ $("form.gui").dirtyForms();
9
+ }
10
+
11
+ export function cleanDirtyForms() {
12
+ $('form.gui').dirtyForms('setClean');
13
+ }
14
+
15
+ export function dirtyDirtyForms() {
16
+ $('form.gui').dirtyForms('setDirty');
17
+ }
18
+
19
+ export function enableDirtyForms() {
20
+ $('form.gui').removeClass($.DirtyForms.ignoreClass);
21
+ }
22
+
23
+ export function disableDirtyForms() {
24
+ $('form.gui').addClass($.DirtyForms.ignoreClass);
25
+ }
26
+
7
27
 
8
28
  /**
9
29
  * Gets whether or not the app is operating in "Service mode"
@@ -10,14 +10,13 @@ import { getInputFlags, getOutputFlags, getInputArgFlags, getOutputArgFlags } fr
10
10
  import { commonConvertReady, convertFile, getExtCheck, splitArchiveExt, isArchiveExt } from "./convert_common.js"
11
11
 
12
12
  var token = "",
13
- max_file_size = 0,
14
13
  in_ext = "",
15
14
  out_ext = "",
16
15
  in_str = "",
17
16
  out_str = "";
18
17
 
19
18
  $(document).ready(function () {
20
- [token, max_file_size, in_str, in_ext, out_str, out_ext] = commonConvertReady("Open Babel");
19
+ [token, in_str, in_ext, out_str, out_ext] = commonConvertReady("Open Babel");
21
20
 
22
21
  $('input[name="coordinates"]').change(coordOptionAvailability);
23
22
  $("#uploadButton").click(submitFile);