aboutsummaryrefslogtreecommitdiffstats
path: root/moon_gui/static/app/model/edit
diff options
context:
space:
mode:
Diffstat (limited to 'moon_gui/static/app/model/edit')
-rwxr-xr-xmoon_gui/static/app/model/edit/metadata/metadata.edit.dir.js10
-rwxr-xr-xmoon_gui/static/app/model/edit/metadata/metadata.list.dir.js12
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js2
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js4
-rwxr-xr-xmoon_gui/static/app/model/edit/metarules/metarules.list.dir.js3
5 files changed, 18 insertions, 13 deletions
diff --git a/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js b/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
index 10df83b0..ab79b5db 100755
--- a/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
+++ b/moon_gui/static/app/model/edit/metadata/metadata.edit.dir.js
@@ -42,8 +42,6 @@
edit.fromList = true;
- edit.laoading = false;
-
edit.form = {};
edit.metaData = { name: null, description: null};
@@ -106,7 +104,7 @@
}
- var metaRuleToSend = edit.metaRule;
+ var metaRuleToSend = angular.copy(edit.metaRule);
switch(edit.metaDataType){
@@ -138,7 +136,9 @@
metaRuleToSend = utilService.transformOne(data, 'meta_rules');
- $scope.$emit('event:updateMetaRuleFromMetaDataAddSuccess', metaRuleToSend);
+ angular.copy(metaRuleToSend, edit.metaRule)
+
+ $scope.$emit('event:updateMetaRuleFromMetaDataAddSuccess', edit.metaRule);
stopLoading();
@@ -278,7 +278,7 @@
metaRuleService.findOneWithMetaData(edit.metaRule.id).then( function(metaRule){
- edit.metaRule = metaRule;
+ angular.copy(metaRule, edit.metaRule)
cleanSelectedValue();
diff --git a/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js b/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
index beb2ed86..305192b6 100755
--- a/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
+++ b/moon_gui/static/app/model/edit/metadata/metadata.list.dir.js
@@ -19,7 +19,7 @@
metaRule: '=',
editMode: '=',
// shortDisplay : boolean value
- shortDisplay: '='
+ //shortDisplay: '='
},
restrict : 'E',
replace : true
@@ -80,7 +80,6 @@
$scope.$on('$destroy', rootListeners[unbind]);
}
-
function manageSubjectCategories(){
list.loadingCatSub = true;
@@ -140,7 +139,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
@@ -176,7 +176,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
@@ -212,7 +213,8 @@
alertService.alertSuccess(translatedValue);
});
- list.metaRule = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ metaRuleToSend = metaRuleService.findMetaDataFromMetaRule(utilService.transformOne(data, 'meta_rules'));
+ angular.copy(metaRuleToSend, list.metaRule);
activate();
diff --git a/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js b/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
index b2ebc45d..de6965d0 100755
--- a/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
+++ b/moon_gui/static/app/model/edit/metarules/action/metarules.controller.edit.js
@@ -40,7 +40,7 @@
*/
function metaRuleUpdatedSuccess(event, metaRule){
- edit.metaRule = metaRule;
+ angular.copy(metaRule, edit.metaRule);
}
diff --git a/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js b/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
index 603e7a33..b9dcd19c 100755
--- a/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
+++ b/moon_gui/static/app/model/edit/metarules/action/metarules.edit.basic.dir.js
@@ -67,13 +67,15 @@
var updatedMetaRule = utilService.transformOne(data, 'meta_rules');
+ angular.copy(updatedMetaRule, edit.metaRule);
+
$translate('moon.model.metarules.edit.basic.success', { metaRuleName: updatedMetaRule.name }).then( function(translatedValue) {
alertService.alertSuccess(translatedValue);
});
edit.loading = false;
- $scope.$emit('event:metaRuleBasicUpdatedSuccess', updatedMetaRule);
+ $scope.$emit('event:metaRuleBasicUpdatedSuccess', edit.metaRule);
}
diff --git a/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js b/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
index 120b6a8b..9c1bc72e 100755
--- a/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
+++ b/moon_gui/static/app/model/edit/metarules/metarules.list.dir.js
@@ -86,7 +86,8 @@
'event:metaRuleMapToModelSuccess': $rootScope.$on('event:metaRuleMapToModelSuccess', updateModelFromMapSuccess),
'event:metaRuleUnMappedToModelSuccess': $rootScope.$on('event:metaRuleUnMappedToModelSuccess', modelUnmappedSuccess),
- 'event:metaRuleUnMappedToModelError': $rootScope.$on('event:metaRuleUnMappedToModelError', modelUnmappedError)
+ 'event:metaRuleUnMappedToModelError': $rootScope.$on('event:metaRuleUnMappedToModelError', modelUnmappedError),
+
};