From 56c2439e74a5a17a6ca864371d4c3a621be566c4 Mon Sep 17 00:00:00 2001 From: Luji7 Date: Thu, 15 Sep 2016 00:37:15 +0800 Subject: add parameter tab event registration Change-Id: Ifabf5d41760a01a5a70ee52caca1a078d1729463 Signed-off-by: Luji7 --- openo-portal/portal-lifecyclemgr/js/gsolcm.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'openo-portal') diff --git a/openo-portal/portal-lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/js/gsolcm.js index 1a94feba..d66df947 100644 --- a/openo-portal/portal-lifecyclemgr/js/gsolcm.js +++ b/openo-portal/portal-lifecyclemgr/js/gsolcm.js @@ -14,8 +14,20 @@ * limitations under the License. */ var templateParameters = { - templateName: '', - parameters: [] + templateName: '', + parameters: [] +}; +var lcmHandler = function(){ + this._addOwnEvents(); +}; + +lcmHandler.prototype = { + _addOwnEvents : function () { + $('a[data-toggle="tab"]').on('show.bs.tab', this.beforeParameterTabShow); + }, + beforeParameterTabShow : function (event) { + renderTemplateParametersTab(); + } }; function renderTemplateParametersTab() { @@ -25,7 +37,7 @@ function renderTemplateParametersTab() { } function fetchTemplateParameterDefinitions(parameters) { - var serviceTemplate = parameters.name; + var serviceTemplate = parameters.templateName; var currentServiceTemplate = $("#svcTempl").val(); // Do not need to fetch template parameters if template do not change in UI. if(serviceTemplate === currentServiceTemplate) { -- cgit 1.2.3-korg