Merge pull request #269 from kevgliss/263

Closes #263
This commit is contained in:
kevgliss 2016-04-01 13:08:13 -07:00
commit 675d10c8a6
21 changed files with 386 additions and 350 deletions

View File

@ -41,6 +41,10 @@ angular.module('lemur')
// set the defaults
AuthorityService.getDefaults($scope.authority);
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
$scope.create = function (authority) {
WizardHandler.wizard().context.loading = true;
AuthorityService.create(authority).then(

View File

@ -1,4 +1,5 @@
<div class="modal-header">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title"><span ng-show="!authority.id">Create</span><span ng-show="authority.id">Edit</span> Authority <span class="text-muted"><small>The nail that sticks out farthest gets hammered the hardest</small></span></h3>
</div>
<div class="modal-body">

View File

@ -1,5 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-header">Edit <span class="text-muted"><small>{{ authority.name }}</small></span></h3>
</div>
<div class="modal-body">

View File

@ -73,6 +73,7 @@ angular.module('lemur')
templateUrl: '/angular/authorities/authority/edit.tpl.html',
controller: 'AuthorityEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return authorityId;
@ -92,6 +93,7 @@ angular.module('lemur')
templateUrl: '/angular/roles/role/role.tpl.html',
controller: 'RolesEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return roleId;
@ -110,7 +112,8 @@ angular.module('lemur')
animation: true,
controller: 'AuthorityCreateController',
templateUrl: '/angular/authorities/authority/authorityWizard.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static',
});
modalInstance.result.then(function () {

View File

@ -90,6 +90,10 @@ angular.module('lemur')
// set the defaults
CertificateService.getDefaults($scope.certificate);
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
$scope.create = function (certificate) {
WizardHandler.wizard().context.loading = true;
CertificateService.create(certificate).then(

View File

@ -1,5 +1,6 @@
<div class="modal-header">
<h3 class="modal-title"><span ng-show="!certificate.id">Create</span><span ng-show="certificate.id">Edit</span> Certificate <span class="text-muted"><small>encrypt all the things</small></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title"><span ng-show="!certificate.id">Create</span><span ng-show="certificate.id">Edit</span> Certificate <span class="text-muted"><small>encrypt all the things</small></span></h3>
</div>
<div class="modal-body">
<div>

View File

@ -1,5 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-header">Edit <span class="text-muted"><small>{{ certificate.name }}</small></span></h3>
</div>
<div class="modal-body">

View File

@ -1,5 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-header">Export <span class="text-muted"><small>{{ certificate.name }}</small></span></h3>
</div>
<div class="modal-body">

View File

@ -1,5 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-header">Upload a certificate <span class="text-muted"><small>encrypt all the things</small></span></h3>
</div>
<div class="modal-body">

View File

@ -125,7 +125,8 @@ angular.module('lemur')
animation: true,
controller: 'CertificateCreateController',
templateUrl: '/angular/certificates/certificate/certificateWizard.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {
@ -139,6 +140,7 @@ angular.module('lemur')
controller: 'CertificateEditController',
templateUrl: '/angular/certificates/certificate/edit.tpl.html',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return certificateId;
@ -156,7 +158,8 @@ angular.module('lemur')
animation: true,
controller: 'CertificateUploadController',
templateUrl: '/angular/certificates/certificate/upload.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {
@ -170,6 +173,7 @@ angular.module('lemur')
controller: 'CertificateExportController',
templateUrl: '/angular/certificates/certificate/export.tpl.html',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return certificateId;

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<h3 class="modal-header"><span ng-show="!destination.fromServer">Create</span><span ng-show="destination.fromServer">Edit</span> Destination <span class="text-muted"><small>oh the places you will go!</small></span></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3><span ng-show="!destination.fromServer">Create</span><span ng-show="destination.fromServer">Edit</span> Destination <span class="text-muted"><small>oh the places you will go!</small></span></h3>
</div>
<div class="modal-body">
<form name="createForm" class="form-horizontal" role="form" novalidate>
@ -52,5 +52,4 @@
<button ng-click="save(destination)" type="submit" ng-disabled="createForm.$invalid" class="btn btn-primary">Save</button>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div>

View File

@ -55,6 +55,7 @@ angular.module('lemur')
templateUrl: '/angular/destinations/destination/destination.tpl.html',
controller: 'DestinationsEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return destinationId;
@ -73,7 +74,8 @@ angular.module('lemur')
animation: true,
controller: 'DestinationsCreateController',
templateUrl: '/angular/destinations/destination/destination.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {

View File

@ -54,7 +54,8 @@ angular.module('lemur')
animation: true,
controller: 'DomainsCreateController',
templateUrl: '/angular/domains/domain/domain.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<h3 class="modal-header"><span ng-show="!notification.fromServer">Create</span><span ng-show="notification.fromServer">Edit</span> Notification <span class="text-muted"><small>you gotta speak louder son!</small></span></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3><span ng-show="!notification.fromServer">Create</span><span ng-show="notification.fromServer">Edit</span> Notification <span class="text-muted"><small>you gotta speak louder son!</small></span></h3>
</div>
<div class="modal-body">
<form name="createForm" class="form-horizontal" role="form" novalidate>
@ -83,5 +83,4 @@
<button ng-click="save(notification)" type="submit" ng-disabled="createForm.$invalid" class="btn btn-primary">Save</button>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div>

View File

@ -61,6 +61,7 @@ angular.module('lemur')
templateUrl: '/angular/notifications/notification/notification.tpl.html',
controller: 'NotificationsEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return notificationId;
@ -79,7 +80,8 @@ angular.module('lemur')
animation: true,
controller: 'NotificationsCreateController',
templateUrl: '/angular/notifications/notification/notification.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<h3 class="modal-header"><span ng-show="!role.fromServer">Create</span><span ng-show="role.fromServer">Edit</span> Role <span class="text-muted"><small>The nail that sticks out farthest gets hammered the hardest</small></span></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3><span ng-show="!role.fromServer">Create</span><span ng-show="role.fromServer">Edit</span> Role <span class="text-muted"><small>The nail that sticks out farthest gets hammered the hardest</small></span></h3>
</div>
<div class="modal-body">
<form name="createForm" class="form-horizontal" ng-submit="save(role)" role="form" novalidate>
@ -83,4 +83,3 @@
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div>
</div>

View File

@ -47,6 +47,7 @@ angular.module('lemur')
templateUrl: '/angular/roles/role/role.tpl.html',
controller: 'RolesEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return roleId;
@ -65,7 +66,8 @@ angular.module('lemur')
animation: true,
controller: 'RolesCreateController',
templateUrl: '/angular/roles/role/role.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {

View File

@ -1,6 +1,6 @@
<div class="modal-header">
<div class="modal-title">
<h3 class="modal-header"><span ng-show="!source.fromServer">Create</span><span ng-show="source.fromServer">Edit</span> Source <span class="text-muted"><small>oh the places you will go!</small></span></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3><span ng-show="!source.fromServer">Create</span><span ng-show="source.fromServer">Edit</span> Source <span class="text-muted"><small>oh the places you will go!</small></span></h3>
</div>
<div class="modal-body">
<form name="createForm" class="form-horizontal" role="form" novalidate>
@ -52,5 +52,4 @@
<button ng-click="save(source)" type="submit" ng-disabled="createForm.$invalid" class="btn btn-primary">Save</button>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div>

View File

@ -55,6 +55,7 @@ angular.module('lemur')
templateUrl: '/angular/sources/source/source.tpl.html',
controller: 'SourcesEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return sourceId;
@ -73,7 +74,8 @@ angular.module('lemur')
animation: true,
controller: 'SourcesCreateController',
templateUrl: '/angular/sources/source/source.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {

View File

@ -1,6 +1,8 @@
<div class="modal-header">
<div class="modal-title">
<h3 class="modal-header"><span ng-show="!user.fromServer">Create</span><span ng-show="user.fromServer">Edit</span> User <span class="text-muted"><small>what was your name again?</small></span></h3>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h3><span ng-show="!user.fromServer">Create</span><span ng-show="user.fromServer">Edit</span> User <span
class="text-muted"><small>what was your name again?</small></span></h3>
</div>
<div class="modal-body">
<form name="createForm" class="form-horizontal" role="form" novalidate>
@ -11,7 +13,8 @@
</label>
<div class="col-sm-10">
<input name="username" ng-model="user.username" placeholder="Name" class="form-control" required/>
<p ng-show="createForm.username.$invalid && !createForm.username.$pristine" class="help-block">You must enter a username</p>
<p ng-show="createForm.username.$invalid && !createForm.username.$pristine" class="help-block">You must enter a
username</p>
</div>
</div>
<div class="form-group"
@ -20,8 +23,10 @@
Email
</label>
<div class="col-sm-10">
<input type="email" name="email" ng-model="user.email" placeholder="hi@example.com" class="form-control" required/>
<p ng-show="createForm.email.$invalid && !createForm.email.$pristine" class="help-block">You must enter an email</p>
<input type="email" name="email" ng-model="user.email" placeholder="hi@example.com" class="form-control"
required/>
<p ng-show="createForm.email.$invalid && !createForm.email.$pristine" class="help-block">You must enter an
email</p>
</div>
</div>
<div ng-if="!user.id" class="form-group"
@ -39,7 +44,8 @@
</label>
<div class="col-sm-10">
<div class="checkbox col-sm-10">
<switch ng-model="user.active" id="active" name="active" ng-init="user.active=true" class="green small"></switch>
<switch ng-model="user.active" id="active" name="active" ng-init="user.active=true"
class="green small"></switch>
</div>
</div>
</div>
@ -50,12 +56,14 @@
<div class="col-sm-10">
<div class="input-group">
<input type="text" ng-model="user.selectedRole" placeholder="Role Name"
typeahead="role.name for role in roleService.findRoleByName($viewValue)" typeahead-loading="loadingRoles"
typeahead="role.name for role in roleService.findRoleByName($viewValue)"
typeahead-loading="loadingRoles"
class="form-control input-md" typeahead-on-select="user.attachRole($item)" typeahead-min-wait="50"
tooltip="Roles control which authorities a user can issue certificates from"
tooltip-trigger="focus" tooltip-placement="top">
<span class="input-group-btn">
<button ng-model="roles.show" class="btn btn-md btn-default" btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">
<button ng-model="roles.show" class="btn btn-md btn-default" btn-checkbox btn-checkbox-true="1"
btn-checkbox-false="0">
<span class="badge">{{ user.roles.total || 0 }}</span>
</button>
</span>
@ -65,7 +73,8 @@
<td><a class="btn btn-sm btn-info" href="#/roles/{{ role.id }}/edit">{{ role.name }}</a></td>
<td><span class="text-muted">{{ role.description }}</span></td>
<td>
<button type="button" ng-click="user.removeRole($index)" class="btn btn-danger btn-sm pull-right">Remove</button>
<button type="button" ng-click="user.removeRole($index)" class="btn btn-danger btn-sm pull-right">Remove
</button>
</td>
</tr>
<tr>
@ -82,4 +91,3 @@
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div>
</div>

View File

@ -43,6 +43,7 @@ angular.module('lemur')
templateUrl: '/angular/users/user/user.tpl.html',
controller: 'UsersEditController',
size: 'lg',
backdrop: 'static',
resolve: {
editId: function () {
return userId;
@ -61,7 +62,8 @@ angular.module('lemur')
animation: true,
controller: 'UsersCreateController',
templateUrl: '/angular/users/user/user.tpl.html',
size: 'lg'
size: 'lg',
backdrop: 'static'
});
modalInstance.result.then(function () {