Skip to content

Commit

Permalink
show different page of response lit
Browse files Browse the repository at this point in the history
  • Loading branch information
chensivan committed Feb 20, 2016
1 parent f6bdc64 commit 0fe12a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
17 changes: 15 additions & 2 deletions lib/response/controllers/main.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ module.exports = function(app) {
resT = "Response Type: ",
resC = "Response Content: ";

$scope.title = "Response List";
$scope.resList = true;
$scope.responseContent = false;

$scope.inputs = {
requestID: "",
iterationMsg: ""
};

Expand Down Expand Up @@ -92,13 +97,21 @@ module.exports = function(app) {
angular.element(document.getElementById(response.id)).css('background-color','white')
})

//change status
}


// change color
$scope.titleClick = function(title){
$scope.title = "Response List";
$scope.resList = true;
$rootScope.isRejecting = false;
$scope.responseContent = false;
}

// show the details of the clicked response
$scope.myClick = function(obj){
$scope.resList = false;
$scope.responseContent = true;
$scope.title = "Click here to go back to response list";
$rootScope.isRejecting = false;

$scope.selectedObj = obj;
Expand Down
8 changes: 4 additions & 4 deletions lib/response/views/main.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@


<div ng-controller='MainController'>
<div class="panel panel2">Response List</div>
<div class="panel panel2" ng-click="titleClick(title)">{{title}}</div>

<div class="panel panel2" ng-repeat="obj in myArr" id="{{obj.id}}" ng-click="myClick(obj)">
<div class="panel panel2" ng-show="resList" ng-repeat="obj in myArr" id="{{obj.id}}" ng-click="myClick(obj)">
<p>{{ obj.request }} </p>
</div>

<div ng-if='selectedObj' ng-controller='ShowRequest' >
<div ng-if="selectedObj" ng-show="responseContent" ng-controller='ShowRequest' >


<!-- <h2>{{selectedObj.id}}</h2> -->
<div class="panel panel2">Request: {{selectedObj.request}}</div>
<div class="panel panel2" >
<p>{{selectedObj.status}}</p>
<div>
Expand Down

0 comments on commit 0fe12a9

Please sign in to comment.