Skip to content

Commit

Permalink
Implemented fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
enridaga committed May 25, 2014
1 parent 302e755 commit 11e8da5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/views/BookPlaceFlickrView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define(['gv', 'views/BookView'], function(gv, BookView) {

render: function() {
var view = this,
book = view.model,
placeId = state.get('placeid');

// render main template
Expand All @@ -24,12 +25,18 @@ define(['gv', 'views/BookView'], function(gv, BookView) {
// die if no place
if (!placeId) return;

// take the pleiades uri id to point to flickr images
var place = book.places.get(placeId);
var placeUri = place.get('uri');
var pUriFrgs = placeUri.split('/');
var placeUriId = pUriFrgs[pUriFrgs.length - 1];

// add loading spinner
view.$el.addClass('loading');

// get Flickr data for this place
$.ajax({
url: FLICKR_URL_BASE.replace('[id]', placeId),
url: FLICKR_URL_BASE.replace('[id]', placeUriId), // was placeId
dataType: 'jsonp',
success: function(data) {
view.$el.removeClass('loading');
Expand Down

0 comments on commit 11e8da5

Please sign in to comment.