Merge branch 'master' of 86.50.143.68:vtmk/web2.0

This commit is contained in:
okalintu
2016-08-08 20:36:52 +03:00
2 changed files with 19 additions and 7 deletions
+2 -5
View File
@@ -1,6 +1,4 @@
<h1> Jäsenlista </h1>
<div >
<table id="choose-address-table" class="ui-widget ui-widget-content">
<thead>
@@ -22,11 +20,10 @@
<td>{{ x.jas }}</td>
<td>{{ x.POR }}</td>
<td>
<a href="#/edit/{{x.id}}"<input type="button" value="Edit" class="btn btn-info"/></a>
<input type="button" value="Remove" class="btn btn-danger" ng-click="delete_member(x.id)"/>
<a href="#/edit/{{x.id}}"<input type="button" value="Edit" class="btn btn-info"/></a>
<input type="button" value="Remove" class="btn btn-danger" confirmed-click="delete_member(x.id)" ng-confirm-click="Are you sure?"/>
</td>
</tr>
</tbody>
</table>
</div>
+17 -2
View File
@@ -1,4 +1,3 @@
app.controller("getController", function($scope, $http, $window, $location){
$scope.members = [];
$http.get("/members/api/members").then(function(response){
@@ -21,7 +20,23 @@ app.controller("getController", function($scope, $http, $window, $location){
}
);
};
});
})
.directive('ngConfirmClick',
[
function()
{ return {
link: function (scope, element, attr)
{
var msg = attr.ngConfirmClick || "Are you sure?";
var clickAction = attr.confirmedClick;
element.bind('click',function (event)
{
if ( window.confirm(msg) ) {
scope.$eval(clickAction)
}
});
}
}}]);
app.controller("postController", function($scope, $http) {
$scope.firstName = "";