Skip to content

Commit

Permalink
Deletion of rows implemented, styled cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
gpfunk committed Mar 17, 2014
1 parent 8fbc5ab commit 4d959f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/webapp/Partials/timesheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1 class="secondary col-xs-4">TimeSheet</h1>
<td><input type="text" class="form-control" ng-readonly="timesheet.signed" ng-model="r.thursday" /></td>
<td><input type="text" class="form-control" ng-readonly="timesheet.signed" ng-model="r.friday" /></td>
<td>{{total}}</td>
<td><a href="#">Delete</a></td>
<td><span ng-click="delete($index)" class="cursor-hand">Delete</span></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,7 @@ time {
background: #dddddd;
border-radius: 5px;
margin-bottom: 10px; }

.cursor-hand {
cursor: pointer;
}
4 changes: 4 additions & 0 deletions src/main/webapp/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,10 @@ cascadiaControllers.controller('TimesheetController', ['$scope', 'CascadiaServic
$scope.save = function() {
$scope.timesheet.put();
}

$scope.delete = function($index) {
$scope.timesheet.timesheetRows.splice($index, 1);
}
}
]);

Expand Down

0 comments on commit 4d959f6

Please sign in to comment.