Skip to content

Commit

Permalink
remove delete confirmations from main page
Browse files Browse the repository at this point in the history
  • Loading branch information
DaftMonk committed Aug 18, 2014
1 parent 6bec0a1 commit 44267bf
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/templates/client/app/admin(auth)/admin(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<li class="list-group-item" ng-repeat="user in users">
<strong>{{user.name}}</strong><br>
<span class="text-muted">{{user.credentials[0].value}}</span>
<a ng-click="delete(<% if(filters.uibootstrap) { %>user.name + ' (' + user.email + ')', <% } %>user)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a>
<a ng-click="delete(<% if(filters.uibootstrap) { %>user.name + ' (' + user.credentials[0].value + ')', <% } %>user)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a>
</li>
</ul>
</div>
2 changes: 1 addition & 1 deletion app/templates/client/app/admin(auth)/admin(jade).jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ div(ng-include='"components/navbar/navbar.html"')
strong {{user.name}}
br
span.text-muted {{user.credentials[0].value}}
a.trash(ng-click='delete(<% if(filters.uibootstrap) { %>user.name + " (" + user.email + ")", <% } %>user)')
a.trash(ng-click='delete(<% if(filters.uibootstrap) { %>user.name + " (" + user.credentials[0].value + ")", <% } %>user)')
span.glyphicon.glyphicon-trash.pull-right
2 changes: 1 addition & 1 deletion app/templates/client/app/main/main(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>'Allo, 'Allo!</h1>
<div class="col-lg-12">
<h1 class="page-header">Features:</h1>
<ul class="nav nav-tabs nav-stacked col-md-4 col-lg-4 col-sm-6" ng-repeat="thing in awesomeThings">
<li><a href="#" tooltip="{{thing.info}}">{{thing.name}}<% if(filters.socketio) { %><button type="button" class="close" ng-click="deleteThing(<% if(filters.uibootstrap) { %>thing.name, <% } %>thing)">&times;</button><% } %></a></li>
<li><a href="#" tooltip="{{thing.info}}">{{thing.name}}<% if(filters.socketio) { %><button type="button" class="close" ng-click="deleteThing(thing)">&times;</button><% } %></a></li>
</ul>
</div>
</div><% if(filters.socketio) { %>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/client/app/main/main(jade).jade
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ header#banner.hero-unit
li
a(href='#', tooltip='{{thing.info}}')
| {{thing.name}}<% if(filters.socketio) { %>
button.close(type='button', ng-click='deleteThing(<% if(filters.uibootstrap) { %>thing.name, <% } %>thing)') ×<% } %><% if(filters.socketio) { %>
button.close(type='button', ng-click='deleteThing(thing)') ×<% } %><% if(filters.socketio) { %>

form.thing-form
label Syncs in realtime across clients
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ angular.module '<%= scriptAppName %>'

$scope.newThing = ''

$scope.deleteThing = <% if(filters.uibootstrap) { %>Modal.confirm.delete <% } %>(thing) ->
$scope.deleteThing = (thing) ->
$http.delete '/api/things/' + thing._id<% } %><% if(filters.socketio) { %>

$scope.$on '$destroy', ->
Expand Down
4 changes: 2 additions & 2 deletions app/templates/client/app/main/main.controller(js).js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ angular.module('<%= scriptAppName %>')
$scope.newThing = '';
};

$scope.deleteThing = <% if(filters.uibootstrap) { %>Modal.confirm.delete(<% } %>function(thing) {
$scope.deleteThing = function(thing) {
$http.delete('/api/things/' + thing._id);
}<% if(filters.uibootstrap) { %>)<% } %>;<% } %><% if(filters.socketio) { %>
};<% } %><% if(filters.socketio) { %>

$scope.$on('$destroy', function () {
socket.unsyncUpdates('thing');
Expand Down

0 comments on commit 44267bf

Please sign in to comment.