Update PopulateVisit function to get only the new visits from Jamespot.
In case the parameter "parrent_visit" is passed when creating a book, we copy all the slide corresponding to the visit being copied.
Refactor PopulateVisite to PopulateVisit.
(function(){
'use strict';
angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
.controller('slideshowCtrl', function($scope, ammicoApi, $routeParams){
$scope.slideshow = ammicoApi.booksSlides.query({idBook:$routeParams.iSlide, format:'json'}, function(data){
data = ammicoApi.sanitizeUrls(data);
});
$scope.book = ammicoApi.book.get({idBook:$routeParams.iSlide, format:'json'});
});
})();