- edit Dataset before release to editor

- robots.txt avoid search bots
- adapt Dataset.ts and LocationsMap.ts for edit form
- edit createForm for new dataset attributes
- vue-countdown.vue 1800 seconds
This commit is contained in:
Arno Kaimbacher 2019-12-20 11:44:40 +01:00
parent 37a77d019b
commit 43d98a1f82
27 changed files with 1139 additions and 353 deletions

View file

@ -4,7 +4,7 @@ import { Component, Vue, Watch } from 'vue-property-decorator';
function initialState() {
return {
type: "",
state: "",
server_state: "",
rights: null,
project_id: "",
@ -28,27 +28,27 @@ function initialState() {
// ymax: ""
// },
coverage: {
xmin: "",
ymin: "",
xmax: "",
ymax: "",
elevation_min: "",
elevation_max: "",
elevation_absolut: "",
depth_min: "",
depth_max: "",
depth_absolut: "",
time_min: "",
time_max: "",
time_absolut: ""
x_min: null,
y_min:null,
x_max: null,
y_max: null,
elevation_min: null,
elevation_max: null,
elevation_absolut: null,
depth_min: null,
depth_max: null,
depth_absolut: null,
time_min: null,
time_max: null,
time_absolut: null
},
checkedAuthors: [],
checkedLicenses: [], // [],
files: [],
keywords: [],
subjects: [],
references: [],
titles: [],
descriptions: [],
abstratcs: [],
checkedContributors: [],
// checkedSubmitters: [],
@ -66,7 +66,7 @@ export default class Dataset extends Vue {
// }
initialState = {};
type = "";
state = "";
server_state = "";
rights = null;
project_id = "";
@ -90,10 +90,10 @@ export default class Dataset extends Vue {
// ymax: ""
// },
coverage = {
xmin: "",
ymin: "",
xmax: "",
ymax: "",
x_min: "",
y_min: "",
x_max: "",
y_max: "",
elevation_min: "",
elevation_max: "",
elevation_absolut: "",
@ -107,10 +107,10 @@ export default class Dataset extends Vue {
checkedAuthors = [];
checkedLicenses = [];
files = [];
keywords = [];
subjects = [];
references = [];
titles = [];
descriptions = [];
abstracts = [];
checkedContributors = [];
// checkedSubmitters: [],

View file

@ -7,7 +7,6 @@ export default class DeleteButton extends L.Control {
faIcon: 'fa-trash',
id: "",
text: ""
// faIcon: 'fa-check-circle'
};
geolocation = null;
@ -16,16 +15,6 @@ export default class DeleteButton extends L.Control {
_map = null;
_container = null;
//constructor:
// initialize(options) {
// //util.mixin(this.options, options);
// L.Util.setOptions(this, options);
// // properties
// this.geolocation = options.geolocation;
// this.drawnItems = options.drawnItems;
// this.bounds = options.bounds;
// }
constructor(options) {
super();
//util.mixin(this.options, options);
@ -47,11 +36,6 @@ export default class DeleteButton extends L.Control {
this._container.style.width = "30px";
this._container.style.height = "30px";
this._buildButton();
// container.onclick = function() {
// console.log("buttonClicked");
// };
return this._container;
}
@ -68,10 +52,10 @@ export default class DeleteButton extends L.Control {
}
L.DomEvent.on(_link, 'click', function (ev) {
this.drawnItems.clearLayers();
this.options.geolocation.xmin = "";
this.options.geolocation.ymin = "";
this.options.geolocation.xmax = "";
this.options.geolocation.ymax = "";
this.options.geolocation.x_min = "";
this.options.geolocation.y_min = "";
this.options.geolocation.x_max = "";
this.options.geolocation.y_max = "";
this._map.fitBounds(this.bounds);
},
this);

View file

@ -136,11 +136,11 @@ export default class LocationsMap extends Vue {
// if (type === "rectancle") {
// layer.bindPopup("A popup!" + layer.getBounds().toBBoxString());
var bounds = layer.getBounds();
this.geolocation.xmin = bounds.getSouthWest().lng;
this.geolocation.ymin = bounds.getSouthWest().lat;
this.geolocation.x_min = bounds.getSouthWest().lng;
this.geolocation.y_min = bounds.getSouthWest().lat;
// console.log(this.geolocation.xmin);
this.geolocation.xmax = bounds.getNorthEast().lng;
this.geolocation.ymax = bounds.getNorthEast().lat;
this.geolocation.x_max = bounds.getNorthEast().lng;
this.geolocation.y_max = bounds.getNorthEast().lat;
// }
drawnItems.addLayer(layer);
@ -166,7 +166,7 @@ export default class LocationsMap extends Vue {
}
get validBoundingBox(): boolean {
if (this.geolocation.xmin != "" && this.geolocation.ymin != "" && this.geolocation.xmax != "" && this.geolocation.ymax != "" ) {
if (this.geolocation.x_min != "" && this.geolocation.y_min != "" && this.geolocation.x_max != "" && this.geolocation.y_max != "" ) {
return true;
}
return false;

View file

@ -90,7 +90,7 @@ import { Component, Inject, Vue, Prop, Watch } from "vue-property-decorator";
components: { draggable }
})
export default class PersonTable extends Vue {
@Inject("$validator") readonly $validator!: string;
@Inject("$validator") readonly $validator;
// inject: {
// $validator: "$validator"
// },

View file

@ -8,10 +8,10 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<label for="xmin">xmin:</label>
<input
name="xmin"
name="coverage[x_min]"
type="text"
class="pure-u-23-24"
v-model="geolocation.xmin"
v-model="geolocation.x_min"
data-vv-scope="step-2"
id="xmin"
v-validate="'decimal'"
@ -21,10 +21,10 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<label for="ymin">ymin:</label>
<input
name="ymin"
name="coverage[y_min]"
type="text"
class="pure-u-23-24"
v-model="geolocation.ymin"
v-model="geolocation.y_min"
data-vv-scope="step-2"
id="ymin"
v-validate="'decimal'"
@ -34,10 +34,10 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<label for="xmax">xmax:</label>
<input
name="xmax"
name="coverage[x_max]"
type="text"
class="pure-u-23-24"
v-model="geolocation.xmax"
v-model="geolocation.x_max"
data-vv-scope="step-2"
id="xmax"
v-validate="'decimal'"
@ -47,10 +47,10 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
<label for="ymax">ymax:</label>
<input
name="ymax"
name="coverage[y_max]"
type="text"
class="pure-u-23-24"
v-model="geolocation.ymax"
v-model="geolocation.y_max"
data-vv-scope="step-2"
id="ymax"
v-validate="'decimal'"

View file

@ -1,5 +1,5 @@
<template>
<div v-show="warningSeconds <= 600" class="vue-countdown">
<div v-show="warningSeconds <= 1800" class="vue-countdown">
<div class="vue-countdown--time">
remaining time: {{ time }}
</div>