Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.1.2

* Remove the fix specific to Turbinicarpus spp. where 'taxon is split-listed'
message appears incorrectly, as the issue has now been solved in Species+.
* Fix an issue where downloads were not working.

### 1.1.1

* Implement a fix specific to Turbinicarpus spp. where 'taxon is split-listed'
Expand All @@ -12,4 +18,4 @@

*Add hotjar tracking*

* Add hotjar tracking code
* Add hotjar tracking code
16 changes: 0 additions & 16 deletions app/javascripts/models/timelines_for_taxon_concept.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@ Checklist.TimelinesForTaxonConcept = DS.Model.extend({
hasEvents: DS.attr('boolean'),
hasReservations: DS.attr('boolean'),
isSplitListed: Ember.computed(function() {
// There is a hard-to-fix upstream bug, and this is a hack to override
// individual cases. Most of the time we just want to return the value of
// hasDescendantTimelines but sometimes that's not correct - see
// https://unep-wcmc.codebasehq.com/projects/cites-support-maintenance/tickets/240
var overrideSplitListingIds = {
13183: false, // GENUS Turbinicarpus spp.
};

var taxonConceptId = this.get('taxon_concept_id');

if (
taxonConceptId && overrideSplitListingIds.hasOwnProperty(taxonConceptId)
) {
return overrideSplitListingIds[taxonConceptId]
}

return this.get('hasDescendantTimelines');
})
});
Expand Down
11 changes: 10 additions & 1 deletion app/javascripts/views/download_collection_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,22 @@ Checklist.DownloadCollectionView = Ember.CollectionView.extend({
}.property(),

download: function(event) {
var id = $(event.target).parent().attr('data-download-id');
var eventTarget = $(event.target);

var id = (
// Might be the <a> or a <span> within it
eventTarget.attr('data-download-id') ||
eventTarget.parent().attr('data-download-id')
);

ga('send', {
hitType: 'event',
eventCategory: 'Downloads: ' + this.get('content.doc_type') + ' (custom) ',
eventAction: 'Format: ' + this.get('content.format')
});

window.location = Checklist.Download.downloadUrl(id);

$.colorbox.close();
},

Expand Down