Commit 175d76af66a9308f67dd68394358263c7d0fec4b

Link from the search page to load searched images in the play area.
  
313313 this.showSweets();
314314 return false;
315315 },
316 // function to update the urls in the UI if an image is loaded internally
317 // and not from user UI.
318 updateURLs: function(url) {
319 $('#user-input').val(url);
320 },
316321 // load a URL for annotation (can be of image or html resource for now)
317322 loadURL: function(url, type) {
318323 //console.log('loadURL()');
328328 // if type is given explicitly; we load it as such.
329329 if(type === 'image') {
330330 this.initImageAnno(url);
331 this.updateURLs(url);
331332 return false;
332333 }
333334 // else try to find what resource is the URL..
547547 find('img').attr('src');
548548 //TODO: load the image in the play area/workbench
549549 console.log('load image anno', url);
550 swtr.app_router.loadPlayArea(url, 'image');
550551 },
551552 search: function(data, cb) {
552553 swtr.appView.$overlay.show();
879879 }
880880 $('#' + id).show();
881881 this.highlight(id);
882 console.log('shown', id);
882883 },
883884 highlight: function(id) {
884885 $('#swtr-navbar-collapse li').removeClass('active');
890890 start: function() {
891891 var fragment = window.location.hash.split('#')[1];
892892 if(!fragment) {
893 this.navigate('home');
893 this.navigate('home', {trigger: true});
894894 return;
895895 }
896896 var route = fragment.split('/')[1];
897897 if(_.indexOf(_.keys(this.routes), route) > -1) {
898 this.navigate(fragment);
898 this.navigate(fragment, {trigger: true});
899899 }
900 },
901 loadPlayArea: function(url, type) {
902 this.navigate('play', {trigger: true});
903 this.mounted_component.loadURL(url, type);
900904 }
901905 });
902906