Skip to content

Commit

Permalink
Merge pull request #620 from sozialhelden/feature/update-accessibilit…
Browse files Browse the repository at this point in the history
…y-cloud-to-v3.2.1

Upgrade accessibility.cloud widget to v3.2.1 (Part II)
  • Loading branch information
Andrew Hobden authored May 30, 2017
2 parents 527fc39 + a389103 commit e044f2b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/nodes.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#= require jquery
#= require jquery_ujs
#= require accessibility.cloud-3.2.1-21a6710d.min
#= require jquery/jquery.cookies.js
#= require i18n.js
#= require bootstrap-transition
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/relaunch/_nodes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ $node-photos-width: (100% - $node-photos-gutter * $node-photos-columns) / $node-
.ac-licenses {
font-size: $fontSizeSmall;
color: lighten($yellow-gray, 30%);
margin-bottom: 1em;
}

.ac-licenses a {
font-size: $fontSizeSmall;
}

.ac-result dt {
Expand Down
41 changes: 21 additions & 20 deletions app/views/nodes/_node_nearby.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
%h2=t('.places_nearby')
%section.node-nearby-locations-from-partners-list

- content_for :javascript do
:javascript
window.onAccessibilityCloudLoaded = function (AccessibilityCloud) {
var containerElement = document.querySelector('section.node-nearby-locations-from-partners');
var element = document.querySelector('section.node-nearby-locations-from-partners-list');
AccessibilityCloud.render(element, {
token: '27be4b5216aced82122d7cf8f69e4a07',
locale: document.getElementsByTagName('html')[0].getAttribute('lang'),
requestParameters: {
latitude: #{@node.lat},
longitude: #{@node.lon},
accuracy: 1000, // include places within 1 km radius
limit: 10,
excludeSourceIds: ['LiBTS67TjmBcXdEmX'], // excludes Wheelmap's own PoIs from results
},
onSuccess: function() {
containerElement.classList.add('has-results');
}
});
}
:javascript
window.onAccessibilityCloudLoaded = function (AccessibilityCloud) {
var containerElement = document.querySelector('section.node-nearby-locations-from-partners');
var element = document.querySelector('section.node-nearby-locations-from-partners-list');
AccessibilityCloud.render(element, {
token: '27be4b5216aced82122d7cf8f69e4a07',
locale: document.getElementsByTagName('html')[0].getAttribute('lang'),
requestParameters: {
latitude: #{@node.lat},
longitude: #{@node.lon},
accuracy: 1000, // include places within 1 km radius
limit: 10,
excludeSourceIds: ['LiBTS67TjmBcXdEmX'], // excludes Wheelmap's own PoIs from results
},
onSuccess: function() {
containerElement.classList.add('has-results');
}
});
}

%script{type:"text/javascript", integrity: "sha384-JB8vgUWMMtbXpvZ9XOVIM+9XGqGhC0KExgoge8mCxuKSD9KzN6idJ6je0vEy4ezM", crossorigin: "anonymous", async: true, defer: true, src: "https://cdn.jsdelivr.net/gh/sozialhelden/[email protected]/build/example/accessibility.cloud-3.2.1-21a6710d.min.js"}
2 changes: 2 additions & 0 deletions config/locales/de/relaunch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ de:
alert: 'Bitte beachte: Auf dem Foto sollte der Eingangsbereich des Ortes gut zu erkennen sein. Soll heißen: Gibt es Stufen am Eingang? Wie hoch ist die Stufe ungefähr? Wie breit ist die Tür? Das Foto muss das Format JPG oder PNG haben. Die maximale Größe eines Fotos darf 10 MB nicht überschreiten.'
node_similar:
similar: 'Ähnliche Orte: %{name}'
node_nearby:
places_nearby: 'Orte in der Nähe:'
node_status:
accessible_toilet: 'Rollstuhlgerechtes WC:'
premium: '%{name} sagt: dieser Ort ist'
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en/relaunch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ en:
alert: 'Please note: The entrance should be clearly visible in the photo in order to show the following: Are there steps at the entrance? Approximately how high is the step? How wide is the door? The photograph must be in a JPG or PNG format. It should not be larger than 10 MB.'
node_similar:
similar: 'Similar places: %{name}'
node_nearby:
places_nearby: 'Places nearby:'
node_status:
accessible_toilet: 'Wheelchair accessible toilet:'
premium: '%{name} says: this place is'
Expand Down

0 comments on commit e044f2b

Please sign in to comment.