Only able to add slide to the child books - fix bug wich appeard during the split of the resource API (searchAPI -> ammicoAPI & searchAPI)
--- a/client/app/search/modal.html Wed Apr 08 17:00:43 2015 +0200
+++ b/client/app/search/modal.html Wed Apr 08 17:02:24 2015 +0200
@@ -4,7 +4,7 @@
<div class="modal-body ng-scope">
<ul class="row ">
- <li class="" ng-repeat="i in books | orderBy:'-date'">
+ <li class="" ng-repeat="i in books | filter:{parent_visit:'!null'}">
<div>
<a ng-click="addToBook(i.id)">{{ i.title }}</a>
</div>
--- a/client/app/search/search_controller.js Wed Apr 08 17:00:43 2015 +0200
+++ b/client/app/search/search_controller.js Wed Apr 08 17:02:24 2015 +0200
@@ -9,7 +9,7 @@
controller: 'searchCtrl'
});
})
- .controller('searchCtrl', function($scope, $location, $routeParams, searchApi, $modal){
+ .controller('searchCtrl', function($scope, $location, $routeParams, searchApi, ammicoApi, $modal){
$scope.q = $routeParams.q || '';
$scope.results = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp();
@@ -26,7 +26,7 @@
book: idBook,
idInventory: $scope.results.hits[index].metas_dict.inventorynumber
};
- searchApi.listSlides.save(newSlide);
+ ammicoApi.listSlides.save(newSlide);
});
};
})