diff options
author | c00149107 <chenchuanyu@huawei.com> | 2017-03-01 14:14:27 +0800 |
---|---|---|
committer | c00149107 <chenchuanyu@huawei.com> | 2017-03-01 14:14:27 +0800 |
commit | 08d0b1590ad5055f5e164c28317904cab7451b06 (patch) | |
tree | ff40162f38f80da92a29694595f4648bb2704a3f /lifecyclemgr | |
parent | d9865520f9303c415836d4247947ddc7731e0c59 (diff) |
Fix some issues to fit new framework
Fix some issues to fit new framework
Change-Id: I0bbf4127534c771427b89ec85a79e12249de33d1
Issue-ID:GSO-232
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'lifecyclemgr')
-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> |