Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js')
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js35
1 files changed, 33 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
index 239125ec4fc..2e72cf0e152 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -161,7 +161,7 @@
var loadingModal = $scope.showLoadingModal();
$scope.loading = true;
$scope.items = {};
- Set.query({
+ Set.query({
programId: $scope.programSelection,
type: $rootScope.type
}, function(data) {
@@ -250,10 +250,12 @@
copySetOp.categoryParam = inputs.categoryParam;
copySetOp.assigneeParam = inputs.assigneeParam;
copySetOp.noteParam = inputs.noteParam;
+ copySetOp.sourceProgram = inputs.sourceProgram;
copySetOp.$save({
programId: $scope.programSelection,
destinationSet: inputs.destinationSet,
+ sourceProgram: inputs.sourceProgram,
sourceSet: inputs.sourceSet,
}, function(data) {
$scope.isCopying = false;
@@ -332,6 +334,15 @@
resolve: {
sets: function() {
return $scope.sets;
+ },
+ programs: function() {
+ return $scope.programs;
+ },
+ showLoadingModal: function() {
+ return $scope.showLoadingModal;
+ },
+ currentlySelectedProgram: function() {
+ return $scope.programSelection;
}
}
});
@@ -342,8 +353,27 @@
}
- var CopySetModalCtrl = function($scope, $modalInstance, sets) {
+ var CopySetModalCtrl = function($scope, $modalInstance, programs, currentlySelectedProgram, sets, showLoadingModal) {
$scope.setsLocal = angular.copy(sets);
+ $scope.programsLocal = angular.copy(programs);
+ $scope.setsLocalSource = angular.copy(sets);
+ $scope.sourceProgram = currentlySelectedProgram;
+
+ $scope.updateProgramLocal = function() {
+ var loadingModal = showLoadingModal();
+ $scope.loading = true;
+ Set.query({
+ programId: $scope.sourceProgram,
+ type: $rootScope.type
+ }, function(data) {
+ loadingModal.close();
+ $scope.setsLocalSource = data;
+ }, function(data) {
+ loadingModal.close();
+ alert(data.statusText);
+ });
+ };
+
$scope.annotationOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}];
$scope.categoryOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS EMPTY'}, { value: 3, text: 'MERGE DEST AND SOURCE'}];
$scope.assigneeOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS UNASSIGNED'}];
@@ -357,6 +387,7 @@
$scope.ok = function() {
var inputs = {};
inputs.destinationSet = this.destinationSet;
+ inputs.sourceProgram = this.sourceProgram;
inputs.sourceSet = this.sourceSet;
inputs.annotationParam = this.annotationParam;
inputs.categoryParam = this.categoryParam;

Back to the top