Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Jul 7, 2020
2 parents d733e6a + dc01b68 commit 9603cf6
Show file tree
Hide file tree
Showing 139 changed files with 1,252 additions and 1,414 deletions.
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,53 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.12.10] - 2020-07-07

### Added
- Smart selection source on new combination and citations annotator
- Parsed verbatim label on comprehensive specimen digitization task
- Soft validation in timeline on Browse OTUs [#1593]
- Topic facet in Filter Sources task [#1589]
- Counts on type specimen and specimen records sections on Browse OTUs
- Collecting method parsing in verbatim label text

### Changed
- Replaced vue-resource package by axios
- Disabled parallel upload on new image task [#1596]
- Default verbatim fields order on comprehensive specimen digitization
- Set radius error in verbatim georeference [#1602]
- Timeline filter.
- Missing High classification ranks on classfication autocomplete on new taxon name [#1595]
- Date and geo-coordinates parsing improvements
- Also update cached taxon name fields when Adjective or Participle is selected
- Repositories and Serials smart selectors' recent entries optimizations

### Fixed
- Filter collecting events was passing a wrong (changed name) parameters and structure for maps and geographic area
- Not showing up people list after a crossref source [#1597]
- Scroller in georeferences map modal
- Grid Digitizer task failing to update containerized specimens matched by identifiers [#1601]
- Specimen not associate with genus after create it in type section on new taxon name [#1604]
- Volume field only accepted numbers [#1606]
- Smart selectors not remove the previous selection after press new on New source task [#1605]
- Georeference methods `latitude` returning longitude and `longitude` latitude
- Smart selector overrides custom list after lists are loaded [#1608]
- Duplicate shortcut, using the same one for comprehensive specimen digitization and clipboard [#1612]
- Typo in taxon name relationship soft validation message.

[#1589]: https://github.com/SpeciesFileGroup/taxonworks/issues/1589
[#1593]: https://github.com/SpeciesFileGroup/taxonworks/issues/1593
[#1595]: https://github.com/SpeciesFileGroup/taxonworks/issues/1595
[#1596]: https://github.com/SpeciesFileGroup/taxonworks/issues/1596
[#1597]: https://github.com/SpeciesFileGroup/taxonworks/issues/1597
[#1601]: https://github.com/SpeciesFileGroup/taxonworks/issues/1601
[#1602]: https://github.com/SpeciesFileGroup/taxonworks/issues/1602
[#1604]: https://github.com/SpeciesFileGroup/taxonworks/issues/1604
[#1605]: https://github.com/SpeciesFileGroup/taxonworks/issues/1605
[#1606]: https://github.com/SpeciesFileGroup/taxonworks/issues/1606
[#1608]: https://github.com/SpeciesFileGroup/taxonworks/issues/1608
[#1612]: https://github.com/SpeciesFileGroup/taxonworks/issues/1612

## [0.12.9] - 2020-07-01

### Added
Expand Down Expand Up @@ -177,7 +224,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532

[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.9...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.10...development
[0.12.10]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.9...v0.12.10
[0.12.9]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.8...v0.12.9
[0.12.8]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.7...v0.12.8
[0.12.7]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.12.6...v0.12.7
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/tasks/nomenclature/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Object.assign(TW.views.tasks.nomenclature.browse, {
window.open('/tasks/nomenclature/new_taxon_name?taxon_name_id=' + taxonId, '_self');
});

TW.workbench.keyboard.createShortcut((navigator.platform.indexOf('Mac') > -1 ? 'ctrl' : 'alt') + "+c", "Comprehensive specimen digitization", "Browse nomenclature", function () {
TW.workbench.keyboard.createShortcut((navigator.platform.indexOf('Mac') > -1 ? 'ctrl' : 'alt') + "+e", "Comprehensive specimen digitization", "Browse nomenclature", function () {
window.open('/tasks/accessions/comprehensive?taxon_name_id=' + taxonId, '_self');
});

Expand Down
9 changes: 7 additions & 2 deletions app/controllers/collecting_events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ def download
def parse_verbatim_label
if params[:verbatim_label]
render json: {date: Utilities::Dates.date_regex_from_verbatim_label(params[:verbatim_label]),
geo: Utilities::Geo.coordinates_regex_from_verbatim_label(params[:verbatim_label])}.to_json
geo: Utilities::Geo.coordinates_regex_from_verbatim_label(params[:verbatim_label]),
elevation: Utilities::Elevation.elevation_regex_from_verbatim_label(params[:verbatim_label]),
collecting_method: Utilities::CollectingMethods.method_regex_from_verbatim_label(params[:verbatim_label]),
}.to_json
end
end

Expand Down Expand Up @@ -276,9 +279,11 @@ def filter_params
:start_date, # used in date range
:end_date, # used in date range
:partial_overlap_dates,
:spatial_geographic_areas,
keyword_ids: [],
spatial_geographic_area_ids: [],
otu_ids: [],
geographic_area_ids: [],
otu_ids: []
)
end

Expand Down
3 changes: 2 additions & 1 deletion app/controllers/sources_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def filter_params
:year_start,
author_ids: [],
citation_object_type: [],
keyword_ids: []
keyword_ids: [],
topic_ids: []
)
end

Expand Down
14 changes: 4 additions & 10 deletions app/javascript/vue/components/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export default {
getRequest: 0,
type: this.sendLabel,
json: [],
current: -1
current: -1,
requestId: Math.random().toString(36).substr(2, 5)
}
},
Expand Down Expand Up @@ -334,15 +335,8 @@ export default {
this.showList = (this.json.length > 0)
} else {
AjaxCall('get', this.ajaxUrl(), {
before: (request) => {
if(Object.keys(this.headers).length) {
request.headers.map = this.headers
}
if (this.previousRequest) {
this.previousRequest.abort()
}
this.previousRequest = request
}}).then(response => {
requestId: this.requestId
}).then(response => {
this.json = this.getNested(response.body, this.nested)
this.showList = (this.json.length > 0)
this.spinner = false
Expand Down
37 changes: 27 additions & 10 deletions app/javascript/vue/components/georeferences/georeferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@
maxHeight: '80vh',
overflowY: 'scroll'
}">
<div
<div class="horizontal-left-content margin-medium-top margin-medium-bottom">
<manually-component
class="margin-small-right"
@create="saveGeoreference"/>
<geolocate-component
class="margin-small-right"
@create="createGEOLocate"/>
<button
type="button"
v-if="verbatimLat && verbatimLng"
:disabled="verbatimGeoreferenceAlreadyCreated"
@click="createVerbatimShape"
class="button normal-input button-submit">
Create georeference from verbatim
</button>
</div>
<div
:style="{
height: height,
width: width
}">
<spinner-component
v-if="showSpinner || !collectingEventId"
:legend="!collectingEventId ? 'Need collecting event ID' : 'Saving...'"/>
<map-component
<map-component
ref="leaflet"
v-if="show"
:height="height"
Expand Down Expand Up @@ -43,8 +59,8 @@
v-if="verbatimLat && verbatimLng"
:disabled="verbatimGeoreferenceAlreadyCreated"
@click="createVerbatimShape"
class="button normal-input button-submit separate-bottom separate-top">
Create georeference from verbatim
class="button normal-input button-submit">
Create georeference from verbatim
</button>
</div>
<display-list
Expand Down Expand Up @@ -96,6 +112,10 @@ export default {
required: false,
default: 0
},
geolocationUncertainty: {
type: [String, Number],
default: undefined
},
verbatimLng: {
type: [Number, String],
default: 0
Expand All @@ -119,11 +139,7 @@ export default {
},
computed: {
verbatimGeoreferenceAlreadyCreated () {
return this.georeferences.find(item => {
return item.geo_json.geometry.type === 'Point' &&
Number(item.geo_json.geometry.coordinates[0]) === Number(this.verbatimLng) &&
Number(item.geo_json.geometry.coordinates[1]) === Number(this.verbatimLat)
})
return this.georeferences.find(item => { return item.type === 'Georeference::VerbatimData' })
}
},
data () {
Expand Down Expand Up @@ -253,7 +269,8 @@ export default {
georeference: {
geographic_item_attributes: { shape: JSON.stringify(shape) },
collecting_event_id: this.collectingEventId,
type: 'Georeference::VerbatimData'
type: 'Georeference::VerbatimData',
error_radius: this.geolocationUncertainty
}
}
this.showSpinner = true
Expand Down
6 changes: 5 additions & 1 deletion app/javascript/vue/components/georeferences/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<tr>
<th>Georeference ID</th>
<th>Shape</th>
<th>Coordinates</th>
<th>Error radius</th>
<th>Type</th>
<th></th>
Expand All @@ -19,7 +20,7 @@
class="list-complete-item">
<td>{{ item.id }}</td>
<td>{{ item.geo_json.geometry.type }}</td>

<td>{{ getCoordinates(item.geo_json.geometry.coordinates) }}</td>
<td>
<edit-in-place
v-model="item.error_radius"
Expand Down Expand Up @@ -92,6 +93,9 @@ export default {
} else {
this.$emit('delete', item)
}
},
getCoordinates (coordinates) {
return coordinates.map(coordinate => Array.isArray(coordinate) ? coordinate.map(item => item.slice(0, 2)) : coordinate)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
<template>
<div>
<div class="separate-bottom inline">
<autocomplete
url="/sources/autocomplete"
label="label"
min="2"
:send-label="autocompleteLabel"
@getItem="citation.source_id = $event.id"
placeholder="Select a source"
param="term"/>
<input
type="text"
class="normal-input inline pages separate-left"
v-model="citation.pages"
placeholder="Pages">
</div>
<div class="flex-separate separate-bottom">
<label class="inline middle">
<input
v-model="citation.is_original"
type="checkbox">
Is original (does not apply to topics)
</label>
<default-element
class="separate-left"
label="source"
type="Source"
@getLabel="autocompleteLabel = $event"
@getId="citation.source_id = $event"
section="Sources"
/>
<smart-selector
class="full_width"
model="sources"
ref="smartSelector"
pin-section="Sources"
pin-type="Source"
@selected="citation.source_id = $event.id"
v-model="source">
<div slot="footer">
<div
v-if="source"
class="horizontal-left-content margin-small-bottom">
<span
v-html="source.object_tag"/>
<span
class="button circle-button btn-delete button-default"
@click="unsetSource"/>
</div>
<ul class="no_bullets context-menu">
<li>
<input
type="text"
class="normal-input inline pages"
v-model="citation.pages"
placeholder="Pages">
</li>
<li>
<label class="inline middle">
<input
v-model="citation.is_original"
type="checkbox">
Is original (does not apply to topics)
</label>
</li>
</ul>
</div>
</smart-selector>
</div>
<div class="separate-bottom">
<button
Expand All @@ -43,13 +51,11 @@
</template>

<script>
import DefaultElement from 'components/getDefaultPin.vue'
import Autocomplete from 'components/autocomplete.vue'
import SmartSelector from 'components/smartSelector'
export default {
components: {
DefaultElement,
Autocomplete
SmartSelector
},
props: {
globalId: {
Expand All @@ -64,8 +70,8 @@
},
data() {
return {
autocompleteLabel: undefined,
citation: this.newCitation()
citation: this.newCitation(),
source: undefined
}
},
methods: {
Expand All @@ -81,7 +87,11 @@
sendCitation() {
this.$emit('create', this.citation)
this.citation = this.newCitation()
this.autocompleteLabel = undefined
this.source = undefined
},
unsetSource () {
this.citation.source_id = undefined,
this.source = undefined
}
}
}
Expand Down
Loading

0 comments on commit 9603cf6

Please sign in to comment.