diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-03-01 10:14:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2017-03-01 10:14:19 +0000 |
commit | 3ed12566eeb3c61be6d8ed817e05bb6d80a41868 (patch) | |
tree | 0a3c52440bd38786a474762bbd8a84bdd98de9ce | |
parent | f580c044220ba7d2f190666e029d8380b268ff63 (diff) | |
parent | 08d0b1590ad5055f5e164c28317904cab7451b06 (diff) |
Merge "Fix some issues to fit new framework"
-rw-r--r-- | lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js | 18 | ||||
-rw-r--r-- | lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js index d42d28cc..593c6a3d 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js @@ -95,7 +95,6 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' .controller('homeCtrl', function($scope, $compile, $state, $log, DataService, NgTableParams) {
$scope.param="lctableData";
-
$scope.init = function() {
jQuery.i18n.properties({
language : 'en-US',
@@ -224,7 +223,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' // document.getElementById("svcTempl").innerHTML = templatesInfo;
$scope.optionsValue = tmplatesResponse;
var dropSimple_data = {
- "errmsg" : "Template version is required.",
+ "errmsg" : "Service template is required.",
"modalVar" : "lifecycleData.optSelect",
"labelField" : "templateName",
"optionsValue" : JSON.stringify(tmplatesResponse),
@@ -240,7 +239,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' //$('#myModal .creator').html($compile(Mustache.to_html(text, creatorText.ErrMsg))($scope));
- var modelSubmit_data = {"title":"Submit", "clickAction":"saveData(lifecycleData.id)"};
+ var modelSubmit_data = {"title":"Submit", "clickAction":"saveData()"};
var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
$('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));
@@ -318,8 +317,12 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' var template = $scope.lifecycleData.optSelect;
var lastSelTempCreateParam = DataService.getCreateParamJsonObj();
+ if(template == undefined){
+ document.getElementById("templateParameters").innerHTML = "";
+ return;
+ }
//if the template not changed, no need to update the page.
- if(lastSelTempCreateParam.templateId == template.serviceTemplateId){
+ if(lastSelTempCreateParam.templateId == template.serviceTemplateId && document.getElementById("templateParameters").innerHTML != ""){
return;
}
$.when(DataService.generateCreateParameters(template))
@@ -338,16 +341,15 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' $scope.showAddModal = function() {
console.log("Showing Modal to Add data");
- $scope.lifecycleData = {};
- $scope.textboxErr = false;
-
+ //$scope.lifecycleData = {};
+ //$scope.textboxErr = false;
//$("#myModal").modal();
$("#myModal").modal({}).draggable();
}
$scope.closeModal = function() {
console.log("Closing Modal...");
$('#myModal').modal('hide');
- $state.reload();
+ //$state.reload();
}
$scope.editData = function(id) {
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html index 97b7e0c5..c2e4917b 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html @@ -25,7 +25,7 @@ <br> <div class="panel panel-default"> <table ng-table="tableParams" class="table table table-striped table-hover table-bordered lctable" show-filter="true"> - <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.serviceId})" ui-sref-active="selected-row" ui-sref-opts="{reload: true}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" --> + <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.serviceId})" ui-sref-active="selected-row" ui-sref-opts="{reload: false}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" --> <td header="'ng-table/headers/checkbox.html'"> <input type="checkbox" ng-model="checkboxes.items[lcData.serviceId]" /> </td> |