# HG changeset patch # User rougeronj # Date 1443714923 -7200 # Node ID 4d01c2d04359983d05413da56409d706db83f994 # Parent 8e26a5511bb86a149e69f8d5d77e96071dc99535 update client version to handle "musée de l'immigration" diff -r 8e26a5511bb8 -r 4d01c2d04359 client/app/components/app_service.js --- a/client/app/components/app_service.js Thu Jul 16 15:14:27 2015 +0200 +++ b/client/app/components/app_service.js Thu Oct 01 17:55:23 2015 +0200 @@ -84,21 +84,35 @@ params: params, isArray: false, transformResponse: function(data){ + var i, j; // Transform meta list into meta dict - var nb = data.hits.length; - for(var i=0;i - ammicoUrl: "http://127.0.0.1:8000/ammico/", + ammicoUrl: "", - searchUrl: "http://ammico.labs.exalead.com/search-api" + searchUrl: "" } }); diff -r 8e26a5511bb8 -r 4d01c2d04359 client/app/search/search_controller.js --- a/client/app/search/search_controller.js Thu Jul 16 15:14:27 2015 +0200 +++ b/client/app/search/search_controller.js Thu Oct 01 17:55:23 2015 +0200 @@ -9,9 +9,12 @@ controller: 'searchCtrl' }); }) - .controller('searchCtrl', function($scope, $location, $routeParams, searchApi, $modal, Slide){ + .controller('searchCtrl', function($scope, $location, $routeParams, searchApi, searchApi2, $modal, Slide){ $scope.q = $routeParams.q || ''; - $scope.results = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp(); + if ($scope.q !== ''){ + $scope.results_ = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp(); + $scope.results = searchApi2.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp(); + } $scope.toggleModal = function (index) { @@ -24,7 +27,7 @@ modalInstance.result.then(function (idBook) { var newSlide = { book: idBook, - id_inventory: $scope.results.hits[index].metas_dict.inventorynumber + research_id: $scope.results.hits[index].metas_dict.inventorynumber }; Slide.save(newSlide); }); diff -r 8e26a5511bb8 -r 4d01c2d04359 client/app/slideshow/slideshow.html --- a/client/app/slideshow/slideshow.html Thu Jul 16 15:14:27 2015 +0200 +++ b/client/app/slideshow/slideshow.html Thu Oct 01 17:55:23 2015 +0200 @@ -4,7 +4,7 @@ {{book.title}} par Jonathan Linvingston -

{{book.count}} elts.

+

{{book.count}} objets