mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-26 04:37:34 +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
6
public/js/controllers/account.controller.js
Normal file
6
public/js/controllers/account.controller.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
angular.module('rallly')
|
||||
.controller('AccountCtrl', function($scope, ConfirmModal){
|
||||
$scope.showNotice = function(){
|
||||
|
||||
}
|
||||
})
|
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 });
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('rallly')
|
||||
.controller('EditEventCtrl', function($scope, $http, $state, $timeout, Event, ConfirmModal, Title){
|
||||
.controller('EditEventCtrl', function($scope, $http, $state, $timeout, Event, ConfirmModal, Notification, Title){
|
||||
var id = $state.params.id
|
||||
$scope.event = Event.get({id:id}, function(data){
|
||||
Title.set("Edit: " + $scope.event.title);
|
||||
|
@ -9,7 +9,6 @@ angular.module('rallly')
|
|||
});
|
||||
$scope.undoChanges = function(){
|
||||
$scope.event = angular.copy($scope.master);
|
||||
resetDates();
|
||||
}
|
||||
$scope.didChange = function(){
|
||||
return JSON.stringify($scope.master) != JSON.stringify($scope.event);
|
||||
|
@ -35,10 +34,10 @@ angular.module('rallly')
|
|||
update();
|
||||
}
|
||||
} else {
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Not so fast!',
|
||||
var notification = new Notification({
|
||||
title : 'Not so fast',
|
||||
message : 'Make sure you fill in all the required fields and try again.',
|
||||
cancelText : 'OK'
|
||||
type : 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -47,19 +46,12 @@ angular.module('rallly')
|
|||
id : id
|
||||
}, $scope.event,
|
||||
function(){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Event Updated',
|
||||
message : 'Your changes have been saved successfully!',
|
||||
confirmText : 'Back to Event Page',
|
||||
cancelText : 'Stay here',
|
||||
confirm : function(){
|
||||
$state.go('event',{id : $scope.event._id});
|
||||
}
|
||||
var notification = new Notification({
|
||||
title : 'Changes Saved',
|
||||
message : 'Your changes have been saved successfully.',
|
||||
type : 'success'
|
||||
});
|
||||
$scope.master = angular.copy($scope.event);
|
||||
$scope.didSave = $timeout(function(){
|
||||
$scope.didSave = false;
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
angular.module('rallly')
|
||||
.controller('EventCtrl', function($scope, $http, $state, Title, Event){
|
||||
.controller('EventCtrl', function($scope, $http, $state, Title, Event, ConfirmModal){
|
||||
var id = $state.params.id;
|
||||
$scope.participant = {};
|
||||
$scope.event = Event.get({id:id}, function(data){
|
||||
Title.set($scope.event.title);
|
||||
$scope.eventUrl = $state.href('event', {
|
||||
|
@ -13,73 +12,36 @@ angular.module('rallly')
|
|||
$state.go('notfound');
|
||||
});
|
||||
|
||||
$scope.openEvent = function(){
|
||||
$scope.event.isClosed = false;
|
||||
Event.update({
|
||||
id : id
|
||||
}, $scope.event,
|
||||
function(){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Event Open',
|
||||
message : 'People can vote and comment on this event.',
|
||||
cancelText : 'OK',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$scope.closeEvent = function(){
|
||||
$scope.event.isClosed = true;
|
||||
Event.update({
|
||||
id : id
|
||||
}, $scope.event,
|
||||
function(){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Event Closed',
|
||||
message : 'People can no longer vote or comment on this event.',
|
||||
cancelText : 'OK',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$scope.editEvent = function(){
|
||||
$state.go('editevent', { id : $scope.event._id });
|
||||
}
|
||||
|
||||
})
|
||||
.directive('poll', function(Event, Participant, ConfirmModal){
|
||||
return {
|
||||
restrict : 'A',
|
||||
templateUrl : 'templates/directives/poll.html',
|
||||
scope : {
|
||||
'event' : '=',
|
||||
'participant' : '='
|
||||
},
|
||||
link : function(scope, el, attrs){
|
||||
scope.defaults = [];
|
||||
var datesCount = [];
|
||||
scope.delete = function(participant){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Delete ' + participant.name + '?',
|
||||
message : 'Are you sure you want to remove '+participant.name+' from the poll?',
|
||||
confirmText : 'Yes - delete',
|
||||
cancelText : 'No - nevermind',
|
||||
isDestructive : true,
|
||||
confirm : function(){
|
||||
Participant.remove({ id : scope.event._id , pid : participant._id }, function(event){
|
||||
scope.event = event;
|
||||
});
|
||||
}
|
||||
});
|
||||
modal.show();
|
||||
}
|
||||
scope.isTopDate = function(index){
|
||||
var count = datesCount[index];
|
||||
for (var i = 0; i < datesCount.length; i++){
|
||||
if (datesCount[i] > count) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
scope.selectedDate = function(index){
|
||||
datesCount[index] = 0;
|
||||
for (var i = 0; i < scope.event.participants.length; i++){
|
||||
if (scope.event.participants[i].dates[index]) datesCount[index]++;
|
||||
}
|
||||
return datesCount[index];
|
||||
}
|
||||
scope.update = function(participant){
|
||||
Participant.update({
|
||||
id : scope.event._id,
|
||||
pid : participant._id
|
||||
}, participant);
|
||||
}
|
||||
scope.edit = function(participant){
|
||||
scope.defaults[scope.event.participants.indexOf(participant)] = angular.copy(participant);
|
||||
}
|
||||
scope.cancel = function(index){
|
||||
scope.event.participants[index] = scope.defaults[index];
|
||||
}
|
||||
scope.save = function(participant){
|
||||
if (scope.formnew.$valid){
|
||||
var participant = new Participant(participant);
|
||||
participant.$save({id:scope.event._id}, function(event){
|
||||
scope.event = event;
|
||||
scope.participant = {};
|
||||
});
|
||||
scope.formnew.$setPristine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
angular.module('rallly')
|
||||
.controller('NewEventCtrl', function($scope, $http, $state, Event, ConfirmModal){
|
||||
.controller('NewEventCtrl', function($scope, $http, $state, Event, ConfirmModal, Notification){
|
||||
|
||||
$scope.title = "Schedule a New Event";
|
||||
$scope.description = "Fill in the form below to create your event and share it with your friends and colleagues.";
|
||||
|
||||
var showModal = function(title, message){
|
||||
var modal = new ConfirmModal({
|
||||
title : title || 'Not so fast!',
|
||||
message : message || 'Make sure you fill in all the required fields and try again.',
|
||||
cancelText : 'OK'
|
||||
});
|
||||
}
|
||||
|
||||
$scope.submit = function(){
|
||||
if ($scope.form.$valid){
|
||||
$http.post('/api/event', $scope.event)
|
||||
|
@ -24,10 +16,18 @@ angular.module('rallly')
|
|||
});
|
||||
})
|
||||
.error(function(){
|
||||
showModal('Uh oh!', 'There was an error creating your event. Please try again later.');
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Uh oh!',
|
||||
message : 'There was an error creating your event. Please try again later.',
|
||||
cancelText : 'OK'
|
||||
});
|
||||
});
|
||||
} else {
|
||||
showModal();
|
||||
var notification = new Notification({
|
||||
title : 'Not so fast',
|
||||
message : 'Make sure you fill in all the required fields and try again.',
|
||||
type : 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
19
public/js/controllers/verification.controller.js
Normal file
19
public/js/controllers/verification.controller.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
angular.module('rallly')
|
||||
.controller('VerificationCtrl', function(Event, Notification, $state){
|
||||
Event.verify({id : $state.params.id, code :$state.params.code}, function(){
|
||||
var notification = new Notification({
|
||||
title : 'Email Verified',
|
||||
message : 'Your email has been verified. You will now be able to receive email notifications for this event',
|
||||
type : 'success',
|
||||
timeout : 5000
|
||||
});
|
||||
}, function(e){
|
||||
var notification = new Notification({
|
||||
title : 'Verification Failed',
|
||||
message : 'Your verification code has expired.',
|
||||
type : 'error'
|
||||
});
|
||||
});
|
||||
$state.go('event', { id : $state.params.id });
|
||||
|
||||
});
|
41
public/js/directives/discussion.directive.js
Normal file
41
public/js/directives/discussion.directive.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
angular.module('rallly')
|
||||
.directive('discussion', function($timeout, Comment, ConfirmModal){
|
||||
return {
|
||||
restrict : 'A',
|
||||
templateUrl : 'templates/directives/discussion.html',
|
||||
scope : {
|
||||
'event' : '='
|
||||
},
|
||||
link : function(scope, el, attrs){
|
||||
scope.comment = {};
|
||||
var thread = angular.element('.comment-thread');
|
||||
$timeout(function(){
|
||||
thread.scrollTop(thread.prop('scrollHeight'));
|
||||
});
|
||||
scope.deleteComment = function(comment){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Are you sure?',
|
||||
message : 'Are you sure you want to remove this comment?',
|
||||
confirmText : 'Yes - delete',
|
||||
cancelText : 'No - nevermind',
|
||||
isDestructive : true,
|
||||
confirm : function(){
|
||||
Comment.remove({ id : scope.event._id , cid : comment._id }, function(event){
|
||||
scope.event = event;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
scope.postComment = function(){
|
||||
if (scope.commentForm.$valid){
|
||||
var comment = new Comment(scope.comment);
|
||||
comment.$save({id:scope.event._id}, function(event){
|
||||
scope.event = event;
|
||||
scope.comment = {};
|
||||
});
|
||||
scope.commentForm.$setPristine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
27
public/js/directives/dropdown.directive.js
Normal file
27
public/js/directives/dropdown.directive.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
angular.module('rallly')
|
||||
.directive('dropdown', function($document){
|
||||
return {
|
||||
restrict : 'A',
|
||||
link : function(scope, el, attrs){
|
||||
el.addClass('dropdown');
|
||||
scope.open = false;
|
||||
|
||||
var clickHandler = function(event){
|
||||
var isClickedElementChildOfPopup = el.find(event.target).length > 0;
|
||||
if (isClickedElementChildOfPopup) return;
|
||||
scope.toggle();
|
||||
}
|
||||
|
||||
scope.toggle = function(){
|
||||
scope.open = !scope.open;
|
||||
if (scope.open){
|
||||
el.addClass('open');
|
||||
$document.bind('click', clickHandler);
|
||||
} else {
|
||||
el.removeClass('open');
|
||||
$document.unbind('click', clickHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,5 +1,7 @@
|
|||
angular.module('rallly')
|
||||
.service('FormHelper', function(){
|
||||
this.emailRegexString = '^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$';
|
||||
this.emailRegex = new RegExp(this.emailRegexString);
|
||||
this.prettyError = function(errors, field){
|
||||
if (errors.required) return field + " is required";
|
||||
if (errors.pattern) return field + " is invalid" ;
|
||||
|
@ -17,7 +19,7 @@ angular.module('rallly')
|
|||
link : function(scope, el, attrs) {
|
||||
scope.errors = {};
|
||||
|
||||
scope.emailRegex = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
|
||||
scope.emailRegex = FormHelper.emailRegex;
|
||||
|
||||
scope.$watchCollection('form.name.$error',function(errors){
|
||||
scope.errors.name = FormHelper.prettyError(errors, "Name");
|
||||
|
@ -59,12 +61,54 @@ angular.module('rallly')
|
|||
templateUrl : 'templates/directives/eventForm/dateForm.html'
|
||||
}
|
||||
})
|
||||
.directive('participantsForm', function(){
|
||||
.directive('participantsForm', function(FormHelper){
|
||||
return {
|
||||
scope : {
|
||||
event : '=',
|
||||
form : '='
|
||||
},
|
||||
templateUrl : 'templates/directives/eventForm/participantsForm.html'
|
||||
templateUrl : 'templates/directives/eventForm/participantsForm.html',
|
||||
link : function(scope, el, attrs){
|
||||
scope.emailRegex = FormHelper.emailRegexString;
|
||||
}
|
||||
}
|
||||
})
|
||||
.directive('settingsForm', function(Event){
|
||||
return {
|
||||
scope : {
|
||||
event : '=',
|
||||
form : '='
|
||||
},
|
||||
templateUrl : 'templates/directives/eventForm/settingsForm.html',
|
||||
link : function(scope, el, attrs){
|
||||
scope.deleteEvent = function(){
|
||||
Event.delete({'id' : scope.event._id}, function(){
|
||||
console.log('delete');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.directive('switchToggle', function(){
|
||||
return {
|
||||
scope : {
|
||||
model : '=ngModel'
|
||||
},
|
||||
require : 'ngModel',
|
||||
link : function(scope, el, attrs, ngModel) {
|
||||
el.addClass('switch-toggle');
|
||||
var setClass = function(){
|
||||
if (scope.model ^ typeof(attrs.invert) !== 'undefined'){
|
||||
el.addClass('active');
|
||||
} else {
|
||||
el.removeClass('active');
|
||||
}
|
||||
}
|
||||
scope.$watch('model', setClass);
|
||||
el.bind('click', function(e){
|
||||
scope.model = !scope.model;
|
||||
ngModel.$setViewValue(scope.model, e);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
65
public/js/directives/poll.directive.js
Normal file
65
public/js/directives/poll.directive.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
angular.module('rallly')
|
||||
.directive('poll', function(Participant, ConfirmModal){
|
||||
return {
|
||||
restrict : 'A',
|
||||
templateUrl : 'templates/directives/poll.html',
|
||||
scope : {
|
||||
'event' : '='
|
||||
},
|
||||
link : function(scope, el, attrs){
|
||||
scope.defaults = [];
|
||||
scope.participant = {};
|
||||
var datesCount = [];
|
||||
scope.delete = function(participant){
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Delete ' + participant.name + '?',
|
||||
message : 'Are you sure you want to remove '+participant.name+' from the poll?',
|
||||
confirmText : 'Yes - delete',
|
||||
cancelText : 'No - nevermind',
|
||||
isDestructive : true,
|
||||
confirm : function(){
|
||||
Participant.remove({ id : scope.event._id , pid : participant._id }, function(event){
|
||||
scope.event = event;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
scope.isTopDate = function(index){
|
||||
var count = datesCount[index];
|
||||
for (var i = 0; i < datesCount.length; i++){
|
||||
if (datesCount[i] > count) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
scope.selectedDate = function(index){
|
||||
datesCount[index] = 0;
|
||||
for (var i = 0; i < scope.event.participants.length; i++){
|
||||
if (scope.event.participants[i].dates[index]) datesCount[index]++;
|
||||
}
|
||||
return datesCount[index];
|
||||
}
|
||||
scope.update = function(participant){
|
||||
Participant.update({
|
||||
id : scope.event._id,
|
||||
pid : participant._id
|
||||
}, participant);
|
||||
}
|
||||
scope.edit = function(participant){
|
||||
scope.defaults[scope.event.participants.indexOf(participant)] = angular.copy(participant);
|
||||
}
|
||||
scope.cancel = function(index){
|
||||
scope.event.participants[index] = scope.defaults[index];
|
||||
}
|
||||
scope.save = function(){
|
||||
if (scope.formnew.$valid){
|
||||
var participant = new Participant(scope.participant);
|
||||
participant.$save({id:scope.event._id}, function(event){
|
||||
scope.event = event;
|
||||
scope.participant = {};
|
||||
});
|
||||
scope.formnew.$setPristine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
angular.module('rallly', ['ui.router','ngResource','ngFx','btford.modal'])
|
||||
angular.module('rallly', ['ui.router','ngResource','ngFx','btford.modal','ngTagsInput','ngAnimate'])
|
||||
.config(function($stateProvider, $urlRouterProvider, $locationProvider){
|
||||
$locationProvider.html5Mode(true);
|
||||
$urlRouterProvider.otherwise("/notfound")
|
||||
|
@ -32,17 +32,32 @@ angular.module('rallly', ['ui.router','ngResource','ngFx','btford.modal'])
|
|||
templateUrl : 'templates/editevent.html',
|
||||
controller : 'EditEventCtrl'
|
||||
})
|
||||
.state('verifyevent', {
|
||||
url : '/verify/:id/code/:code',
|
||||
controller : 'VerificationCtrl'
|
||||
})
|
||||
.state('deleteevent', {
|
||||
url : '/delete/:id/code/:code',
|
||||
controller : 'DeletionCtrl'
|
||||
})
|
||||
})
|
||||
.factory('Event', function($resource){
|
||||
return $resource('/api/event/:id', { id : '@_id' }, {
|
||||
'update' : { method : 'PUT' }
|
||||
'update' : { method : 'PUT' },
|
||||
'verify' : { method : 'GET', url : '/api/event/:id/code/:code' },
|
||||
'destroy': { method : 'DELETE', url: '/api/event/:id/code/:code' }
|
||||
});
|
||||
})
|
||||
.factory('Participant', function($resource){
|
||||
return $resource('/api/event/:id/participant/:pid', { id: '@_id', pid : '@pid'}, {
|
||||
return $resource('/api/event/:id/participant/:pid', { id: '@_id'}, {
|
||||
'update' : { method : 'PUT' }
|
||||
});
|
||||
})
|
||||
.factory('Comment', function($resource){
|
||||
return $resource('/api/event/:id/comment/:cid', { id : '@_id' }, {
|
||||
'update' : { method : 'PUT' }
|
||||
})
|
||||
})
|
||||
.factory('Title', function(){
|
||||
return {
|
||||
set : function(title){
|
||||
|
|
23
public/js/services/notification.service.js
Normal file
23
public/js/services/notification.service.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
angular.module('rallly')
|
||||
.factory('Notification', function($timeout, btfModal){
|
||||
return function(config){
|
||||
var modal;
|
||||
modal = btfModal({
|
||||
templateUrl : 'templates/notification.html',
|
||||
controllerAs : 'notification',
|
||||
controller : function(){
|
||||
this.title = config.title
|
||||
this.message = config.message;
|
||||
this.close = modal.deactivate;
|
||||
this.type = config.type;
|
||||
var timeout = config.timeout || 5000;
|
||||
$timeout(modal.deactivate, timeout);
|
||||
}
|
||||
});
|
||||
modal.activate();
|
||||
|
||||
this.destroy = function(){
|
||||
modal.deactivate();
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,12 +1,15 @@
|
|||
angular.module("rallly").run(["$templateCache", function($templateCache) {$templateCache.put("templates/about.html","<div style=\"max-width:600px\">\n <h1>What is Rallly?</h1>\n <div class=\"rl-page-desc\">Rallly is a collaborative scheduling service that makes deciding on a date fast and easy.</div>\n <h2>Hi, I\'m Luke!</h2>\n <p>\n I created Rallly as side project to help me learn some new technologies. I decided to publish it because I thought other people might find it useful. Rallly is a completely free service. In fact it is even open source. You can look at the latest source code on Github.\n </p>\n</div>\n");
|
||||
$templateCache.put("templates/confirmmodal.html","<div class=\"rl-modal-overlay\" ng-click=\"modal.cancel()\"></div>\n\n<div class=\"rl-modal\">\n <div class=\"rl-modal-title\">{{modal.title}}</div>\n <div class=\"rl-modal-message\">\n {{modal.message}}\n </div>\n <div class=\"rl-modal-actions\">\n <button ng-click=\"modal.confirm()\" ng-show=\"modal.confirm\" class=\"btn\" ng-class=\"{danger : modal.isDestructive}\">{{modal.confirmText}}</button>\n <button ng-click=\"modal.cancel()\" class=\"btn\">{{modal.cancelText}}</button>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/editevent.html","<div ng-show=\"event._id\">\n <div class=\"box\">\n\n <div class=\"box-title\">Edit Event</div>\n <div class=\"box-description\">\n You can makes changes to your existing event by changing the fields in the form below.\n </div>\n\n <form novalidate name=\"form\" ng-submit=\"submit()\">\n\n <section class=\"box-section\" user-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" event-form form=\"form\" event=\"event\">\n\n </section>\n <section class=\"box-section\" date-form form=\"form\" event=\"event\">\n\n </section>\n <div class=\"box-controls box-bottom-sticky\">\n <button type=\"submit\" ng-show=\"didChange()\" class=\"btn btn-primary\" ng-class=\"{disabled : !didChange()}\">\n Save Changes\n </button>\n <button ng-click=\"undoChanges()\" class=\"btn\" ng-show=\"didChange()\">Undo Changes</button>\n <a href=\"/{{event._id}}\" class=\"btn\" ng-hide=\"didChange()\">Done</a>\n </div>\n\n </form>\n\n </div>\n\n</div>\n");
|
||||
$templateCache.put("templates/event.html","<div ng-show=\"event._id\">\n <div class=\"box \">\n <div class=\"event-header\">\n <div class=\"avatar\">\n <img src=\"/images/eventicon.png\" width=\"32 \" />\n </div>\n <div class=\"details\">\n <div class=\"title\">\n {{event.title}}\n </div>\n <div class=\"subtitle\">\n Created by <a href=\"mailto:{{event.creator.email}}\">{{event.creator.name}}</a> • {{event.created | elapsed}}\n </div>\n </div>\n <div class=\"actions\">\n <button class=\"btn\" ng-click=\"editEvent()\">Edit Event</button>\n </div>\n </div>\n <div class=\"box-side-sticky event-description\" ng-show=\"event.description\">{{event.description}}</div>\n <div class=\"box-bottom-sticky event-location\" ng-show=\"event.location\">\n <img src=\"/images/location.png\" width=\"18\" /><a href=\"http://google.com/maps?q={{event.location}}\" target=\"_blank\">{{event.location}}</a>\n </div>\n\n </div>\n <div class=\"box box-x-scroll\">\n <div poll event=\"event\" class=\"poll\" participant=\"participant\">\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/confirmmodal.html","<div class=\"rl-modal-overlay\" ng-click=\"modal.cancel()\"></div>\n\n<div class=\"rl-modal\">\n <div class=\"rl-modal-title\">{{modal.title}}</div>\n <div class=\"rl-modal-message\">\n {{modal.message}}\n </div>\n <div class=\"rl-modal-actions\">\n <button type=\"button\" ng-click=\"modal.confirm()\" ng-show=\"modal.confirm\" class=\"btn\" ng-class=\"{danger : modal.isDestructive}\">{{modal.confirmText}}</button>\n <button type=\"button\" ng-click=\"modal.cancel()\" class=\"btn\">{{modal.cancelText}}</button>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/editevent.html","<div ng-show=\"event._id\">\n <div class=\"box\">\n\n <div class=\"box-title\">Edit Event</div>\n <div class=\"box-description\">\n You can makes changes to your existing event by changing the fields in the form below.\n </div>\n\n <form novalidate name=\"form\" ng-submit=\"submit()\">\n\n <section class=\"box-section\" user-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" event-form form=\"form\" event=\"event\">\n\n </section>\n <section class=\"box-section\" date-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" settings-form form=\"form\" event=\"event\">\n\n </section>\n\n <div class=\"box-controls box-bottom-sticky\">\n <button type=\"submit\" ng-show=\"didChange()\" class=\"btn btn-primary\" ng-class=\"{disabled : !didChange()}\">\n Save Changes\n </button>\n <button type=\"button\" ng-click=\"undoChanges()\" class=\"btn\" ng-show=\"didChange()\">Undo Changes</button>\n <a href=\"/{{event._id}}\" class=\"btn\" ng-hide=\"didChange()\">Done</a>\n </div>\n\n </form>\n\n </div>\n\n</div>\n");
|
||||
$templateCache.put("templates/event.html","<div ng-show=\"event._id && !event.isDeleted\">\n <div class=\"box \">\n <div class=\"event-header\">\n <div class=\"avatar\">\n <img src=\"/images/eventicon.png\" width=\"32\" />\n </div>\n <div class=\"details\">\n <div class=\"title\">\n {{event.title}}\n <span class=\"title-label danger\" ng-show=\"event.isClosed\">Poll Closed</span>\n <span class=\"title-label success\" ng-hide=\"event.isClosed\">Poll Open</span>\n </div>\n <div class=\"subtitle\">\n Created by <a href=\"mailto:{{event.creator.email}}\">{{event.creator.name}}</a> • {{event.created | elapsed}}\n </div>\n </div>\n <div class=\"actions\">\n <button class=\"btn\" ng-click=\"editEvent()\">Edit Event</button>\n </div>\n </div>\n <div class=\"box-side-sticky event-description\" ng-show=\"event.description\">{{event.description}}</div>\n <div class=\"box-bottom-sticky event-location\" ng-show=\"event.location\">\n <img src=\"/images/location.png\" width=\"18\" /><a href=\"http://google.com/maps?q={{event.location}}\" target=\"_blank\">{{event.location}}</a>\n </div>\n\n </div>\n <div class=\"box box-x-scroll\">\n <div poll event=\"event\" class=\"poll\">\n </div>\n </div>\n\n <div class=\"box\" ng-hide=\"event.comments.length == 0 && event.isClosed\">\n <div class=\"box-title\">\n Discussion\n </div>\n <div class=\"box-description\">\n You can discuss the event with your friends by leaving a comment below.\n </div>\n <div discussion event=\"event\">\n\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/home.html","<div class=\"page-placeholder\">\n <div class=\"image\">\n <img src=\"/images/mark_large.png\" width=\"67\" />\n </div>\n <div class=\"title\">\n Schedule an Event\n </div>\n <div class=\"content\">\n Want to host an event but can’t decide on a date? Click on the button below to start!\n </div>\n <button ng-click=\"newEvent()\" class=\"btn\">Schedule New Event</button>\n</div>\n");
|
||||
$templateCache.put("templates/newevent.html","<div ng-hide=\"eventUrl\">\n <div class=\"box\" ng-class=\"{\'animated shake\': form.$submitted && form.$invalid }\">\n\n <div class=\"box-title\">Schedule a New Event</div>\n <div class=\"box-description\">\n Fill in the form below to create your event and share it with your friends and colleagues.\n </div>\n\n <form novalidate name=\"form\" ng-submit=\"submit()\">\n <section class=\"box-section\" user-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" event-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" date-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" participants-form form=\"form\" event=\"event\">\n\n </section>\n\n <div class=\"box-controls box-bottom-sticky\">\n <button type=\"submit\" class=\"btn btn-primary\">Create Event</button>\n </div>\n\n </form>\n </div>\n</div>\n<div ng-show=\"eventUrl\" class=\"box fx-fade-up\">\n <div class=\"box-message\">\n <div class=\"main-image\">\n <img src=\"/images/success_large.png\" width=\"100\" />\n </div>\n <div class=\"title\">Event Created</div>\n <div class=\"content\">\n Your event has been created successfully! Make sure you visit the page yourself and fill in the poll.\n </div>\n <div class=\"mini-divider\">\n </div>\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" disabled=\"true\" value=\"{{eventUrl}}\" />\n <a href=\"{{eventUrl}}\" class=\"btn form-btn\">GO</a>\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/newevent.html","<div ng-hide=\"eventUrl\">\n <div class=\"box\" ng-class=\"{\'animated shake\': form.$submitted && form.$invalid }\">\n\n <div class=\"box-title\">Schedule a New Event</div>\n <div class=\"box-description\">\n Fill in the form below to create your event and share it with your friends and colleagues.\n </div>\n\n <form novalidate autocomplete=\"off\" name=\"form\" ng-submit=\"submit()\">\n <section class=\"box-section\" user-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" event-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" date-form form=\"form\" event=\"event\">\n\n </section>\n\n <section class=\"box-section\" participants-form form=\"form\" event=\"event\">\n\n </section>\n\n <div class=\"box-controls box-bottom-sticky\">\n <button type=\"submit\" class=\"btn btn-primary\">Create Event</button>\n </div>\n\n </form>\n </div>\n</div>\n<div ng-show=\"eventUrl\" class=\"box fx-fade-up\">\n <div class=\"box-message\">\n <div class=\"main-image\">\n <img src=\"/images/success_large.png\" width=\"100\" />\n </div>\n <div class=\"title\">Event Created</div>\n <div class=\"content\">\n Your event has been created successfully! You should receive an email shortly with instructions to verify your email address.\n </div>\n <div class=\"mini-divider\">\n </div>\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" disabled=\"true\" value=\"{{eventUrl}}\" />\n <a href=\"{{eventUrl}}\" class=\"btn form-btn\">GO</a>\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/notfound.html","<h1>Error 404</h1>\n<h2>Not Found</h2>\n");
|
||||
$templateCache.put("templates/directives/poll.html","<div class=\"poll-header\">\n <div class=\"header participants-header\">\n {{event.participants.length}} participants\n </div>\n <div class=\"header date-header\" ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"count\" ng-show=\"selectedDate($index)\" ng-class={top:isTopDate($index)}>{{selectedDate($index)}}</span>\n </div>\n </div>\n <div class=\"header actions-header\">\n\n </div>\n</div>\n<div class=\"poll-body\">\n <div class=\"poll-entry\" ng-repeat=\"participant in event.participants\">\n <form novalidate ng-submit=\"update(participant); editMode = false\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input required autocomplete=\"off\" type=\"text\" class=\"form-control\" ng-model=\"participant.name\" ng-show=\"editMode\" value=\"participant.name\"/>\n <span ng-hide=\"editMode\" class=\"name\" ng-click=\"editMode = true; edit(participant)\">{{participant.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-hide=\"editMode\" ng-if=\"participant.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-hide=\"editMode\" ng-if=\"!participant.dates[$index]\" />\n <input ng-model=\"participant.dates[$index]\" ng-show=\"editMode\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-show=\"editMode\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\">\n <a href=\"#\" ng-hide=\"editMode\" ng-click=\"editMode = true; edit(participant)\" class=\"btn hover\">Edit</a>\n <a href=\"#\" ng-hide=\"editMode\" ng-click=\"delete(participant)\" class=\"btn danger hover\">Delete</a>\n <button ng-show=\"editMode\" type=\"submit\" class=\"btn\">Save</button>\n <a href=\"#\" ng-show=\"editMode\" ng-click=\"editMode = false; cancel($index)\" class=\"btn\">Cancel</a>\n </div>\n </form>\n </div>\n <div class=\"poll-entry highlight\">\n <form novalidate name=\"formnew\" ng-submit=\"save(participant)\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{participant.style}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input autocomplete=\"off\" name=\"username\" type=\"text\" class=\"form-control\" placeholder=\"Your name...\" ng-model=\"participant.name\" required value=\"participant.name\"/>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <input ng-model=\"participant.dates[$index]\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\">\n <button type=\"submit\" ng-class=\"{ \'animated shake\' : formnew.$submitted && formnew.$invalid }\" class=\"btn\">Save</button>\n </div>\n </form>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/notification.html","<div class=\"notification {{notification.type}}\" ng-click=\"notification.close()\">\n <div class=\"title\">\n {{notification.title}}\n </div>\n <div class=\"message\">\n {{notification.message}}\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/directives/discussion.html","<ul class=\"comment-thread\" ng-show=\"event.comments.length\">\n <li ng-repeat=\"comment in event.comments\" class=\"comment\">\n <div class=\"avatar-section\">\n <img src=\"/images/avatar.png\" />\n </div>\n <div class=\"comment-section\">\n <a href=\"#\" class=\"comment-delete\" ng-click=\"deleteComment(comment)\">×</a>\n <div class=\"meta\">\n <span class=\"name\">{{comment.author.name}}</span>\n <span class=\"time\">{{comment.created | elapsed}}</span>\n </div>\n <div class=\"content\">{{comment.content}}</div>\n </div>\n </li>\n</ul>\n<form novalidate ng-submit=\"postComment()\" name=\"commentForm\" class=\"comment-form\">\n <div class=\"avatar-section\">\n <img src=\"/images/avatar.png\" />\n </div>\n <div class=\"input-section form-group\">\n <div class=\"content-section\">\n <textarea class=\"form-control\" required ng-model=\"comment.content\" placeholder=\"Write a comment...\"></textarea>\n </div>\n <div class=\"name-section\">\n <div class=\"name-container\">\n <input type=\"text\" class=\"form-control\" required placeholder=\"Your Name\" ng-model=\"comment.author.name\" />\n <button type=\"submit\" class=\"btn\">Post Comment</button>\n <span class=\"form-error\" ng-show=\"commentForm.$submitted && commentForm.$error\">\n <img src=\"/images/error.png\" width=\"14\" /> Make sure you fill in all the fields.\n </span>\n </div>\n </div>\n </div>\n</form>\n");
|
||||
$templateCache.put("templates/directives/poll.html","<div class=\"poll-header\">\n <div class=\"header participants-header\">\n {{event.participants.length}} participants\n </div>\n <div class=\"header date-header\" ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"count\" ng-show=\"selectedDate($index)\" ng-class={top:isTopDate($index)}>{{selectedDate($index)}}</span>\n </div>\n </div>\n <div class=\"header actions-header\">\n\n </div>\n</div>\n<div class=\"poll-body\">\n <div class=\"poll-entry\" ng-repeat=\"participant in event.participants\">\n <form novalidate ng-submit=\"update(participant); editMode = false\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{$index + 1}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input required autocomplete=\"off\" type=\"text\" class=\"form-control\" ng-model=\"participant.name\" ng-show=\"editMode\" value=\"participant.name\"/>\n <span ng-hide=\"editMode\" class=\"name\" ng-click=\"editMode = true && !event.isClosed; edit(participant)\">{{participant.name}}</span>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <img src=\"/images/tick@2x.png\" width=\"16\" ng-hide=\"editMode\" ng-if=\"participant.dates[$index]\" />\n <img src=\"/images/nope@2x.png\" width=\"8\" ng-hide=\"editMode\" ng-if=\"!participant.dates[$index]\" />\n <input ng-model=\"participant.dates[$index]\" ng-show=\"editMode\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-show=\"editMode\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\" ng-hide=\"event.isClosed\">\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"editMode = true; edit(participant)\" class=\"btn hover\">Edit</button>\n <button type=\"button\" ng-hide=\"editMode\" ng-click=\"delete(participant)\" class=\"btn danger hover\">Delete</button>\n <button type=\"submit\" ng-show=\"editMode\" class=\"btn\">Save</button>\n <button type=\"button\" ng-show=\"editMode\" ng-click=\"editMode = false; cancel($index)\" class=\"btn\">Cancel</button>\n </div>\n </form>\n </div>\n <div ng-hide=\"event.isClosed\" class=\"poll-entry highlight\">\n <form novalidate name=\"formnew\" ng-submit=\"save()\">\n <div class=\"cell name-cell\">\n <span class=\"avatar style-{{participant.style}}\">\n <img src=\"/images/user.png\" width=\"11\" />\n </span>\n <input autocomplete=\"off\" name=\"username\" type=\"text\" class=\"form-control\" placeholder=\"Your name...\" ng-model=\"participant.name\" required value=\"participant.name\"/>\n </div>\n <div class=\"cell vote-cell\" ng-repeat=\"date in event.dates\">\n <input ng-model=\"participant.dates[$index]\" ng-false-value=\"false\" type=\"checkbox\" />\n <div class=\"overlay\" ng-click=\"participant.dates[$index] = !participant.dates[$index]\"></div>\n </div>\n <div class=\"cell action-cell\">\n <button type=\"submit\" ng-class=\"{ \'animated shake\' : formnew.$submitted && formnew.$invalid }\" class=\"btn\">Save</button>\n </div>\n </form>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/directives/eventForm/dateForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Choose Dates</div>\n <ul class=\"daticon-list\">\n <li ng-repeat=\"date in event.dates\">\n <div class=\"daticon\">\n <div class=\"dow\">\n {{date | date: \'EEE\'}}\n </div>\n <div class=\"day\">\n {{date | date: \'d\'}}\n </div>\n <div class=\"month\">\n {{date | date : \'MMM\'}}\n </div>\n <span class=\"delete\" ng-click=\"datepicker.unsetDate(date)\"></span>\n </div>\n </li>\n </ul>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"email\">Calendar</label>\n <span class=\"form-error\" ng-show=\"(form.datepicker.$dirty || form.$submitted) && form.datepicker.$error.required\">\n <img src=\"/images/error.png\" width=\"14\" /> You need to select a few dates\n </span>\n <div datepicker required name=\"datepicker\" control=\"datepicker\" ng-model=\"event.dates\">\n\n </div>\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/directives/eventForm/eventForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Event Details</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-col\">\n <div class=\"form-group\">\n <label for=\"title\">Title</label>\n <span class=\"form-error\" ng-show=\"(form.title.$touched || form.$submitted) && errors.title\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.title}}\n </span>\n <input id=\"title\" name=\"title\" ng-maxlength=\"30\" required ng-model=\"event.title\" type=\"text\" placeholder=\"Monthly Meetup...\" class=\"form-control extend\"/>\n </div>\n </div>\n <div class=\"form-col\">\n <div class=\"form-group optional\">\n <label for=\"location\">Location</label>\n <span class=\"form-error\" ng-show=\"(form.location.$touched || form.$submitted) && errors.location\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.location}}\n </span>\n <input id=\"location\" name=\"location\" ng-model=\"event.location\" ng-maxlength=\"50\" type=\"text\" placeholder=\"Rick\'s Cafe...\" class=\"form-control extend\"/>\n </div>\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group optional\">\n <label for=\"description\" >Description</label>\n <textarea id=\"description\" name=\"description\" ng-model=\"event.description\" placeholder=\"Enter Description...\" class=\"form-control extend\"></textarea>\n </div>\n </div>\n</div>\n");
|
||||
$templateCache.put("templates/directives/eventForm/participantsForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Invite Participants</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-group optional\">\n <label for=\"emails\">Participant\'s Emails</label>\n <textarea id=\"emails\" ng-list ng-model=\"event.emails\" placeholder=\"Enter Emails...\" class=\"form-control extend\"></textarea>\n </div>\n </div>\n</div>\n</section>\n");
|
||||
$templateCache.put("templates/directives/eventForm/participantsForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Invite Participants</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-group optional\">\n <label>Participant\'s Emails</label>\n <tags-input max-length=\"50\" allowed-tags-pattern=\"{{emailRegex}}\" display-property=\"email\" ng-model=\"event.emails\" placeholder=\"Add an Email\" type=\"email\" autocomplete=\"off\"></tags-input>\n </div>\n </div>\n</div>\n</section>\n");
|
||||
$templateCache.put("templates/directives/eventForm/settingsForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Settings</div>\n</div>\n<div class=\"section-main\">\n <div class=\"switch-row\">\n <div class=\"switch-details\">\n <div class=\"title\">\n Poll Status\n </div>\n <div class=\"description\">\n Let people vote on the poll.\n </div>\n </div>\n <div class=\"switch\">\n <div class=\"switch-value\">\n {{event.isClosed ? \'Closed\' : \'Open\' }}\n </div>\n <div switch-toggle ng-model=\"event.isClosed\" invert>\n </div>\n </div>\n </div>\n <div class=\"switch-row\">\n <div class=\"switch-details\">\n <div class=\"title\">\n Notifications\n </div>\n <div class=\"description\">\n Send email notifications to the creator of this event.\n </div>\n </div>\n <div class=\"switch\">\n <div class=\"switch-value\">\n {{event.creator.allowNotifications ? \'Enabled\' : \'Disabled\' }}\n </div>\n <div switch-toggle ng-model=\"event.creator.allowNotifications\">\n </div>\n </div>\n </div>\n <div class=\"switch-row\">\n <div class=\"switch-details\">\n <div class=\"title\">\n Delete Event\n </div>\n <div class=\"description\">\n Once you delete an event it will no longer be accessible.\n </div>\n </div>\n <div class=\"switch\">\n <button type=\"button\" ng-click=\"deleteEvent()\" class=\"btn danger\">Delete Event</button>\n </div>\n </div>\n</div>\n</section>\n");
|
||||
$templateCache.put("templates/directives/eventForm/userForm.html","<div class=\"section-details\">\n <div class=\"section-title\">Your Details</div>\n</div>\n<div class=\"section-main\">\n <div class=\"form-row\">\n <div class=\"form-col\">\n <div class=\"form-group\">\n <label for=\"name\">Name</label>\n <span class=\"form-error\" ng-show=\"(form.name.$touched || form.$submitted) && errors.name\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.name}}\n </span>\n <input id=\"name\" name=\"name\" ng-maxlength=\"30\" required ng-model=\"event.creator.name\" type=\"text\" placeholder=\"John Doe...\" class=\"form-control extend\"/>\n </div>\n </div>\n <div class=\"form-col\">\n <div class=\"form-group\">\n <label for=\"email\">Email</label>\n <span class=\"form-error\" ng-show=\"(form.email.$touched || form.$submitted) && errors.email\">\n <img src=\"/images/error.png\" width=\"14\" /> {{errors.email}}\n </span>\n <input type=\"email\" id=\"email\" name=\"email\" ng-pattern=\"emailRegex\" required ng-model=\"event.creator.email\" placeholder=\"john.doe@email.com...\" class=\"form-control extend\"/>\n </div>\n </div>\n </div>\n</div>\n");}]);
|
Loading…
Add table
Add a link
Reference in a new issue