summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs')
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js15
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html131
-rw-r--r--ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less51
3 files changed, 144 insertions, 53 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
index 9aec9b4f..a5ba0215 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
@@ -21,15 +21,14 @@
'use strict';
(function () {
class NewAdminModalCtrl {
- constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location) {
-
+ constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location, items) {
let init = () => {
this.isSaving = false;
this.originalApps = [];
/* istanbul ignore if */
- if ($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState) {
- this.selectedUser = $scope.ngDialogData.selectedUser;
- this.dialogState = $scope.ngDialogData.dialogState;
+ if (items && items.selectedUser && items.dialogState) {
+ this.selectedUser = items.selectedUser;
+ this.dialogState = items.dialogState;
this.isShowBack = false;
if (this.dialogState === 2) {
this.getAdminAppsRoles();
@@ -162,7 +161,7 @@
$log.debug('Admin apps roles updated successfully!', res);
//close and resolve dialog promise with true (to update the table)
this.remindToAddUserIfNecessary();
- $scope.closeThisDialog(true);
+ $scope.$dismiss('cancel');
}).catch(err => {
$log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);
}).finally(()=> {
@@ -193,7 +192,7 @@
* add it to the user administrated apps list
*/
$scope.$watch('newAdmin.selectedNewApp.value', (newVal) => {
- var newVal= JSON.parse(newVal);
+ if(newVal) var newVal= JSON.parse(newVal);
if (!newVal || newVal.isAdmin === undefined) {
return;
}
@@ -248,6 +247,6 @@
}
}
- NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location'];
+ NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location', 'items'];
angular.module('ecompApp').controller('NewAdminModalCtrl', NewAdminModalCtrl);
})();
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
index a18b8f60..f186fc58 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
@@ -17,59 +17,102 @@
limitations under the License.
================================================================================
-->
-<div class="new-admin-modal">
+ <style>
+ .title{
+ border-bottom: none !important;
+ }
+
+ .b2b-modal-footer .cta-button-group {
+ border-top: 0px solid #d2d2d2;
+ }
+
+</style>
- <div class="search-users" ng-show="newAdmin.dialogState===1">
+<div>
+ <div ng-if="newAdmin.dialogState===1">
- <search-users search-title="New Admin"
- selected-user="newAdmin.selectedUser"></search-users>
+ <div class="b2b-modal-header">
+ <h2 class="heading-medium" id="newAdmin">New Admin</h2>
- <div class="dialog-control">
- <button id="search-users-button-next" class="btn btn-alt btn-small" ng-click="newAdmin.selectedUser && newAdmin.getAdminAppsRoles()"
- ng-class="{disabled: !newAdmin.selectedUser}">Next
- </button>
- <button id="search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
- </div>
- </div>
- <br>
- <div id="div-admin-app-roles" class="admin-app-roles" ng-show="newAdmin.dialogState===2">
- <div class="title" id="title"
- ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'"></div>
- <div class="app-roles-main">
- <div id="div-app-roles-main-title" class="app-roles-main-title">
- <span class="left">Administrates:</span>
- <!--<span class="right" ng-click="newAdmin.addAdministratedApp()">+Add</span>-->
- </div>
+ <div class="corner-button in">
+ <button type="button" class="close" aria-label="Close" id="admin-button-cancel"
+ ng-click="$dismiss('cancel')"></button>
+ </div>
+ </div>
+ <div class="b2b-modal-body" tabindex="0"
+ aria-label="Modal header text content" role="region">
+ <search-users search-title="" selected-user="newAdmin.selectedUser"></search-users>
+ </div>
- <div class="adminAppsRoles_dropdown">
- <select id="dropdown1" name="dropdown1" b2b-dropdown
- placeholder-text="Select application"
- ng-model="newAdmin.selectedNewApp.value">
- <option b2b-dropdown-list option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id " ng-disabled="!filteredApps.length" value="{{app}}">{{app.appName}}</option>
- </select>
- </div>
- <br>
+ <div class="b2b-modal-footer">
+ <div class="cta-button-group in">
+ <button id="search-users-button-next" class="btn btn-alt btn-small"
+ ng-click="newAdmin.selectedUser && newAdmin.getAdminAppsRoles()"
+ ng-class="{disabled: !newAdmin.selectedUser}">Next</button>
+ <button id="search-users-button-cancel"
+ class="btn btn-alt btn-small" id="div-cancel-button" ng-click="$dismiss('cancel')">Cancel</button>
+ </div>
+ </div>
- <div class="admin-roles-list">
- <div ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id" ng-show="app.isAdmin">
- <div id="select-app-{{app.appName.split(' ').join('-')}}" class="administrated-application" ng-bind="app.appName | elipsis: 57"></div>
- <i id="i-delete-application" class="icon-misc-trash" ng-click="newAdmin.unadminApp(app)"> </i>
- </div>
- </div>
+ </div>
+
+ <div id="div-admin-app-roles" class="app-roles-main" ng-if="newAdmin.dialogState===2">
+ <div class="b2b-modal-header">
+ <div class="title" id="title"
+ ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'">
+ </div>
- <div class="dialog-control">
- <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
- <button id="button-back" ng-show="newAdmin.isShowBack" class="btn btn-alt btn-small" ng-click="newAdmin.navigateBack()">Back</button>
- <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small" ng-click="newAdmin.updateAdminAppsRoles()"
- ng-class="{disabled: false}">Save
- </button>
- <button id="div-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
- </div>
+ <div class="corner-button in">
+ <button type="button" class="close" aria-label="Close"
+ ng-click="$dismiss('cancel')"></button>
+ </div>
+ </div>
- </div>
- </div>
+ <div class="b2b-modal-body">
+ <div id="div-app-roles-main-title" class="app-roles-main-title">
+ <span class="left">Administrates:</span>
+ <!--<span class="right" ng-click="newAdmin.addAdministratedApp()">+Add</span>-->
+ </div>
+ <div class="adminAppsRoles_dropdown">
+ <select id="dropdown1" name="dropdown1" b2b-dropdown
+ placeholder-text="Select application"
+ ng-model="newAdmin.selectedNewApp.value">
+ <option b2b-dropdown-list
+ option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id "
+ ng-disabled="!filteredApps.length" value="{{app}}">{{app.appName}}</option>
+ </select>
+ </div>
+ <br>
+ <div class="admin-roles-list">
+ <div
+ ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id"
+ ng-show="app.isAdmin">
+ <span id="select-app-{{app.appName.split(' ').join('-')}}"
+ class="administrated-application"
+ ng-bind="app.appName | elipsis: 57"></span> <i
+ id="i-delete-application" class="icon-misc-trash"
+ ng-click="newAdmin.unadminApp(app)"> </i>
+ </div>
+ </div>
+ </div>
+ <br>
+ <div class="b2b-modal-footer">
+ <div class="cta-button-group in">
+
+ <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
+ <button id="button-back" ng-show="newAdmin.isShowBack"
+ class="btn btn-alt btn-small" ng-click="newAdmin.navigateBack()">Back</button>
+ <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small"
+ ng-click="newAdmin.updateAdminAppsRoles()"
+ ng-class="{disabled: false}">Save</button>
+ <button id="div-cancel-button" class="btn btn-alt btn-small"
+ ng-click="$dismiss('cancel')">Cancel</button>
+
+ </div>
+ </div>
+ </div>
</div>
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
index f7c1111d..1ac5963f 100644
--- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
+++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
@@ -1,6 +1,7 @@
.new-admin-modal {
height: 430px;
margin-left: 20px;
+ height: 350px;
.search-users {
}
@@ -8,7 +9,7 @@
.admin-app-roles {
.title {
//.n18r;
- .dGray18r; //AT&T Dark Gray
+ .dGray18r;
border-bottom: @blue-active 3px solid;
}
@@ -81,5 +82,53 @@
}
}
+
+ .adminForm-title {
+ color: #5a5a5a;
+ font-size: 18px;
+ border-bottom: #067ab4 3px solid;
+ margin-left:0px;
+ }
+
+ .adminForm-name-property-label {
+ margin-bottom: 5px;
+ color: #5a5a5a;
+ font-size: 14px;
+ font-weight: bold;
+ padding-top: 20px;
+ }
+
+ .adminForm-requiredId {
+ color: red;
+ }
+
+ .adminForm-name-property-required {
+ color: #cf2a2a;
+ font-size: 10px;
+ }
+
+ .adminForm-property-required-small {
+ position: absolute;
+ }
+
+ .adminForm-code-property-label {
+ margin-bottom: 5px;
+ color: #5a5a5a;
+ font-size: 14px;
+ font-weight: bold;
+ padding-top: 20px;
+ }
+
+ .adminForm-code-property-input {
+ display: inline-block;
+ width: 338px;
+ //height: 40px;
+ }
+
+ .adminForm-code-property-required {
+ color: #cf2a2a;
+ font-size: 10px;
+ }
+
}