mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-11 07:01:49 +02:00
New Features
- added notifications - added toggle switches - added delete feature - added email verification
This commit is contained in:
parent
e61ef151f6
commit
1b20a11bba
91 changed files with 6859 additions and 2756 deletions
18
public/js/controllers/deletion.controller.js
Normal file
18
public/js/controllers/deletion.controller.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
angular.module('rallly')
|
||||
.controller('DeletionCtrl', function($state, Notification, Event){
|
||||
Event.destroy({id : $state.params.id, code :$state.params.code}, function(){
|
||||
var notification = new Notification({
|
||||
title : 'Event deleted',
|
||||
message : 'This event has been deleted',
|
||||
type : 'success',
|
||||
timeout : 5000
|
||||
});
|
||||
}, function(e){
|
||||
var notification = new Notification({
|
||||
title : 'Deletion Failed',
|
||||
message : 'The event could not be deleted. Make sure that it exists and that the url is correct',
|
||||
type : 'error'
|
||||
});
|
||||
});
|
||||
$state.go('event', { id : $state.params.id });
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue