igs-slm 0.1.4b0__py3-none-any.whl → 0.1.5b1__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.
- igs_slm-0.1.5b1.dist-info/METADATA +115 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/RECORD +193 -173
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/WHEEL +1 -1
- igs_slm-0.1.5b1.dist-info/entry_points.txt +3 -0
- {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info/licenses}/LICENSE +1 -1
- slm/__init__.py +17 -14
- slm/admin.py +32 -5
- slm/api/edit/views.py +22 -9
- slm/api/public/views.py +9 -7
- slm/api/views.py +45 -6
- slm/apps.py +28 -6
- slm/authentication.py +3 -2
- slm/bin/startproject.py +102 -31
- slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/urls.py +15 -0
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
- slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +1 -0
- slm/context.py +5 -0
- slm/defines/AlertLevel.py +10 -2
- slm/defines/AntennaCalibration.py +6 -4
- slm/defines/AntennaFeatures.py +12 -9
- slm/defines/AntennaReferencePoint.py +12 -10
- slm/defines/Aspiration.py +4 -2
- slm/defines/CardinalDirection.py +6 -4
- slm/defines/CollocationStatus.py +3 -1
- slm/defines/EquipmentState.py +6 -12
- slm/defines/FlagSeverity.py +4 -2
- slm/defines/FractureSpacing.py +7 -5
- slm/defines/FrequencyStandardType.py +6 -4
- slm/defines/GeodesyMLVersion.py +2 -0
- slm/defines/Instrumentation.py +9 -7
- slm/defines/LogEntryType.py +17 -15
- slm/defines/SLMFileType.py +4 -2
- slm/defines/SiteFileUploadStatus.py +7 -24
- slm/defines/SiteLogFormat.py +8 -32
- slm/defines/SiteLogStatus.py +9 -28
- slm/defines/TectonicPlates.py +18 -16
- slm/manage.py +24 -0
- slm/management/commands/check_upgrade.py +142 -0
- slm/management/commands/generate_sinex.py +110 -92
- slm/management/commands/head_from_index.py +11 -8
- slm/management/commands/import_archive.py +27 -18
- slm/management/commands/import_equipment.py +1 -1
- slm/management/commands/sitelog.py +1 -3
- slm/management/commands/synchronize.py +1 -1
- slm/management/commands/validate_db.py +6 -4
- slm/map/defines.py +18 -14
- slm/map/templates/slm/map.html +5 -7
- slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
- slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
- slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
- slm/migrations/0004_alter_site_name.py +24 -0
- slm/migrations/0005_slmversion.py +30 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
- slm/migrations/0018_afix_deleted.py +3 -1
- slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
- slm/migrations/0031_alter_antenna_features.py +44 -0
- slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
- slm/migrations/add_index_order_index.py +54 -0
- slm/migrations/normalize_index.py +147 -0
- slm/migrations/simplify_index.py +48 -0
- slm/migrations/verify_index.py +67 -0
- slm/models/__init__.py +2 -0
- slm/models/alerts.py +7 -10
- slm/models/data.py +1 -2
- slm/models/equipment.py +1 -1
- slm/models/fields.py +41 -0
- slm/models/index.py +183 -53
- slm/models/sitelog.py +35 -38
- slm/models/system.py +72 -31
- slm/models/user.py +1 -1
- slm/parsing/__init__.py +33 -16
- slm/parsing/legacy/binding.py +65 -34
- slm/parsing/legacy/parser.py +2 -2
- slm/parsing/xsd/binding.py +1 -1
- slm/parsing/xsd/parser.py +1 -2
- slm/receivers/__init__.py +2 -2
- slm/receivers/index.py +2 -1
- slm/receivers/migration.py +21 -0
- slm/settings/__init__.py +192 -4
- slm/settings/assets.py +26 -0
- slm/settings/auth.py +18 -14
- slm/settings/ckeditor.py +12 -6
- slm/settings/debug.py +2 -2
- slm/settings/emails.py +50 -0
- slm/settings/internationalization.py +8 -6
- slm/settings/logging.py +100 -88
- slm/settings/platform/darwin.py +16 -6
- slm/settings/rest.py +20 -15
- slm/settings/root.py +192 -98
- slm/settings/routines.py +5 -1
- slm/settings/secrets.py +20 -31
- slm/settings/security.py +7 -5
- slm/settings/slm.py +35 -23
- slm/settings/static_templates.py +12 -9
- slm/settings/templates.py +31 -25
- slm/settings/uploads.py +33 -5
- slm/settings/urls.py +7 -12
- slm/settings/validation.py +165 -165
- slm/signals.py +3 -2
- slm/static/slm/css/style.css +37 -36
- slm/static/slm/js/autocomplete.js +6 -4
- slm/static/slm/js/enums.js +6 -5
- slm/static/slm/js/file_modal.js +62 -0
- slm/static/slm/js/form.js +3 -3
- slm/static/slm/js/formWidget.js +3 -3
- slm/static/slm/js/persistable.js +5 -1
- slm/templates/admin/base.html +1 -0
- slm/templates/rest_framework/base.html +23 -11
- slm/templates/slm/base.html +27 -22
- slm/templates/slm/forms/widgets/auto_complete.html +12 -11
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
- slm/templates/slm/station/download.html +6 -6
- slm/templates/slm/station/edit.html +9 -17
- slm/templates/slm/station/review.html +5 -3
- slm/templates/slm/station/upload.html +4 -1
- slm/templates/slm/station/uploads/legacy.html +1 -1
- slm/templates/slm/widgets/alert_scroll.html +4 -8
- slm/templates/slm/widgets/filelist.html +0 -5
- slm/templates/slm/widgets/log_scroll.html +2 -13
- slm/templates/slm/widgets/stationlist.html +2 -8
- slm/templatetags/slm.py +70 -9
- slm/utils.py +13 -4
- slm/validators.py +14 -14
- slm/views.py +6 -6
- slm/wsgi.py +16 -0
- igs_slm-0.1.4b0.dist-info/METADATA +0 -154
- igs_slm-0.1.4b0.dist-info/entry_points.txt +0 -3
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +0 -7
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
slm/static/slm/css/style.css
CHANGED
|
@@ -666,9 +666,9 @@ button.slm-subsection {
|
|
|
666
666
|
/* Button Status CSS */
|
|
667
667
|
button.slm-status-updated,
|
|
668
668
|
button.nav-link.slm-status-updated {
|
|
669
|
-
border-left: 10px solid #0079AD;
|
|
670
|
-
border-bottom-left-radius: 10px;
|
|
671
|
-
border-top-left-radius: 10px;
|
|
669
|
+
border-left: 10px solid #0079AD !important;
|
|
670
|
+
border-bottom-left-radius: 10px !important;
|
|
671
|
+
border-top-left-radius: 10px !important;
|
|
672
672
|
}
|
|
673
673
|
button.slm-status-updated.slm-section-deleted {
|
|
674
674
|
border-left: 10px solid #d3d3d3;
|
|
@@ -682,19 +682,20 @@ button.slm-status-updated span.section-number {
|
|
|
682
682
|
}
|
|
683
683
|
button.slm-status-published,
|
|
684
684
|
button.nav-link.slm-status-published {
|
|
685
|
-
border-left: 10px solid #0D820D;
|
|
686
|
-
border-bottom-left-radius: 10px;
|
|
687
|
-
border-top-left-radius: 10px;
|
|
685
|
+
border-left: 10px solid #0D820D !important;
|
|
686
|
+
border-bottom-left-radius: 10px !important;
|
|
687
|
+
border-top-left-radius: 10px !important;
|
|
688
688
|
}
|
|
689
689
|
button.slm-status-published span.section-number {
|
|
690
690
|
background-color: #0D820D;
|
|
691
691
|
color: whitesmoke;
|
|
692
692
|
}
|
|
693
|
+
|
|
693
694
|
button.slm-status-in-review,
|
|
694
695
|
button.nav-link.slm-status-in-review {
|
|
695
|
-
border-left: 10px solid #0079AD;
|
|
696
|
-
border-bottom-left-radius: 10px;
|
|
697
|
-
border-top-left-radius: 10px;
|
|
696
|
+
border-left: 10px solid #0079AD !important;
|
|
697
|
+
border-bottom-left-radius: 10px !important;
|
|
698
|
+
border-top-left-radius: 10px !important;
|
|
698
699
|
}
|
|
699
700
|
button.slm-status-in-review span.section-number {
|
|
700
701
|
background-color: #0079AD;
|
|
@@ -702,9 +703,9 @@ button.slm-status-in-review span.section-number {
|
|
|
702
703
|
}
|
|
703
704
|
button.slm-status-proposed,
|
|
704
705
|
button.nav-link.slm-status-proposed {
|
|
705
|
-
border-left: 10px solid #913D88;
|
|
706
|
-
border-bottom-left-radius: 10px;
|
|
707
|
-
border-top-left-radius: 10px;
|
|
706
|
+
border-left: 10px solid #913D88 !important;
|
|
707
|
+
border-bottom-left-radius: 10px !important;
|
|
708
|
+
border-top-left-radius: 10px !important;
|
|
708
709
|
}
|
|
709
710
|
button.slm-status-proposed span.section-number {
|
|
710
711
|
background-color: #913D88;
|
|
@@ -712,9 +713,9 @@ button.slm-status-proposed span.section-number {
|
|
|
712
713
|
}
|
|
713
714
|
button.slm-status-former,
|
|
714
715
|
button.nav-link.slm-status-former {
|
|
715
|
-
border-left: 10px solid #3D4543;
|
|
716
|
-
border-bottom-left-radius: 10px;
|
|
717
|
-
border-top-left-radius: 10px;
|
|
716
|
+
border-left: 10px solid #3D4543 !important;
|
|
717
|
+
border-bottom-left-radius: 10px !important;
|
|
718
|
+
border-top-left-radius: 10px !important;
|
|
718
719
|
}
|
|
719
720
|
button.slm-status-former span.section-number {
|
|
720
721
|
background-color: #3D4543;
|
|
@@ -722,9 +723,9 @@ button.slm-status-former span.section-number {
|
|
|
722
723
|
}
|
|
723
724
|
button.slm-status-suspended,
|
|
724
725
|
button.nav-link.slm-status-suspended {
|
|
725
|
-
border-left: 10px solid #E0041A;
|
|
726
|
-
border-bottom-left-radius: 10px;
|
|
727
|
-
border-top-left-radius: 10px;
|
|
726
|
+
border-left: 10px solid #E0041A !important;
|
|
727
|
+
border-bottom-left-radius: 10px !important;
|
|
728
|
+
border-top-left-radius: 10px !important;
|
|
728
729
|
}
|
|
729
730
|
button.slm-status-suspended span.section-number {
|
|
730
731
|
background-color: #E0041A;
|
|
@@ -732,9 +733,9 @@ button.slm-status-suspended span.section-number {
|
|
|
732
733
|
}
|
|
733
734
|
button.slm-status-empty,
|
|
734
735
|
button.nav-link.slm-status-empty {
|
|
735
|
-
border-left: 10px solid #d3d3d3;
|
|
736
|
-
border-bottom-left-radius: 10px;
|
|
737
|
-
border-top-left-radius: 10px;
|
|
736
|
+
border-left: 10px solid #d3d3d3 !important;
|
|
737
|
+
border-bottom-left-radius: 10px !important;
|
|
738
|
+
border-top-left-radius: 10px !important;
|
|
738
739
|
}
|
|
739
740
|
button.slm-status-empty span.section-number {
|
|
740
741
|
background-color: #d3d3d3;
|
|
@@ -743,33 +744,33 @@ button.slm-status-empty span.section-number {
|
|
|
743
744
|
/* Upload Buttons CSS */
|
|
744
745
|
button.slm-upload-unpublished,
|
|
745
746
|
button.nav-link.slm-upload-unpublished {
|
|
746
|
-
border-left: 10px solid #0079AD;
|
|
747
|
-
border-bottom-left-radius: 10px;
|
|
748
|
-
border-top-left-radius: 10px;
|
|
747
|
+
border-left: 10px solid #0079AD !important;
|
|
748
|
+
border-bottom-left-radius: 10px !important;
|
|
749
|
+
border-top-left-radius: 10px !important;
|
|
749
750
|
}
|
|
750
751
|
button.slm-upload-published,
|
|
751
752
|
button.nav-link.slm-upload-published {
|
|
752
|
-
border-left: 10px solid #0D820D;
|
|
753
|
-
border-bottom-left-radius: 10px;
|
|
754
|
-
border-top-left-radius: 10px;
|
|
753
|
+
border-left: 10px solid #0D820D !important;
|
|
754
|
+
border-bottom-left-radius: 10px !important;
|
|
755
|
+
border-top-left-radius: 10px !important;
|
|
755
756
|
}
|
|
756
757
|
button.slm-upload-invalid,
|
|
757
758
|
button.nav-link.slm-upload-invalid {
|
|
758
|
-
border-left: 10px solid #8b0000;
|
|
759
|
-
border-bottom-left-radius: 10px;
|
|
760
|
-
border-top-left-radius: 10px;
|
|
759
|
+
border-left: 10px solid #8b0000 !important;
|
|
760
|
+
border-bottom-left-radius: 10px !important;
|
|
761
|
+
border-top-left-radius: 10px !important;
|
|
761
762
|
}
|
|
762
763
|
button.slm-upload-warnings,
|
|
763
764
|
button.nav-link.slm-upload-warnings {
|
|
764
|
-
border-left: 10px solid darkorange;
|
|
765
|
-
border-bottom-left-radius: 10px;
|
|
766
|
-
border-top-left-radius: 10px;
|
|
765
|
+
border-left: 10px solid darkorange !important;
|
|
766
|
+
border-bottom-left-radius: 10px !important;
|
|
767
|
+
border-top-left-radius: 10px !important;
|
|
767
768
|
}
|
|
768
769
|
button.slm-upload-valid,
|
|
769
770
|
button.nav-link.slm-upload-valid {
|
|
770
|
-
border-left: 10px solid #0D820D;
|
|
771
|
-
border-bottom-left-radius: 10px;
|
|
772
|
-
border-top-left-radius: 10px;
|
|
771
|
+
border-left: 10px solid #0D820D !important;
|
|
772
|
+
border-bottom-left-radius: 10px !important;
|
|
773
|
+
border-top-left-radius: 10px !important;
|
|
773
774
|
}
|
|
774
775
|
/* Accordion CSS */
|
|
775
776
|
.accordion,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class AutoComplete extends FormWidget {
|
|
1
|
+
class AutoComplete extends slm.FormWidget {
|
|
4
2
|
/**
|
|
5
3
|
* https://api.jqueryui.com/autocomplete/
|
|
6
4
|
*
|
|
@@ -264,7 +262,7 @@ export class AutoComplete extends FormWidget {
|
|
|
264
262
|
changed() {}
|
|
265
263
|
}
|
|
266
264
|
|
|
267
|
-
|
|
265
|
+
class AutoCompleteMultiple extends AutoComplete {
|
|
268
266
|
/**
|
|
269
267
|
* https://github.com/devbridge/jQuery-Autocomplete
|
|
270
268
|
*
|
|
@@ -339,3 +337,7 @@ export class AutoCompleteMultiple extends AutoComplete {
|
|
|
339
337
|
*/
|
|
340
338
|
}
|
|
341
339
|
}
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
slm.AutoComplete = AutoComplete;
|
|
343
|
+
slm.AutoCompleteMultiple = AutoCompleteMultiple;
|
slm/static/slm/js/enums.js
CHANGED
|
@@ -201,12 +201,12 @@ class SiteFileUploadStatus {
|
|
|
201
201
|
}
|
|
202
202
|
class SiteLogFormat {
|
|
203
203
|
|
|
204
|
-
static LEGACY = new SiteLogFormat(1, "LEGACY", "Legacy (ASCII)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "legacy"]);
|
|
205
|
-
static GEODESY_ML = new SiteLogFormat(2, "GEODESY_ML", "GeodesyML", "application/xml", "bi bi-filetype-xml", "xml", ["xml"]);
|
|
206
|
-
static JSON = new SiteLogFormat(3, "JSON", "JSON", "application/json", "bi bi-filetype-json", "json", ["json", "js"]);
|
|
207
|
-
static ASCII_9CHAR = new SiteLogFormat(4, "ASCII_9CHAR", "ASCII (9-Char)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "9char"]);
|
|
204
|
+
static LEGACY = new SiteLogFormat(1, "LEGACY", "Legacy (ASCII)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "legacy"], ["txt", "sitelog"]);
|
|
205
|
+
static GEODESY_ML = new SiteLogFormat(2, "GEODESY_ML", "GeodesyML", "application/xml", "bi bi-filetype-xml", "xml", ["xml"], ["gml"]);
|
|
206
|
+
static JSON = new SiteLogFormat(3, "JSON", "JSON", "application/json", "bi bi-filetype-json", "json", ["json", "js"], ["js"]);
|
|
207
|
+
static ASCII_9CHAR = new SiteLogFormat(4, "ASCII_9CHAR", "ASCII (9-Char)", "text/plain", "bi bi-file-text", "log", ["text", "txt", "9char"], ["txt", "sitelog"]);
|
|
208
208
|
|
|
209
|
-
constructor (value, name, label, mimetype, icon, ext, alts) {
|
|
209
|
+
constructor (value, name, label, mimetype, icon, ext, alts, alt_exts) {
|
|
210
210
|
this.value = value;
|
|
211
211
|
this.name = name;
|
|
212
212
|
this.label = label;
|
|
@@ -214,6 +214,7 @@ class SiteLogFormat {
|
|
|
214
214
|
this.icon = icon;
|
|
215
215
|
this.ext = ext;
|
|
216
216
|
this.alts = alts;
|
|
217
|
+
this.alt_exts = alt_exts;
|
|
217
218
|
}
|
|
218
219
|
|
|
219
220
|
static ciCompare(a, b) {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
(function($) {
|
|
2
|
+
$(document).ready(function() {
|
|
3
|
+
$('.view-file').on('click', function(e) {
|
|
4
|
+
e.preventDefault();
|
|
5
|
+
const url = $(this).data('url');
|
|
6
|
+
const modal = $('<div class="modal"/>').css({
|
|
7
|
+
position: 'fixed',
|
|
8
|
+
top: '10%',
|
|
9
|
+
left: '10%',
|
|
10
|
+
width: '80%',
|
|
11
|
+
height: '80%',
|
|
12
|
+
background: '#fff',
|
|
13
|
+
border: '1px solid #ccc',
|
|
14
|
+
padding: '20px',
|
|
15
|
+
overflow: 'auto',
|
|
16
|
+
zIndex: 10000
|
|
17
|
+
}).appendTo('body');
|
|
18
|
+
|
|
19
|
+
const overlay = $('<div class="modal-overlay"/>').css({
|
|
20
|
+
position: 'fixed',
|
|
21
|
+
top: 0, left: 0, right: 0, bottom: 0,
|
|
22
|
+
background: 'rgba(0, 0, 0, 0.5)',
|
|
23
|
+
zIndex: 9999
|
|
24
|
+
}).appendTo('body');
|
|
25
|
+
|
|
26
|
+
modal.append(
|
|
27
|
+
$('<span class="close-modal">×</span>').css({
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
top: '10px',
|
|
30
|
+
right: '15px',
|
|
31
|
+
fontSize: '24px',
|
|
32
|
+
fontWeight: 'bold',
|
|
33
|
+
cursor: 'pointer',
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
modal.append('<div class="modal-content"></div>');
|
|
37
|
+
|
|
38
|
+
$.get(url, function(data) {
|
|
39
|
+
let content;
|
|
40
|
+
|
|
41
|
+
// Check if response is an XML Document
|
|
42
|
+
const isXml = data instanceof XMLDocument && data.documentElement;
|
|
43
|
+
|
|
44
|
+
if (isXml) {
|
|
45
|
+
const xmlString = new XMLSerializer().serializeToString(data.documentElement);
|
|
46
|
+
const escaped = $('<div/>').text(xmlString).html(); // escape XML
|
|
47
|
+
content = `<pre style="white-space: pre-wrap; word-break: break-word;">${escaped}</pre>`;
|
|
48
|
+
} else {
|
|
49
|
+
// Fallback for plain text or JSON
|
|
50
|
+
const escaped = $('<div/>').text(data).html(); // escape if string
|
|
51
|
+
content = `<pre style="white-space: pre-wrap; word-break: break-word;">${escaped}</pre>`;
|
|
52
|
+
}
|
|
53
|
+
modal.find('.modal-content').html(content);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
modal.on('click', '.close-modal', function() {
|
|
57
|
+
modal.remove();
|
|
58
|
+
overlay.remove();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
})(django.jQuery);
|
slm/static/slm/js/form.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class Form extends Persistable {
|
|
1
|
+
class Form extends slm.Persistable {
|
|
4
2
|
/**
|
|
5
3
|
* This class encapsulates reading and writing json data to/from html forms.
|
|
6
4
|
* This is less trivial than you might assume and there are some special case
|
|
@@ -402,3 +400,5 @@ export class Form extends Persistable {
|
|
|
402
400
|
this.#changeCallbacks.push(callback);
|
|
403
401
|
}
|
|
404
402
|
}
|
|
403
|
+
|
|
404
|
+
slm.Form = Form;
|
slm/static/slm/js/formWidget.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export class FormWidget extends Persistable {
|
|
1
|
+
class FormWidget extends slm.Persistable {
|
|
4
2
|
|
|
5
3
|
#container;
|
|
6
4
|
|
|
@@ -21,3 +19,5 @@ export class FormWidget extends Persistable {
|
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
}
|
|
22
|
+
|
|
23
|
+
slm.FormWidget = FormWidget;
|
slm/static/slm/js/persistable.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
if (typeof slm === 'undefined' || slm == null) { var slm = {}; }
|
|
2
|
+
|
|
3
|
+
class Persistable {
|
|
2
4
|
/**
|
|
3
5
|
* A simple interface defining a persistable component. Data is persisted
|
|
4
6
|
* in session memory.
|
|
@@ -31,3 +33,5 @@ export class Persistable {
|
|
|
31
33
|
*/
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
|
|
37
|
+
slm.Persistable = Persistable;
|
slm/templates/admin/base.html
CHANGED
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
|
26
26
|
|
|
27
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.
|
|
28
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.
|
|
27
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/themes/base/jquery-ui.min.css" integrity="sha512-TFee0335YRJoyiqz8hA8KV3P0tXa5CpRBSoM0Wnkn7JoJx1kaq1yXL/rb8YFpWXkMOjRcv5txv+C6UluttluCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
28
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
29
29
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
30
30
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
31
31
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
|
32
32
|
|
|
33
33
|
<!-- https://github.com/lipis/flag-icons -->
|
|
34
|
-
<link rel="stylesheet" href="https://
|
|
34
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icons/7.3.2/css/flag-icons.min.css" integrity="sha512-+WVTaUIzUw5LFzqIqXOT3JVAc5SrMuvHm230I9QAZa6s+QRk8NDPswbHo2miIZj3yiFyV9lAgzO1wVrjdoO4tw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
35
35
|
|
|
36
36
|
{% compress css %}
|
|
37
37
|
<link rel='stylesheet' type='text/css' media='screen' href='{% static "slm/css/style.css" %}'>
|
|
@@ -304,14 +304,26 @@
|
|
|
304
304
|
csrfToken: "{% if request %}{{ csrf_token }}{% endif %}"
|
|
305
305
|
};
|
|
306
306
|
</script>
|
|
307
|
-
<script src="
|
|
308
|
-
<script src="
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
307
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
308
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js" integrity="sha512-MSOo1aY+3pXCOCdGAYoBZ6YGI0aragoQsg1mKKBHXCYPIWxamwOE7Drh+N5CPgGI5SA9IEKJiPjdfqWFWmZtRA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
309
|
+
{% compress js %}
|
|
310
|
+
<script src="{% static "rest_framework/js/ajax-form.js" %}"></script>
|
|
311
|
+
<script src="{% static "rest_framework/js/csrf.js" %}"></script>
|
|
312
|
+
<script src="{% static "rest_framework/js/bootstrap.bundle.min.js" %}"></script>
|
|
313
|
+
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
|
314
|
+
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
|
315
|
+
{% endcompress %}
|
|
316
|
+
{% compress js %}
|
|
317
|
+
<script src="{% static 'slm/js/fileIcons.js' %}"></script>
|
|
318
|
+
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
319
|
+
<script src="{% static 'urls.js' %}"></script>
|
|
320
|
+
<script src="{% static 'slm/js/time24.js' %}"></script>
|
|
321
|
+
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
322
|
+
<script src="{% static 'slm/js/persistable.js' %}"></script>
|
|
323
|
+
<script src="{% static 'slm/js/form.js' %}"></script>
|
|
324
|
+
<script src="{% static 'slm/js/formWidget.js' %}"></script>
|
|
325
|
+
<script src="{% static 'slm/js/autocomplete.js' %}"></script>
|
|
326
|
+
{% endcompress %}
|
|
315
327
|
|
|
316
328
|
<script>
|
|
317
329
|
$(document).ready(function() {
|
slm/templates/slm/base.html
CHANGED
|
@@ -26,15 +26,15 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
26
26
|
<link rel="shortcut icon" type="image/png" href="{% static 'slm/img/favicon.ico' %}"/>
|
|
27
27
|
|
|
28
28
|
{% block stylesheets %}
|
|
29
|
-
<link href="https://
|
|
30
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.
|
|
29
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
30
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
31
31
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
32
32
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
33
33
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
|
34
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.
|
|
34
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/themes/base/jquery-ui.min.css" integrity="sha512-TFee0335YRJoyiqz8hA8KV3P0tXa5CpRBSoM0Wnkn7JoJx1kaq1yXL/rb8YFpWXkMOjRcv5txv+C6UluttluCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
35
35
|
|
|
36
36
|
<!-- https://github.com/lipis/flag-icons -->
|
|
37
|
-
<link rel="stylesheet" href="https://
|
|
37
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icons/7.3.2/css/flag-icons.min.css" integrity="sha512-+WVTaUIzUw5LFzqIqXOT3JVAc5SrMuvHm230I9QAZa6s+QRk8NDPswbHo2miIZj3yiFyV9lAgzO1wVrjdoO4tw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
38
38
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha512-H9jrZiiopUdsLpg94A333EfumgUBpO9MdbxStdeITo+KEIMaNfHNvwyjjDJb+ERPaRS6DpyRlKbvPUasNItRyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
39
39
|
|
|
40
40
|
{% compress css %}
|
|
@@ -45,29 +45,34 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
{% block javascript %}
|
|
48
|
-
<script src="https://
|
|
49
|
-
<script src="https://
|
|
50
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/
|
|
48
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
49
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.14.1/jquery-ui.min.js" integrity="sha512-MSOo1aY+3pXCOCdGAYoBZ6YGI0aragoQsg1mKKBHXCYPIWxamwOE7Drh+N5CPgGI5SA9IEKJiPjdfqWFWmZtRA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
50
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
51
51
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" integrity="sha512-uURl+ZXMBrF4AwGaWmEetzrd+J5/8NRkWAvJx5sbPSSuOb0bZLqf+tOzniObO00BjHa/dD7gub9oCGMLPQHtQA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
52
52
|
|
|
53
53
|
{% compress js %}
|
|
54
|
-
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
55
|
-
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
56
54
|
<script src="{% static 'slm/js/fileIcons.js' %}"></script>
|
|
55
|
+
<script src="{% static 'slm/js/slm.js' %}"></script>
|
|
57
56
|
<script src="{% static 'urls.js' %}"></script>
|
|
58
57
|
<script src="{% static 'slm/js/time24.js' %}"></script>
|
|
59
|
-
<script>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
xhr.setRequestHeader(
|
|
66
|
-
'X-CSRFToken', '{{ csrf_token }}');
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
</script>
|
|
58
|
+
<script src="{% static 'slm/js/enums.js' %}"></script>
|
|
59
|
+
<script src="{% static 'slm/js/persistable.js' %}"></script>
|
|
60
|
+
<script src="{% static 'slm/js/form.js' %}"></script>
|
|
61
|
+
<script src="{% static 'slm/js/formWidget.js' %}"></script>
|
|
62
|
+
<script src="{% static 'slm/js/autocomplete.js' %}"></script>
|
|
70
63
|
{% endcompress %}
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
slm.isModerator = {% if is_moderator %}true{% else %}false{% endif %};
|
|
67
|
+
slm.canPublish = {% if can_publish %}true{% else %}false{% endif %};
|
|
68
|
+
$.ajaxSetup({
|
|
69
|
+
beforeSend: function (xhr)
|
|
70
|
+
{
|
|
71
|
+
xhr.setRequestHeader(
|
|
72
|
+
'X-CSRFToken', '{{ csrf_token }}');
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
</script>
|
|
71
76
|
{% endblock javascript %}
|
|
72
77
|
{% endblock head %}
|
|
73
78
|
</head>
|
|
@@ -104,7 +109,7 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
104
109
|
<div class="container-fluid mx-4">
|
|
105
110
|
{% block branding %}
|
|
106
111
|
<div class="d-flex align-items-center w-50">
|
|
107
|
-
<a href="{% url "slm:home" %}" class="navbar-brand"><img id="logo" class="me-4" src="{% static 'slm/img/slm-logo.svg' %}" alt="SLM"> Site Log Manager
|
|
112
|
+
<a href="{% url "slm:home" %}" class="navbar-brand"><img id="logo" class="me-4" src="{% static 'slm/img/slm-logo.svg' %}" alt="SLM"> Site Log Manager {{ slm_version }}</a>
|
|
108
113
|
</div>
|
|
109
114
|
{% endblock branding %}
|
|
110
115
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsingNavbar3" title="Navigation">
|
|
@@ -175,7 +180,7 @@ https://docs.djangoproject.com/en/3.2/topics/templates/
|
|
|
175
180
|
</div>
|
|
176
181
|
</body>
|
|
177
182
|
|
|
178
|
-
{% compress js %}
|
|
183
|
+
{% compress js inline %}
|
|
179
184
|
<script type='text/javascript'>
|
|
180
185
|
$(document).ready(function() {
|
|
181
186
|
var options = {
|
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
<label for="{{ widget.attrs.id }}-input" style="display: none">{{ label }}</label>
|
|
7
7
|
<input id="{{ widget.attrs.id }}-input" name="{{ widget.name }}" {% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %} type="text" style="display: none">
|
|
8
8
|
|
|
9
|
-
<script
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
<script>
|
|
10
|
+
(() => {
|
|
11
|
+
let widget = new slm.AutoComplete({container: $('fieldset#{{ widget.attrs.id }}-container')});
|
|
12
|
+
let ipt = $('fieldset#{{ widget.attrs.id }}-container input');
|
|
13
|
+
ipt.data('widget', widget);
|
|
14
|
+
if (ipt.val() && !widget.textInput.html()) {
|
|
15
|
+
widget.add(widget.getSuggestion(ipt.val()));
|
|
16
|
+
}
|
|
17
|
+
{% for value in widget|autocomplete_values %}
|
|
18
|
+
widget.add(widget.makeSuggestion(JSON.parse('{{ value|safe }}')));
|
|
19
|
+
{% endfor %}
|
|
20
|
+
})();
|
|
20
21
|
</script>
|
|
21
22
|
</fieldset>
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
<select id='{{widget.attrs.id}}-select' name="{{ widget.name }}" multiple></select>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="select-display"></div>
|
|
10
|
-
<script
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
<script>
|
|
11
|
+
(() => {
|
|
12
|
+
let widget = new slm.AutoCompleteMultiple({container: $('fieldset#{{ widget.attrs.id }}-container')});
|
|
13
|
+
$('fieldset#{{ widget.attrs.id }}-container select').data('widget', widget);
|
|
14
|
+
{% for value in widget|autocomplete_values %}
|
|
15
|
+
widget.add(widget.makeSuggestion(JSON.parse('{{ value|safe }}')));
|
|
16
|
+
{% endfor %}
|
|
17
|
+
})();
|
|
17
18
|
</script>
|
|
18
19
|
</fieldset>
|
|
@@ -29,7 +29,7 @@ Template for Download page.
|
|
|
29
29
|
<i class="bi bi-file-text slm-published" style="font-size:60px;"></i>
|
|
30
30
|
<h2 class="mb-3">{% trans "ASCII (.log)" %}</h2>
|
|
31
31
|
<p class="mb-4">{% trans "Text-based description of the metadata of a GNSS station" %}</p>
|
|
32
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}"{% endif %} download>Download</a>
|
|
32
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?lower_case=1"{% endif %} download>Download</a>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -37,7 +37,7 @@ Template for Download page.
|
|
|
37
37
|
<i class="bi bi-filetype-xml slm-published" style="font-size:60px;"></i>
|
|
38
38
|
<h2 class="mb-3">{% trans "GeodesyML (.xml)" %}</h2>
|
|
39
39
|
<p class="mb-4">{% trans "Machine-readable XML format of the data and metadata of a GNSS station" %}</p>
|
|
40
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}"{% endif %} download>Download</a>
|
|
40
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?lower_case=1"{% endif %} download>Download</a>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -45,7 +45,7 @@ Template for Download page.
|
|
|
45
45
|
<i class="bi bi-filetype-json slm-published" style="font-size:60px;"></i>
|
|
46
46
|
<h2 class="mb-3">{% trans "JSON (.json)" %}</h2>
|
|
47
47
|
<p class="mb-4">{% trans "This is still under development. JavaScript Object Notation format of the data and metadata of a GNSS station" %}</p>
|
|
48
|
-
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?
|
|
48
|
+
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?lower_case=1"{% endif %} download>Download</a>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -59,7 +59,7 @@ Template for Download page.
|
|
|
59
59
|
<h2 class="mb-3">{% trans "ASCII (.log)" %}</h2>
|
|
60
60
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
61
61
|
<p class="mb-4">{% trans "Text-based description of the metadata of a GNSS station" %}</p>
|
|
62
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?unpublished=True"{% endif %} download>Download</a>
|
|
62
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='log' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -68,7 +68,7 @@ Template for Download page.
|
|
|
68
68
|
<h2 class="mb-3">{% trans "GeodesyML (.xml)" %}</h2>
|
|
69
69
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
70
70
|
<p class="mb-4">{% trans "Machine-readable XML format of the data and metadata of a GNSS station" %}</p>
|
|
71
|
-
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?unpublished=True"{% endif %} download>Download</a>
|
|
71
|
+
<a class="btn btn-primary {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='xml' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
72
72
|
</div>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="col-12 col-md-6 col-xl-4 my-3">
|
|
@@ -77,7 +77,7 @@ Template for Download page.
|
|
|
77
77
|
<h2 class="mb-3">{% trans "JSON (.json)" %}</h2>
|
|
78
78
|
<h3 class="mb-3 fs-4">{% trans "MODIFIED/UNPUBLISHED" %}</h3>
|
|
79
79
|
<p class="mb-4">{% trans "This is still under development. JavaScript Object Notation format of the data and metadata of a GNSS station" %}</p>
|
|
80
|
-
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?unpublished=True"{% endif %} download>Download</a>
|
|
80
|
+
<a class="btn btn-primary disabled {% if not station %}disabled{% endif %}" {% if station %}href="{% url 'slm_edit_api:download-detail' site=station format='json' %}?unpublished=True&lower_case=1"{% endif %} download>Download</a>
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
@@ -8,7 +8,7 @@ Add new section capability is not functional.
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
{% extends "slm/station/base.html" %}
|
|
11
|
-
{% load widget_tweaks slm i18n
|
|
11
|
+
{% load widget_tweaks slm i18n %}
|
|
12
12
|
|
|
13
13
|
{% block action_content %}
|
|
14
14
|
<!-- Station Metadata Forms -->
|
|
@@ -108,13 +108,9 @@ Add new section capability is not functional.
|
|
|
108
108
|
<div class="accordion-body">
|
|
109
109
|
{% with flag_id=section_id|to_id:form.instance.id|to_id:"flags" %}
|
|
110
110
|
{{ form.instance.flags }}
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
{% compress js inline %}
|
|
115
|
-
{{ form.media.js }}
|
|
116
|
-
{{ form.flags|json_script:flag_id }}
|
|
117
|
-
{% endcompress %}
|
|
111
|
+
{{ form.media.css }}
|
|
112
|
+
{{ form.media.js }}
|
|
113
|
+
{{ form.flags|json_script:flag_id }}
|
|
118
114
|
{% include 'slm/station/form.html' with form=form form_id=form_inst_id flag_id=flag_id %}
|
|
119
115
|
{% endwith %}
|
|
120
116
|
</div>
|
|
@@ -181,7 +177,7 @@ Add new section capability is not functional.
|
|
|
181
177
|
const newForm = $('#new-form').children().first().clone();
|
|
182
178
|
newForm.find('script').each(function() {
|
|
183
179
|
const newScript = document.createElement('script');
|
|
184
|
-
newScript.type = 'module';
|
|
180
|
+
//newScript.type = 'module';
|
|
185
181
|
$(newScript).html($(this).html().replaceAll('new_form_id', formId));
|
|
186
182
|
$(this).replaceWith(newScript);
|
|
187
183
|
});
|
|
@@ -208,13 +204,9 @@ Add new section capability is not functional.
|
|
|
208
204
|
{% elif forms %}
|
|
209
205
|
{% with form=forms|first %}
|
|
210
206
|
{% with flag_id=section_id|to_id:form.instance.id|to_id:"flags" %}
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
{
|
|
214
|
-
{% compress js inline %}
|
|
215
|
-
{{ form.media.js }}
|
|
216
|
-
{{ form.flags|json_script:flag_id }}
|
|
217
|
-
{% endcompress %}
|
|
207
|
+
{{ form.media.css }}
|
|
208
|
+
{{ form.media.js }}
|
|
209
|
+
{{ form.flags|json_script:flag_id }}
|
|
218
210
|
{% include 'slm/station/form.html' with form=form form_id=section_id flag_id=flag_id %}
|
|
219
211
|
{% endwith %}
|
|
220
212
|
</div>
|
|
@@ -236,7 +228,7 @@ Add new section capability is not functional.
|
|
|
236
228
|
{% block station_images %}
|
|
237
229
|
{% if station_images %}
|
|
238
230
|
|
|
239
|
-
{% load slm static
|
|
231
|
+
{% load slm static i18n %}
|
|
240
232
|
|
|
241
233
|
<div class="col-12">
|
|
242
234
|
<h2>{% trans "Images" %}</h2>
|