Revision 37474
Added by Claudio Atzori about 9 years ago
dedup_inspector_controllers.js | ||
---|---|---|
42 | 42 |
}; |
43 | 43 |
$scope.group = groupService.getGroup(); |
44 | 44 |
$scope.dissimilar = groupService.getDissimilar(); |
45 |
|
|
46 |
$scope.groupIdDetails = { |
|
47 |
map : {}, |
|
48 |
list : [] |
|
49 |
}; |
|
45 | 50 |
|
46 |
if ($scope.group == null || $scope.group.entityType.type != $scope.validentityTypes[$routeParams.entityType].type) { |
|
51 |
$scope.doResetForm = function() { |
|
52 |
|
|
47 | 53 |
$scope.group = { |
48 | 54 |
actionSet : $routeParams.actionSet, |
55 |
group : [], |
|
56 |
rootIds : [], |
|
49 | 57 |
details : {}, |
50 | 58 |
byRoot : {}, |
51 | 59 |
byMerged : {}, |
52 |
group : [], |
|
53 |
rootIds : [], |
|
60 |
rootList : [], |
|
54 | 61 |
detailList : [], |
55 |
rootList : [], |
|
62 |
|
|
56 | 63 |
entityType : $scope.validentityTypes[$routeParams.entityType] |
57 |
} |
|
64 |
} |
|
65 |
|
|
66 |
$scope.dissimilar = { |
|
67 |
group : {}, |
|
68 |
entityType : $scope.validentityTypes[$routeParams.entityType] |
|
69 |
}; |
|
70 |
|
|
71 |
$scope.removalGroup = []; |
|
72 |
} |
|
73 |
|
|
74 |
if ($scope.group == null || $scope.group.entityType.type != $scope.validentityTypes[$routeParams.entityType].type) { |
|
75 |
|
|
76 |
$scope.doResetForm(); |
|
58 | 77 |
groupService.setGroup($scope.group); |
59 |
$scope.removalGroup = []; |
|
60 | 78 |
}; |
61 | 79 |
|
62 | 80 |
$scope.group.actionSet = $routeParams.actionSet; |
... | ... | |
69 | 87 |
groupService.setDissimilar($scope.dissimilar); |
70 | 88 |
} |
71 | 89 |
|
72 |
$scope.groupIdDetails = { |
|
73 |
map : {}, |
|
74 |
list : [] |
|
75 |
}; |
|
76 |
|
|
77 | 90 |
if($routeParams.query && $routeParams.query.length > 0) { |
91 |
if($scope.query != $routeParams.query) { |
|
92 |
$scope.doResetForm(); |
|
93 |
} |
|
94 |
|
|
78 | 95 |
$scope.query = $routeParams.query; |
79 | 96 |
} |
97 |
|
|
80 | 98 |
if($routeParams.start) { |
81 | 99 |
$scope.start = parseInt($routeParams.start); |
82 | 100 |
} else { |
83 | 101 |
$scope.start = 0; |
84 | 102 |
} |
103 |
|
|
85 | 104 |
$scope.rows = 20; |
86 | 105 |
|
87 | 106 |
$scope.resetForm = function() { |
... | ... | |
89 | 108 |
$scope.doResetForm(); |
90 | 109 |
} |
91 | 110 |
} |
92 |
$scope.doResetForm = function() { |
|
93 |
$scope.group.group = []; |
|
94 |
$scope.group.rootIds = []; |
|
95 |
$scope.group.details = {}; |
|
96 |
$scope.group.byRoot = {}; |
|
97 |
$scope.group.byMerged = {}; |
|
98 |
$scope.group.rootList = []; |
|
99 |
$scope.group.detailList = []; |
|
100 |
|
|
101 |
$scope.groupIdDetails.map = {}; |
|
102 |
$scope.groupIdDetails.list = []; |
|
103 | 111 |
|
104 |
$scope.dissimilar = { |
|
105 |
group : {}, |
|
106 |
entityType : $scope.validentityTypes[$routeParams.entityType] |
|
107 |
}; |
|
108 |
|
|
109 |
$scope.removalGroup = []; |
|
110 |
} |
|
111 |
|
|
112 | 112 |
$scope.search = function() { |
113 | 113 |
$scope.showSpinner(); |
114 | 114 |
var q = ''; |
... | ... | |
138 | 138 |
$scope.hideSpinner(); |
139 | 139 |
$scope.showError('Registration failed: ' + err.message); |
140 | 140 |
}); |
141 |
$scope.doResetForm(); |
|
142 | 141 |
} |
143 | 142 |
|
144 | 143 |
$scope.defaultFields = function() { |
... | ... | |
344 | 343 |
$scope.remove(rid, rid); |
345 | 344 |
}); |
346 | 345 |
|
347 |
|
|
348 |
//$scope.remove(id, idList); |
|
349 |
//var dissimilar = $scope.removeFromIdList([id], group); |
|
350 |
//$scope.dissimilar.group[id] = dissimilar; |
|
351 |
|
|
352 |
//var newgroup = $scope.removeFromIdList($scope.removalGroup, $scope.group.group); |
|
353 |
//$scope.group.group = newgroup; |
|
354 |
|
|
355 | 346 |
$scope.removalGroup = []; |
356 | 347 |
} |
357 | 348 |
|
Also available in: Unified diff
don't reset form while navigating the search results