Skip to content

Commit 44267bf

Browse files
committed
remove delete confirmations from main page
1 parent 6bec0a1 commit 44267bf

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Diff for: app/templates/client/app/admin(auth)/admin(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<li class="list-group-item" ng-repeat="user in users">
77
<strong>{{user.name}}</strong><br>
88
<span class="text-muted">{{user.credentials[0].value}}</span>
9-
<a ng-click="delete(<% if(filters.uibootstrap) { %>user.name + ' (' + user.email + ')', <% } %>user)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a>
9+
<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>
1010
</li>
1111
</ul>
1212
</div>

Diff for: app/templates/client/app/admin(auth)/admin(jade).jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ div(ng-include='"components/navbar/navbar.html"')
77
strong {{user.name}}
88
br
99
span.text-muted {{user.credentials[0].value}}
10-
a.trash(ng-click='delete(<% if(filters.uibootstrap) { %>user.name + " (" + user.email + ")", <% } %>user)')
10+
a.trash(ng-click='delete(<% if(filters.uibootstrap) { %>user.name + " (" + user.credentials[0].value + ")", <% } %>user)')
1111
span.glyphicon.glyphicon-trash.pull-right

Diff for: app/templates/client/app/main/main(html).html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1>'Allo, 'Allo!</h1>
1313
<div class="col-lg-12">
1414
<h1 class="page-header">Features:</h1>
1515
<ul class="nav nav-tabs nav-stacked col-md-4 col-lg-4 col-sm-6" ng-repeat="thing in awesomeThings">
16-
<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>
16+
<li><a href="#" tooltip="{{thing.info}}">{{thing.name}}<% if(filters.socketio) { %><button type="button" class="close" ng-click="deleteThing(thing)">&times;</button><% } %></a></li>
1717
</ul>
1818
</div>
1919
</div><% if(filters.socketio) { %>

Diff for: app/templates/client/app/main/main(jade).jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ header#banner.hero-unit
1414
li
1515
a(href='#', tooltip='{{thing.info}}')
1616
| {{thing.name}}<% if(filters.socketio) { %>
17-
button.close(type='button', ng-click='deleteThing(<% if(filters.uibootstrap) { %>thing.name, <% } %>thing)') ×<% } %><% if(filters.socketio) { %>
17+
button.close(type='button', ng-click='deleteThing(thing)') ×<% } %><% if(filters.socketio) { %>
1818

1919
form.thing-form
2020
label Syncs in realtime across clients

Diff for: app/templates/client/app/main/main.controller(coffee).coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ angular.module '<%= scriptAppName %>'
1515

1616
$scope.newThing = ''
1717

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

2121
$scope.$on '$destroy', ->

Diff for: app/templates/client/app/main/main.controller(js).js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ angular.module('<%= scriptAppName %>')
1717
$scope.newThing = '';
1818
};
1919

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

2424
$scope.$on('$destroy', function () {
2525
socket.unsyncUpdates('thing');

0 commit comments

Comments
 (0)