|
@@ -44,13 +44,21 @@ angular.module('luticateUtils')
|
44
|
44
|
});
|
45
|
45
|
};
|
46
|
46
|
|
47
|
|
- $scope.displayItem = function (item) {
|
48
|
|
- var ctrl = $scope.tableOptions.getEditController();
|
49
|
|
- dialogs.create('views/modals/' + ctrl.toLowerCase() + '.html', ctrl + 'Controller', item)
|
50
|
|
- .result.then(function (data) {
|
51
|
|
- $scope.loadPage($scope.page);
|
52
|
|
- });
|
53
|
|
- };
|
|
47
|
+ if ($scope.tableOptions.displayItem != null){
|
|
48
|
+ $scope.displayItem = function(item)
|
|
49
|
+ {
|
|
50
|
+ return $scope.tableOptions.displayItem(item, $scope);
|
|
51
|
+ };
|
|
52
|
+ }
|
|
53
|
+ else {
|
|
54
|
+ $scope.displayItem = function (item) {
|
|
55
|
+ var ctrl = $scope.tableOptions.getEditController();
|
|
56
|
+ dialogs.create('views/modals/' + ctrl.toLowerCase() + '.html', ctrl + 'Controller', item)
|
|
57
|
+ .result.then(function (data) {
|
|
58
|
+ $scope.loadPage($scope.page);
|
|
59
|
+ });
|
|
60
|
+ };
|
|
61
|
+ }
|
54
|
62
|
|
55
|
63
|
$scope.removeItems = function () {
|
56
|
64
|
if ($scope.selectedItems.length == 0) {
|