Skip to content

Commit

Permalink
Merge 1e6904e into 8743b58
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Jul 25, 2018
2 parents 8743b58 + 1e6904e commit 0dc7e2c
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 32 deletions.
11 changes: 11 additions & 0 deletions app/controllers/statusController.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ app.controller('StatusController', function ($controller, $scope, ApiResponseAct

$scope.editStatus = function (status) {
$scope.statusToEdit = status;
if ($scope.statusToEdit.mapping.length === 0) {
$scope.statusToEdit.mapping.push('');
}
$scope.openModal('#editStatusModal');
};

Expand All @@ -54,6 +57,14 @@ app.controller('StatusController', function ($controller, $scope, ApiResponseAct
});
};

$scope.addMatch = function (status) {
status.mapping.push('');
};

$scope.removeMatch = function (status, index) {
status.mapping.splice(index, 1);
};

$scope.cancelEditStatus = function () {
$scope.statusToEdit.refresh();
$scope.statusToEdit = {};
Expand Down
5 changes: 5 additions & 0 deletions app/views/directives/remoteProjectManagerForm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div ng-repeat="setting in managementSettings" class=form-group>
<label for="{{setting.key}}-input">{{setting.gloss}}</label>
<input class="form-control" id="{{setting.key}}" type="{{setting.key === 'password' ? 'password' : 'text'}}" ng-model="model.settings[setting.key]"
placeholder="{{setting.gloss}} for Remote Project Manager" />
</div>
9 changes: 0 additions & 9 deletions app/views/directives/vmsForm.html

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/management.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<wvr-tabs target="managementView">
<wvr-tab path="projects" view="views/management/projects.html" label="projects">Projects</wvr-tab>
<wvr-tab path="statuses" view="views/management/statuses.html" label="statuses">Statuses</wvr-tab>
<wvr-tab path="remoteProjectManager" view="views/management/remoteProjectManager.html" label="remoteProjectManager">Version Management Software</wvr-tab>
<wvr-tab path="remoteProjectManager" view="views/management/remoteProjectManager.html" label="remoteProjectManager">Remote Progect Managers</wvr-tab>
<wvr-tab path="users" view="views/management/users.html" label="users">Users</wvr-tab>
</wvr-tabs>

Expand Down
4 changes: 2 additions & 2 deletions app/views/management/remoteProjectManager.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="management-table" ng-controller="RemoteProjectManagerController">

<button class="btn btn-default view-action-button" ng-click="openModal('#addRemoteProjectManagerModal')">Add a Version Management Software</button>
<button class="btn btn-default view-action-button" ng-click="openModal('#addRemoteProjectManagerModal')">Add a Remote Project Manager</button>
<hr />

<table ng-table="tableParams" show-filter="false" class="table table-bordered table-striped remoteProjectManager-table">
<tr ng-repeat="remoteProjectManager in $data | orderBy: 'name'">
<td title="'Version Management Software'">{{remoteProjectManager.name}}</td>
<td title="'Remote Project Manager'">{{remoteProjectManager.name}}</td>
<td title="'Settings'">
<ul class="list-unstyled">
<li ng-repeat="setting in typeSettings(remoteProjectManager.type) | filter:{visible:true}">
Expand Down
8 changes: 3 additions & 5 deletions app/views/management/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div class="row" ng-controller="UserRepoController">

<!-- ADMINS AND MANAGERS ONLY -->
<div ng-if="!isManager() && !isAdmin()" class="row" ng-include src="'views/restrictedAccess.html'" ></div>
<div ng-if="!isManager() && !isAdmin()" class="row" ng-include src="'views/restrictedAccess.html'"></div>

<div ng-if="isManager() || isAdmin()" class="col-12">
<div class="panel panel-default users-container">
<div class="panel panel-default users-container">
<div class="panel-heading">
<h3 class="panel-title">Users</h3>
</div>
Expand Down Expand Up @@ -41,6 +41,4 @@ <h3 class="panel-title">Users</h3>
</div>


</div>


</div>
2 changes: 1 addition & 1 deletion app/views/modals/addProjectModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4 class="modal-title">Create Project</h4>
</validatedinput>

<div class="form-group">
<label for="remoteProjectManager">Associate Version Management Software</label>
<label for="remoteProjectManager">Associate Remote Project Manager</label>
<select class="form-control" ng-options="remoteProjectManager.name for remoteProjectManager in remoteProjectManagers" ng-model="projectToCreate.remoteProjectManager"
name="remoteProjectManager">
<option value="" selected>None</option>
Expand Down
4 changes: 2 additions & 2 deletions app/views/modals/addRemoteProjectManagerModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<button type="button" class="close modal-close" aria-label="Close" ng-click="resetCreateRemoteProjectManager()">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Create Version Management Software</h4>
<h4 class="modal-title">Create Remote Project Manager</h4>
</div>

<form name="remoteProjectManagerForms.create" ng-submit="createRemoteProjectManager()" novalidate class="remoteProjectManager-forms-create">

<validationmessage results="remoteProjectManagerForms.getResults()"></validationmessage>

<div class="modal-body">
<validatedinput model="remoteProjectManagerToCreate" property="name" label="Name" placeholder="Name of the Version Management Software"
<validatedinput model="remoteProjectManagerToCreate" property="name" label="Name" placeholder="Name of the Remote Project Manager"
form="remoteProjectManagerForms.create" validations="remoteProjectManagerForms.validations" results="remoteProjectManagerForms.getResults()">
</validatedinput>

Expand Down
11 changes: 6 additions & 5 deletions app/views/modals/addStatusModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h4 class="modal-title">Create Status</h4>
<validationmessage results="statusForms.getResults()"></validationmessage>

<div class="modal-body">

<validatedinput model="statusToCreate" property="identifier" label="Identifier" placeholder="Identifier of the Status" form="statusForms.create"
validations="statusForms.validations" results="statusRepo.getResults()">
</validatedinput>
Expand All @@ -18,14 +19,14 @@ <h4 class="modal-title">Create Status</h4>
<label for="mapping">Mapping</label>
<div style="margin-bottom: 4px" class="input-group" ng-repeat="match in statusToCreate.mapping track by $index">

<input name="mapping" type="text" class="form-control" ng-model="match" />
<input name="mapping" type="text" class="form-control" ng-model="statusToCreate.mapping[$index]" />

<span ng-if="$last" class="input-group-addon toggle-href">
<span class="glyphicon glyphicon-plus" ng-click="statusToCreate.mapping.push('')"></span>
<span ng-if="$last" class="input-group-addon toggle-href" ng-click="addMatch(statusToCreate)">
<span class="glyphicon glyphicon-plus"></span>
</span>

<span ng-if="!$last" class="input-group-addon toggle-href">
<span class="glyphicon glyphicon-minus" ng-click="statusToCreate.mapping.splice($index, 1)"></span>
<span ng-if="!$last" class="input-group-addon toggle-href" ng-click="removeMatch(statusToCreate, $index)">
<span class="glyphicon glyphicon-minus"></span>
</span>

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/modals/editProjectModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4 class="modal-title">Edit Project</h4>
</validatedinput>

<div class="form-group">
<label for="remoteProjectManager">Associate Version Management Software</label>
<label for="remoteProjectManager">Associate Remote Project Manager</label>
<select class="form-control" ng-model="projectToEdit.remoteProjectManager" name="remoteProjectManager">
<option value="" ng-selected="projectToEdit.remoteProjectManager === undefined">None</option>
<option value="" ng-repeat="remoteProjectManager in remoteProjectManagers" ng-value="remoteProjectManager" ng-selected="projectToEdit.remoteProjectManager.id === remoteProjectManager.id">{{remoteProjectManager.name}}</option>
Expand Down
4 changes: 2 additions & 2 deletions app/views/modals/editRemoteProjectManagerModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<button type="button" class="close modal-close" aria-label="Close" ng-click="cancelEditRemoteProjectManager()">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Edit Version Managent Software</h4>
<h4 class="modal-title">Edit Remote Project Manager</h4>
</div>

<form name="remoteProjectManagerForms.edit" ng-submit="updateRemoteProjectManager()" novalidate>

<validationmessage results="remoteProjectManagerForms.getResults()"></validationmessage>

<div class="modal-body">
<validatedinput model="remoteProjectManagerToEdit" property="name" label="Name" placeholder="Name of the Version Management Software"
<validatedinput model="remoteProjectManagerToEdit" property="name" label="Name" placeholder="Name of the Remote Project Manager"
form="remoteProjectManagerForms.edit" validations="remoteProjectManagerForms.validations" results="remoteProjectManagerForms.getResults()">
</validatedinput>

Expand Down
9 changes: 5 additions & 4 deletions app/views/modals/editStatusModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h4 class="modal-title">Edit Status</h4>
<validationmessage results="statusForms.getResults()"></validationmessage>

<div class="modal-body">

<validatedinput model="statusToEdit" property="identifier" label="Identifier" placeholder="Identifier of the Status" form="statusForms.edit"
validations="statusForms.validations" results="statusForms.getResults()" autocomplete="off">
</validatedinput>
Expand All @@ -20,12 +21,12 @@ <h4 class="modal-title">Edit Status</h4>

<input name="mapping" type="text" class="form-control" ng-model="statusToEdit.mapping[$index]" />

<span ng-if="$last" class="input-group-addon toggle-href">
<span class="glyphicon glyphicon-plus" ng-click="statusToEdit.mapping.push('')"></span>
<span ng-if="$last" class="input-group-addon toggle-href" ng-click="addMatch(statusToEdit)">
<span class="glyphicon glyphicon-plus"></span>
</span>

<span ng-if="!$last" class="input-group-addon toggle-href">
<span class="glyphicon glyphicon-minus" ng-click="statusToEdit.mapping.splice($index, 1)"></span>
<span ng-if="!$last" class="input-group-addon toggle-href" ng-click="removeMatch(statusToEdit, $index)">
<span class="glyphicon glyphicon-minus"></span>
</span>

</div>
Expand Down

0 comments on commit 0dc7e2c

Please sign in to comment.