+ composer updates
+ CreatingCorporation nur readonly + doctypes zusätzlich: 'mixedtype' => 'Mixed Type' + bei einer Fehlermeldung beim Submit: kein Reset mehr... nur mehr "retry: edit inputs" + Eingabe der Contributor gleich nach der Eingabe der Creator + Projekteingabe beim Submitten entfernt + Keyword wird nun mit einer default language angelegt + elevation und depth-Angaben in Meter (im Label) + 'server_date_modified' wird nun auch aktualisiert beim automatischen reject, falls der Reviewer länger als 14 Tage den Datensatz nicht kontrolliert + GeoLocation hat nun eine Doppelbindung -> nicht mehr readonly
This commit is contained in:
parent
dabb905111
commit
0dc6ca034e
21 changed files with 1092 additions and 864 deletions
|
@ -1,7 +1,66 @@
|
|||
<template>
|
||||
<div>
|
||||
<div id="map">
|
||||
<div style="position:relative">
|
||||
<!-- <div id="inset">
|
||||
xmin:
|
||||
<input
|
||||
type="text"
|
||||
name="xmin"
|
||||
id="xmin"
|
||||
v-model="geolocation.xmin"
|
||||
data-vv-scope="step-2"
|
||||
v-validate="'decimal'"
|
||||
>
|
||||
<br>ymin:
|
||||
<input
|
||||
type="text"
|
||||
name="ymin"
|
||||
id="ymin"
|
||||
v-model="geolocation.ymin"
|
||||
data-vv-scope="step-2"
|
||||
>
|
||||
xmax:
|
||||
<input
|
||||
type="text"
|
||||
name="xmax"
|
||||
id="xmax"
|
||||
v-model="geolocation.xmax"
|
||||
data-vv-scope="step-2"
|
||||
>
|
||||
<br>ymax:
|
||||
<input
|
||||
type="text"
|
||||
name="ymax"
|
||||
id="ymax"
|
||||
v-model="geolocation.ymax"
|
||||
data-vv-scope="step-2"
|
||||
>
|
||||
<input type="button" v-on:click="zoomTo" value="zoomTo">
|
||||
</div> -->
|
||||
<div id="map"></div>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label for="xmin">xmin: </label>
|
||||
<input name="xmin" type="text" class="pure-u-23-24" v-model="geolocation.xmin" data-vv-scope="step-2" id="xmin" v-validate="'decimal'">
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label for="ymin">ymin: </label>
|
||||
<input name="ymin" type="text" class="pure-u-23-24" v-model="geolocation.ymin" data-vv-scope="step-2" id="ymin" v-validate="'decimal'">
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label for="xmax">xmax: </label>
|
||||
<input name="xmax" type="text" class="pure-u-23-24" v-model="geolocation.xmax" data-vv-scope="step-2" id="xmax" v-validate="'decimal'">
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<label for="ymax">ymax: </label>
|
||||
<input name="ymax" type="text" class="pure-u-23-24" v-model="geolocation.ymax" data-vv-scope="step-2" id="ymax" v-validate="'decimal'">
|
||||
</div>
|
||||
<input type="button" v-on:click="zoomTo" value="validate coordinates">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -20,14 +79,50 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
map: [],
|
||||
markers: null
|
||||
drawnItems: null,
|
||||
locationErrors: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$validator.extend('boundingBox', {
|
||||
getMessage: field => 'At least one ' + field + ' needs to be checked.',
|
||||
validate: (value, [testProp]) => {
|
||||
const options = this.dataset.checkedLicenses;
|
||||
return value || options.some((option) => option[testProp]);
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
methods: {},
|
||||
methods: {
|
||||
zoomTo() {
|
||||
var _this = this;
|
||||
_this.locationErrors.length = 0;
|
||||
this.drawnItems.clearLayers();
|
||||
var xmin = document.getElementById("xmin").value;
|
||||
var ymin = document.getElementById("ymin").value;
|
||||
var xmax = document.getElementById("xmax").value;
|
||||
var ymax = document.getElementById("ymax").value;
|
||||
var bounds = [[ymin, xmin], [ymax, xmax]];
|
||||
try {
|
||||
var boundingBox = L.rectangle(bounds, { color: "#005F6A", weight: 1 });
|
||||
// this.geolocation.xmin = xmin;
|
||||
// this.geolocation.ymin = ymin;
|
||||
// this.geolocation.xmax = xmax;
|
||||
// this.geolocation.ymax = ymax;
|
||||
|
||||
_this.drawnItems.addLayer(boundingBox);
|
||||
_this.map.fitBounds(bounds);
|
||||
_this.$toast.success("valid bounding box");
|
||||
} catch (e) {
|
||||
// _this.errors.push(e);
|
||||
_this.$toast.error(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const map = L.map("map");
|
||||
this.map = map;
|
||||
map.scrollWheelZoom.disable();
|
||||
// Construct a bounding box for this map that the user cannot
|
||||
var southWest = L.latLng(46.5, 9.9),
|
||||
|
@ -57,7 +152,7 @@ export default {
|
|||
// this.addPlaces(this.places)
|
||||
|
||||
// Initialise the FeatureGroup to store editable layers
|
||||
var drawnItems = new L.FeatureGroup();
|
||||
var drawnItems = (this.drawnItems = new L.FeatureGroup());
|
||||
map.addLayer(drawnItems);
|
||||
var drawPluginOptions = {
|
||||
position: "topright",
|
||||
|
@ -140,4 +235,14 @@ export default {
|
|||
font-size: 13px;
|
||||
text-shadow: 0 0 2px #fff;
|
||||
}
|
||||
|
||||
#inset {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border: none;
|
||||
width: 120px;
|
||||
z-index: 999;
|
||||
// height: 120px;
|
||||
}
|
||||
</style>
|
|
@ -32,10 +32,18 @@ import MyAutocomplete from './components/MyAutocomplete.vue';
|
|||
import VeeValidate from 'vee-validate';
|
||||
import dataset from './components/Dataset';
|
||||
import LocationsMap from './components/LocationsMap.vue';
|
||||
import modal from './components/ShowModal.vue'
|
||||
import modal from './components/ShowModal.vue';
|
||||
// import datetime from 'vuejs-datetimepicker';
|
||||
// import { Validator } from 'vee-validate';
|
||||
import VueToast from 'vue-toast-notification';
|
||||
import 'vue-toast-notification/dist/index.css';
|
||||
Vue.use(VueToast);
|
||||
|
||||
Vue.use(VeeValidate);
|
||||
// Vue.use(VeeValidate);
|
||||
Vue.use(VeeValidate, {
|
||||
// validity: true
|
||||
useConstraintAttrs: true
|
||||
});
|
||||
|
||||
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
||||
const app = new Vue({
|
||||
|
@ -370,7 +378,7 @@ const app = new Vue({
|
|||
adds a new Keyword
|
||||
*/
|
||||
addKeyword() {
|
||||
let newKeyword = { value: '', type: '' };
|
||||
let newKeyword = { value: '', type: '', language: this.dataset.language };
|
||||
//this.dataset.files.push(uploadedFiles[i]);
|
||||
this.dataset.keywords.push(newKeyword);
|
||||
},
|
||||
|
|
3
resources/assets/js/tinyDatePicker.js
Normal file
3
resources/assets/js/tinyDatePicker.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import TinyDatePicker from 'tiny-date-picker';
|
||||
|
||||
TinyDatePicker(document.querySelector("input[name='time_absolut']"));
|
|
@ -19,6 +19,7 @@ return [
|
|||
'models' => 'Models',
|
||||
'rawdata' => 'Raw Data',
|
||||
'supplementarydata' => 'Supplementary Data',
|
||||
'mixedtype' => 'Mixed Type'
|
||||
//'diplom' => 'Diploma Thesis',
|
||||
//'doctoralthesis' => 'Doctoral Thesis',
|
||||
//'coursematerial' => 'Course Material',
|
||||
|
|
|
@ -201,11 +201,30 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-contributors">
|
||||
<legend>Contributors</legend>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<my-autocomplete title="searching active person table" @person="onAddContributor"></my-autocomplete>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<div class="pure-control-group checkboxlist">
|
||||
<label v-for="(contributor, index) in dataset.contributors" :for="contributor.id" class="pure-checkbox">
|
||||
<input type="checkbox" name="contributors" v-bind:value="contributor.id" v-model="dataset.checkedContributors" class="form-check-input" data-vv-scope="step-1">
|
||||
@{{ contributor.full_name }}
|
||||
</label>
|
||||
<br />
|
||||
{{-- <span>Checked Contributors: @{{ dataset.checkedContributors }}</span> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-publisher">
|
||||
<legend>Publisher</legend>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('CreatingCorporation', 'Creating Corporation') !!}
|
||||
{!! Form::text('CreatingCorporation', null, ['class' =>
|
||||
{!! Form::text('CreatingCorporation', null, ['readonly', 'class' =>
|
||||
'pure-u-23-24', 'v-model' => 'dataset.creating_corporation', "v-validate" => "'required'", 'data-vv-scope' => 'step-1']) !!}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -270,17 +289,10 @@
|
|||
<div v-if="step === 2 && isInitial" data-vv-scope="step-2">
|
||||
<h1>Step Two: Recommended Elements</h1>
|
||||
|
||||
<fieldset id="fieldset-project">
|
||||
{{-- <fieldset id="fieldset-project">
|
||||
<legend>Project</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
{{-- <div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select( 'State', ['unpublished' => 'unpublished', 'inprogress' => 'inprogress'], null, ['id' => 'state',
|
||||
'placeholder' => '-- select server state --', 'v-model' => 'dataset.state', "v-validate" => "'required'", 'data-vv-scope' => 'step-2'] ) !!}
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('project_id', 'Project..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
|
@ -291,7 +303,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset> --}}
|
||||
|
||||
<fieldset-dates>
|
||||
<legend>Date(s)</legend>
|
||||
|
@ -301,26 +313,7 @@
|
|||
=> 'pure-u-23-24', 'v-model' => 'dataset.embargo_date', 'data-vv-scope' => 'step-2']) !!}
|
||||
<small id="projectHelp" class="pure-form-message-inline">EmbargoDate is optional</small>
|
||||
</div>
|
||||
</fieldset-dates>
|
||||
|
||||
<fieldset id="fieldset-contributors">
|
||||
<legend>Contributors</legend>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<my-autocomplete title="searching active person table" @person="onAddContributor"></my-autocomplete>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
<div class="pure-control-group checkboxlist">
|
||||
<label v-for="(contributor, index) in dataset.contributors" :for="contributor.id" class="pure-checkbox">
|
||||
<input type="checkbox" name="contributors" v-bind:value="contributor.id" v-model="dataset.checkedContributors" class="form-check-input" data-vv-scope="step-2">
|
||||
@{{ contributor.full_name }}
|
||||
</label>
|
||||
<br />
|
||||
{{-- <span>Checked Contributors: @{{ dataset.checkedContributors }}</span> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset-dates>
|
||||
|
||||
<fieldset id="fieldset-geolocation">
|
||||
<legend>Geo Location</legend>
|
||||
|
@ -328,23 +321,28 @@
|
|||
<div class="pure-u-1 pure-u-md-1 pure-u-lg-1 pure-div">
|
||||
<locations-map v-bind:geolocation="dataset.coverage"></locations-map>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{-- <div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('xmin', 'xmin: ') !!}
|
||||
{!! Form::text('xmin', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.xmin', 'readonly']) !!}
|
||||
{!! Form::text('xmin', null, [
|
||||
'class' => 'pure-u-23-24',
|
||||
'v-model' => 'dataset.coverage.xmin',
|
||||
"v-validate" => "'decimal'",
|
||||
'data-vv-scope' => 'step-2'
|
||||
]) !!}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('ymin', 'ymin: ') !!}
|
||||
{!! Form::text('ymin', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymin', 'readonly']) !!}
|
||||
{!! Form::text('ymin', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymin', 'data-vv-scope' => 'step-2']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('xmax', 'xmax: ') !!}
|
||||
{!! Form::text('xmax', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.xmax', 'readonly']) !!}
|
||||
{!! Form::text('xmax', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.xmax', 'data-vv-scope' => 'step-2']) !!}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('ymax', 'ymax: ') !!}
|
||||
{!! Form::text('ymax', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymax', 'readonly']) !!}
|
||||
</div>
|
||||
{!! Form::text('ymax', null, ['class' => 'pure-u-23-24', 'v-model' => 'dataset.coverage.ymax', 'data-vv-scope' => 'step-2']) !!}
|
||||
</div> --}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
@ -356,11 +354,11 @@
|
|||
<div class="pure-u-1 pure-u-md-1">
|
||||
<label for="elevation-option-one" class="pure-radio">
|
||||
<input id="elevation-option-one" type="radio" v-model="elevation" value="absolut">
|
||||
absolut elevation
|
||||
absolut elevation (m)
|
||||
</label>
|
||||
<label for="elevation-option-two" class="pure-radio">
|
||||
<input id="elevation-option-two" type="radio" v-model="elevation" value="range">
|
||||
elevation range
|
||||
elevation range (m)
|
||||
</label>
|
||||
<label for="elevation-option-three" class="pure-radio">
|
||||
<input id="elevation-option-three" type="radio" v-model="elevation" value="no_elevation">
|
||||
|
@ -388,11 +386,11 @@
|
|||
<div class="pure-u-1 pure-u-md-1">
|
||||
<label for="depth-option-one" class="pure-radio">
|
||||
<input id="depth-option-one" type="radio" v-model="depth" value="absolut">
|
||||
absolut depth
|
||||
absolut depth (m)
|
||||
</label>
|
||||
<label for="depth-option-two" class="pure-radio">
|
||||
<input id="depth-option-two" type="radio" v-model="depth" value="range">
|
||||
depth range
|
||||
depth range (m)
|
||||
</label>
|
||||
<label for="depth-option-three" class="pure-radio">
|
||||
<input id="depth-option-three" type="radio" v-model="depth" value="no_depth">
|
||||
|
@ -435,9 +433,10 @@
|
|||
|
||||
<div v-show="time === 'absolut'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('time_absolut', 'time absolut: ') !!}
|
||||
{!! Form::date('time_absolut', null, ['class' => 'pure-u-23-24',
|
||||
'v-model' => 'dataset.coverage.time_absolut', 'data-vv-scope' => 'step-2',
|
||||
"v-validate" => "this.isTimeAbsolut ? 'required' : '' " ]) !!}
|
||||
{!! Form::datetimelocal('time_absolut', null, ['class' => 'pure-u-23-24', 'placeholder' => 'dd.MM.yyyy HH:mm:ss',
|
||||
'v-model' => 'dataset.coverage.time_absolut', 'data-vv-scope' => 'step-2', 'step' => 1,
|
||||
"v-validate" => "this.isTimeAbsolut ? 'required|date_format:dd.MM.yyyy HH:mm:ss' : '' " ]) !!}
|
||||
{{-- <datetime name="time_absolut" format="MM-DD-YYYY H:i:s" width="300px" v-model="dataset.coverage.time_absolut"></datetime> --}}
|
||||
</div>
|
||||
<div v-show="time === 'range'" class="pure-u-1 pure-u-md-1">
|
||||
{!! Form::label('time_min', 'time min: ') !!}
|
||||
|
@ -493,7 +492,8 @@
|
|||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-keywords">
|
||||
|
||||
<fieldset id="fieldset-keywords">
|
||||
<legend>Dataset Keywords</legend>
|
||||
<button class="pure-button button-small" @click.prevent="addKeyword()">Add Keyword</button>
|
||||
<table class="table table-hover" v-if="dataset.keywords.length">
|
||||
|
@ -501,6 +501,7 @@
|
|||
<tr>
|
||||
<th style="width: 20px;">Keyword</th>
|
||||
<th>Type</th>
|
||||
<th>Language</th>
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -515,15 +516,20 @@
|
|||
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
</td>
|
||||
<td>
|
||||
<button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)">Remove</button>
|
||||
<input name="Keyword Language" readonly class="form-control" placeholder="[KEYWORD LANGUAGE]" v-model="item.language" v-validate="'required'"
|
||||
data-vv-scope="step-2" />
|
||||
</td>
|
||||
<td>
|
||||
<button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
|
||||
<div class="pure-controls">
|
||||
<button @click.prevent="prev()" class="pure-button button-small">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
<span>Back</span>
|
||||
|
@ -688,9 +694,9 @@
|
|||
<p>
|
||||
<a href="javascript:void(0)" @click="retry()">Retry: Edit inputs</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="javascript:void(0)" @click="reset()">Start again</a>
|
||||
</p>
|
||||
{{-- <p>
|
||||
<a href="javascript:void(0)" @click="reset()">Submit new dataset</a>
|
||||
</p> --}}
|
||||
<div v-if="serrors.length > 0">
|
||||
<b>Please correct the following server error(s):</b>
|
||||
<ul class="alert validation-summary-errors">
|
||||
|
@ -731,6 +737,4 @@
|
|||
<script type="text/javascript" src="{{ resource_path('assets\js\datasetPublish.js') }}"></script> --}}
|
||||
<script type="text/javascript" src="{{ asset('backend/publish/datasetPublish.js') }}"></script>
|
||||
|
||||
|
||||
|
||||
@stop
|
|
@ -234,7 +234,7 @@
|
|||
if (e.which === 8 && !$(e.target).is("input:not([type=radio]):not([type=checkbox]), textarea, [contentEditable], [contentEditable=true]")) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ asset('backend/functions.js') }}"></script>
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue