summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp
diff options
context:
space:
mode:
authorguangxingwang <gw1218@att.com>2018-02-13 13:25:42 -0600
committerguangxingwang <gw1218@att.com>2018-02-13 13:26:18 -0600
commit204b88bda2339b3a395ea35bb5b7d500891527b7 (patch)
treecac1a857c242ada2fb76192d316d2258a23543d7 /POLICY-SDK-APP/src/main/webapp
parent2f0f31787cd35520b65fb3577d3dac21c1e50062 (diff)
Fix a Bug on Editor Screen
On editor screen, sometimes click on + button only one click, it creates more than text fields Issue-ID: POLICY-629 Change-Id: I9acc95fa0a4a7df3828e579f994c06bfa3199eb5 Signed-off-by: guangxingwang <gw1218@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
index 6f316c1e3..101366400 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
@@ -438,6 +438,13 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind
}
//After initially create the edit template, reset it to false.
$scope.isInitEditTemplate = false;
+ if($scope.temp.policy.editPolicy){
+ //reset it to false since the template has been created
+ $scope.temp.policy.editPolicy = false;
+ //clean all the events of addNewChoice
+ $scope.$on('$destroy', addNewChoice);
+ }
+
}
var ele = angular.element(document.getElementById("DynamicTemplate"));
$compile(ele.contents())($scope);
#fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
###
# ============LICENSE_START=======================================================
# ONAP-PDP
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
###

PDP_URL= , test, test