minor tweaks and fixes.

This commit is contained in:
Aarni
2016-08-01 20:06:40 +03:00
parent d0b4d04a90
commit 86ce32b1d7
2 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ var app = angular.module("getMembersApp", []);
app.controller("ViewStudentsController", function($scope, $http){
$http.get("/members/api/members").then(function(response){
$scope.members = response.data.records;
$scope.members = response.data;
});
$scope.removeMember = function(id){
var index = -1;
+10 -11
View File
@@ -29,8 +29,8 @@
<![endif]-->
<!--AngularJS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.6/angular.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-route.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.6/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-route.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>
{%load staticfiles %}
@@ -63,7 +63,7 @@
<table id="choose-address-table" class="ui-widget ui-widget-content">
<thead>
<tr ng-repeat="ui-widget-header">
<tr>
<th>ID</th>
<th>Etunimi</th>
<th>Sukunimi</th>
@@ -83,7 +83,7 @@
<td>{{ x.jas }}</td>
<td>{{ x.POR }}</td>
<td>
<input type="button" value="Remove" class="btn btn-primary" ng-click="removeMember(x.id)"></input>
<input type="button" value="Remove" class="btn btn-primary" ng-click="removeMember(x.id)"/>
</td>
</tr>
</tbody>
@@ -96,27 +96,27 @@
<form name="memberForm" ng-submit="submitForm()">
<div class="form-group">
<label>Etunimi: </label>
<input id="firstNameField" required type="text" placeholder="Sähkö" class="form-control" ng-model="firstName"></input>
<input id="firstNameField" required type="text" placeholder="Sähkö" class="form-control" ng-model="firstName"/>
</div>
<div class="form-group">
<label>Sukunimi: </label>
<input id="lastNameField" required type="text" placeholder="Insinööri" class="form-control" ng-model="lastName"></input>
<input id="lastNameField" required type="text" placeholder="Insinööri" class="form-control" ng-model="lastName"/>
</div>
<div class="form-group">
<label>Sähköposti: </label>
<input id="emailField" required type="text" placeholder="sahko.insinoori@aalto.fi" class="form-control" ng-model="email"></input>
<input id="emailField" required type="text" placeholder="sahko.insinoori@aalto.fi" class="form-control" ng-model="email"/>
</div>
<div class="form-group">
<label>AYY jäsen: </label>
<input type="checkbox" id="AYY" value="0" ng-model="AYY"></input>
<input type="checkbox" id="AYY" value="0" ng-model="AYY"/>
</div>
<div class="form-group">
<label>JAS-listaan: </label>
<input type="checkbox" id="JAS" value="0" ng-model="JAS"></input>
<input type="checkbox" id="JAS" value="0" ng-model="JAS"/>
</div>
<div class="form-group">
<label>Asuinkunta: </label>
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="POR"></input>
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="POR"/>
</div>
<button ng-click="send()" type="submit" id="sendmember">Tallenna</button>
</form>
@@ -153,7 +153,6 @@
memberlistApp.controller('ViewStudentsController', function($scope) {
$scope.content="This page will be used to display all the students";
});
</script>