This commit is contained in:
parent
96ec14722c
commit
4573b41b30
|
@ -119,7 +119,12 @@ orgsModule.directive('resolveConflictsModal', function($http, $route, $window) {
|
|||
call_http_post($http, 'api/organizations/conflicts/fix/similar', ids, function(res) {
|
||||
$('#' + scope.modalId).modal('hide');
|
||||
if (scope.openNewOrg == '1') {
|
||||
$('#' + scope.modalId).on('hidden.bs.modal', function (e) { $window.location.assign('#!/edit/0/' + res.data[0]); });
|
||||
$('#' + scope.modalId).on('hidden.bs.modal', function (e) {
|
||||
var oldLoc = $window.location;
|
||||
$window.location.assign('#!/edit/0/' + res.data[0]);
|
||||
var newLoc = $window.location;
|
||||
if (oldLoc == newLoc) $route.reload();
|
||||
});
|
||||
} else {
|
||||
$('#' + scope.modalId).on('hidden.bs.modal', function (e) { $route.reload(); });
|
||||
}
|
||||
|
@ -323,7 +328,13 @@ orgsModule.directive('orgConflicts', function($http, $window, $location, $route,
|
|||
angular.forEach(scope.conflicts, function(o, pos) { ids.push(o.id); });
|
||||
|
||||
if (merge) {
|
||||
call_http_post($http, "api/organizations/conflicts/fix/similar", ids, function(res) { $window.location.assign('#!/edit/0/' + res.data[0]); });
|
||||
call_http_post($http, "api/organizations/conflicts/fix/similar", ids, function(res) {
|
||||
if (res.data[0] == scope.org.id) {
|
||||
$route.reload();
|
||||
} else {
|
||||
$window.location.assign('#!/edit/0/' + res.data[0]);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
call_http_post($http, "api/organizations/conflicts/fix/different", ids, function(res) { $route.reload(); });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue