Skip to content

Commit

Permalink
Merge 78a23b0 into 8743b58
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Jul 25, 2018
2 parents 8743b58 + 78a23b0 commit acfbb38
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 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
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
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
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 acfbb38

Please sign in to comment.