summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/portal-admin
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 18:27:19 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-08-23 21:12:56 -0400
commit978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch)
tree17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-FE-common/client/app/views/portal-admin
parentbc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff)
Deliver centralized role management feature
Repair multiple defects also. Revise deployment to use docker-compose. Remove all zip archives. Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69, PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82 Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/portal-admin')
-rw-r--r--ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js8
-rw-r--r--ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html42
-rw-r--r--ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.less2
-rw-r--r--ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js24
-rw-r--r--ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html12
5 files changed, 52 insertions, 36 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js
index 466998a3..49605e59 100644
--- a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js
@@ -51,22 +51,22 @@
portalAdminsService.addPortalAdmin(this.selectedUser.orgUserId)
.then(() => {
$log.debug("NewPortalAdminModalCtrl::addNewPortalAdmin: portal admin added successfully");
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
}).catch(err => {
if(err.status === 409) { //Conflict
confirmBoxService.showInformation('This user already exists as a portal admin!').then(function (isConfirmed) {
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
});
} else {
confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed) {
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
});
}
});
}
}).catch(err => {
confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed) {
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
});
$log.error('portalAdminsService.addPortalAdmin error status: '+ err.status);
});
diff --git a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html
index 206dc168..8205e840 100644
--- a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html
+++ b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html
@@ -17,23 +17,37 @@
limitations under the License.
================================================================================
-->
-<div class="new-admin-modal">
+
+<style>
+ .title{
+ border-bottom: none !important;
+ }
+</style>
+<div>
+ <div class="b2b-modal-header">
+ <h2 class="heading-medium" id="newAdmin">Add New Portal Admin</h2>
+
+ <div class="corner-button in">
+ <button type="button" class="close" aria-label="Close" id="pa-div-close-button"
+ ng-click="$dismiss('cancel')"></button>
+ </div>
+ </div>
- <div class="search-users">
+ <div class="b2b-modal-body">
+ <search-users search-title="" selected-user="newPortalAdmin.selectedUser"></search-users>
+ </div>
- <search-users search-title="Add New Portal Admin"
- selected-user="newPortalAdmin.selectedUser"></search-users>
+ <div class="b2b-modal-footer">
+ <div class="cta-button-group in">
+ <button id="pa-search-users-button-save" class="btn btn-alt btn-small"
+ ng-click="newPortalAdmin.selectedUser && newPortalAdmin.addNewPortalAdmin()"
+ ng-class="{disabled: !newPortalAdmin.selectedUser}">Save</button>
+ <button id="pa-search-users-button-cancel"
+ class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
+ </div>
+ </div>
- <div class="dialog-control">
-
- <button id="pa-search-users-button-save" class="btn btn-alt btn-small"
- ng-click="newPortalAdmin.selectedUser && newPortalAdmin.addNewPortalAdmin()"
- ng-class="{disabled: !newPortalAdmin.selectedUser}">Save
- </button>
- <button id="pa-search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
- </div>
- </div>
-</div>
+ </div>
<script>
$(document).ready(function(){
diff --git a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.less b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.less
index f8e1960c..7c8e5ff1 100644
--- a/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.less
+++ b/ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.less
@@ -7,7 +7,7 @@
.admin-app-roles {
.title {
//.n18r;
- .dGray18r; //AT&T Dark Gray
+ .dGray18r;
border-bottom: @blue-active 3px solid;
}
diff --git a/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js b/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js
index 89f6d0ae..de1557a9 100644
--- a/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js
+++ b/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js
@@ -20,7 +20,7 @@
'use strict';
(function () {
class PortalAdminsCtrl {
- constructor($log, portalAdminsService, ngDialog, confirmBoxService) {
+ constructor($log, portalAdminsService, ngDialog, confirmBoxService, $modal) {
let updateTableData = () => {
this.isLoadingTable = true;
@@ -91,20 +91,22 @@
}
}
}
- ngDialog.open({
+
+ var modalInstance = $modal.open({
templateUrl: 'app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html',
- controller: 'NewPortalAdminModalCtrl',
- controllerAs: 'newPortalAdmin',
+ controller: 'NewPortalAdminModalCtrl as newPortalAdmin',
+ sizeClass: 'modal-medium',
data: data
- }).closePromise.then(needUpdate => {
- if(needUpdate.value === true){
- $log.debug('PortalAdminsCtrl::openAddNewPortalAdminModal: updating Portal Admin table data...');
- updateTableData();
- }
- });
+ })
+
+ modalInstance.result.finally(function () {
+ $log.debug('PortalAdminsCtrl::openAddNewPortalAdminModal: updating Portal Admin table data...');
+ updateTableData();
+ });
+
};
}
}
- PortalAdminsCtrl.$inject = ['$log', 'portalAdminsService', 'ngDialog', 'confirmBoxService'];
+ PortalAdminsCtrl.$inject = ['$log', 'portalAdminsService', 'ngDialog', 'confirmBoxService', '$modal'];
angular.module('ecompApp').controller('PortalAdminsCtrl', PortalAdminsCtrl);
})();
diff --git a/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html b/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html
index 33268efb..e5396348 100644
--- a/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html
+++ b/ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html
@@ -29,7 +29,7 @@
<input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="portalAdmin.searchString">
</div>
<div class="table-control-buttons">
- <button class="btn btn-alt btn-small" ng-click="portalAdmin.openAddNewPortalAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Portal Admin</button>
+ <button class="btn btn-alt btn-small" id="portal-admin-button-add" ng-click="portalAdmin.openAddNewPortalAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Portal Admin</button>
</div>
</div>
@@ -47,11 +47,11 @@
</thead>
<tbody b2b-table-row type="body" row-repeat="rowData in portalAdmin.portalAdminsTableData">
<tr>
- <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>
- <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>
- <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.loginId"></td>
- <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
- <span class="icon-misc-trash" ng-click="portalAdmin.removePortalAdmin(rowData)"></span>
+ <td b2b-table-body id="rowheader_t1_{{$index}}-firstName" headers="col1" ng-bind="rowData.firstName"></td>
+ <td b2b-table-body id="rowheader_t1_{{$index}}-lastName" headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>
+ <td b2b-table-body id="rowheader_t1_{{$index}}-loginId" headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.loginId"></td>
+ <td b2b-table-body id="rowheader_t1_{{$index}}" headers="rowheader_t1_{{$index}} col4">
+ <span id="{{$index}}-button-portal-admin-remove" class="icon-misc-trash" ng-click="portalAdmin.removePortalAdmin(rowData)"></span>
</td>
</tr>
</tbody>