resolve : resolver
});
+ // search page shows the list view by default
+ $routeProvider.when('/cat/item/search/:idList', {
+ templateUrl: './cat/item/t_list',
+ controller: 'ListCtrl',
+ resolve : resolver
+ });
+
$routeProvider.when('/cat/item/:id', {
templateUrl: './cat/item/t_view',
controller: 'ViewCtrl',
* List view - grid stuff
*/
.controller('ListCtrl',
- ['$scope','$q','$location','$timeout','egCore','egGridDataProvider','itemSvc',
-function($scope , $q , $location , $timeout , egCore , egGridDataProvider , itemSvc) {
+ ['$scope','$q','$routeParams','$location','$timeout','egCore','egGridDataProvider','itemSvc',
+function($scope , $q , $routeParams , $location , $timeout , egCore , egGridDataProvider , itemSvc) {
+ var copyId = [];
+ var cp_list = $routeParams.idList;
+ if (cp_list) {
+ copyId = cp_list.split(',');
+ }
+
$scope.context.page = 'list';
/*
$location.path('/cat/item/' + item.id + '/triggered_events');
}
+ if (copyId.length > 0) {
+ itemSvc.fetch(null,copyId).then(
+ function() {
+ copyGrid.refresh();
+ }
+ );
+ }
+
}])
/**