\n Want to find out more about Rallly? Check out the FAQs below.\n
What is Rallly?
\n
\n Rallly is a collaborative scheduling service that makes deciding on a date fast and easy. In other words, Rallly helps you and your friends decide on a date to host an event.\n
\n
Why is it called Rallly?
\n
\n The name is derived from the proper spelling of the word, “rally”. The Webster dictionary defines rally as, “to muster for a common purpose” which accurately describes the goal of this service. The inproper spelling can be attributed to the difficulty of finding short and meaningful domain names.\n
\n')}]),angular.module("rallly").controller("AboutCtrl",["Title",function(e){e.set("About Rallly")}]),angular.module("rallly").controller("AccountCtrl",["$scope","ConfirmModal",function(e){e.showNotice=function(){}}]),angular.module("rallly").controller("DeletionCtrl",["$state","Notification","Event",function(e,n,t){t.destroy({id:e.params.id,code:e.params.code},function(){new n({title:"Event deleted",message:"This event has been deleted",type:"success",timeout:5e3})},function(){new n({title:"Deletion Failed",message:"The event could not be deleted. Make sure that it exists and that the url is correct",type:"error"})}),e.go("event",{id:e.params.id})}]),angular.module("rallly").controller("EditEventCtrl",["$scope","$http","$state","$timeout","Event","ConfirmModal","Notification","Title",function(e,n,t,i,a,s,o,l){var d=t.params.id;e.event=a.get({id:d},function(){l.set("Edit: "+e.event.title),e.master=angular.copy(e.event)},function(){t.go("notfound")}),e.undoChanges=function(){e.event=angular.copy(e.master)},e.didChange=function(){return JSON.stringify(e.master)!=JSON.stringify(e.event)},e.didChangeDates=function(){return JSON.stringify(e.master.dates)!=JSON.stringify(e.event.dates)},e.submit=function(){if(e.form.$valid)if(e.didChangeDates()){new s({title:"Hold up!",message:"Changing the dates will reset all entries by the participants. Are you sure you want to do that?",confirmText:"Yes, I'm sure",isDestructive:!0,confirm:function(){e.event.participants=[],r()}})}else r();else{new o({title:"Not so fast",message:"Make sure you fill in all the required fields and try again.",type:"error"})}};var r=function(){a.update({id:d},e.event,function(){new o({title:"Changes Saved",message:"Your changes have been saved successfully.",type:"success"});e.master=angular.copy(e.event)})}}]),angular.module("rallly").controller("EventCtrl",["$scope","$http","$state","Title","Event","ConfirmModal",function(e,n,t,i,a,s){var o=t.params.id;e.event=a.get({id:o},function(){i.set(e.event.title),e.eventUrl=t.href("event",{id:e.event._id},{absolute:!0})},function(){t.go("notfound")}),e.openEvent=function(){e.event.isClosed=!1,a.update({id:o},e.event,function(){new s({title:"Event Open",message:"People can vote and comment on this event.",cancelText:"OK"})})},e.closeEvent=function(){e.event.isClosed=!0,a.update({id:o},e.event,function(){new s({title:"Event Closed",message:"People can no longer vote or comment on this event.",cancelText:"OK"})})},e.editEvent=function(){t.go("editevent",{id:e.event._id})}}]),angular.module("rallly").controller("HomeCtrl",["$scope","$state","Title",function(e,n,t){t.set("Rallly - Collaborative Scheduling"),e.newEvent=function(){n.go("newevent")}}]),angular.module("rallly").controller("NavigationCtrl",["$scope","$location",function(e,n){e.isActive=function(e){return n.path()==e?!0:!1}}]),angular.module("rallly").controller("NewEventCtrl",["$scope","$http","$state","Event","ConfirmModal","Notification",function(e,n,t,i,a){e.title="Schedule a New Event",e.description="Fill in the form below to create your event and share it with your friends and colleagues.",e.event={};var s=["newevent.general","newevent.datetime","newevent.invite"];e.page=1;var o=function(n){e.page=n,t.go(s[n-1])};o(e.page),e.submit=function(){e.form.$valid&&e.page==s.length?n.post("/api/event",e.event).success(function(n){e.event=n,e.eventUrl=t.href("event",{id:e.event._id},{absolute:!0}),e.page++,t.go("newevent.success")}).error(function(){new a({title:"Uh oh!",message:"There was an error creating your event. Please try again later.",cancelText:"OK"})}):e.form.$valid&&(e.form.$setPristine(),e.nextPage())
},e.nextPage=function(){o(e.page+1)},e.prevPage=function(){o(e.page-1)}}]),angular.module("rallly").controller("VerificationCtrl",["Event","Notification","$state",function(e,n,t){e.verify({id:t.params.id,code:t.params.code},function(){new n({title:"Email Verified",message:"Your email has been verified. You will now be able to receive email notifications for this event",type:"success",timeout:5e3})},function(){new n({title:"Verification Failed",message:"Your verification code has expired.",type:"error"})}),t.go("event",{id:t.params.id})}]),angular.module("rallly").directive("backImg",function(){return function(e,n,t){var i=t.backImg;n.css({"background-image":"url(/images/"+i+".png)"})}}),angular.module("rallly").directive("datepicker",function(){return{restrict:"A",require:"ngModel",scope:{model:"=ngModel",control:"="},templateUrl:"templates/directives/datePicker.html",link:function(e,n,t,i){e.model=e.model||[],e.control=e.control||{},e.$watchCollection("model",function(e){i.$setViewValue(e),i.$validate()}),i.$validators.required=function(e){return e&&0!=e.length?!0:!1};var a=Date.today(),s=a.clone(),o=function(n){s=n;var t=s.clone().moveToFirstDayOfMonth(),i=t.getDay();t.add(i-7).days(),e.title=s.toString("MMMM yyyy");for(var o=new Array(42),l=0;l0)&&(e.model.splice(t,0,n.date),i=!0),t++;while(0==i)}},e.isActive=function(n,t){e.model=e.model||[];for(var i=0;i0;i||n.toggle()};n.toggle=function(){n.open=!n.open,n.open?(t.addClass("open"),e.bind("click",i)):(t.removeClass("open"),e.unbind("click",i))}}}}]),angular.module("rallly").service("FormHelper",function(){this.emailRegexString="^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$",this.emailRegex=new RegExp(this.emailRegexString),this.prettyError=function(e,n){return e.required?n+" is required":e.pattern?n+" is invalid":e.maxlength?n+" is too long":!1}}).directive("userForm",["FormHelper",function(e){return{scope:{event:"=",form:"="},templateUrl:"templates/form/userForm.html",link:function(n){n.errors={},n.emailRegex=e.emailRegex,n.$watchCollection("form.name.$error",function(t){n.errors.name=e.prettyError(t,"Name")}),n.$watchCollection("form.email.$error",function(t){n.errors.email=e.prettyError(t,"Email")})}}}]).directive("eventForm",["FormHelper",function(e){return{scope:{event:"=",form:"="},templateUrl:"templates/form/eventForm.html",link:function(n){n.errors={},n.$watchCollection("form.title.$error",function(t){n.errors.title=e.prettyError(t,"Title")}),n.$watchCollection("form.location.$error",function(t){n.errors.location=e.prettyError(t,"Location")})}}}]).directive("dateForm",function(){return{scope:{event:"=",form:"="},templateUrl:"templates/form/dateForm.html"}}).directive("participantsForm",["FormHelper",function(e){return{scope:{event:"=",form:"="},templateUrl:"templates/form/participantsForm.html",link:function(n){n.emailRegex=e.emailRegexString}}}]).directive("settingsForm",["Event","ConfirmModal",function(e,n){return{scope:{event:"=",form:"="},templateUrl:"templates/form/settingsForm.html",link:function(t){t.deleteEvent=function(){t.deleteRequestSent||e.delete({id:t.event._id},function(){t.deleteRequestSent=!0;new n({title:"Delete Request Sent",message:"An email has been sent to the creator of this event with instructions to delete it.",cancelText:"OK"})})}}}}]).directive("switchToggle",function(){return{scope:{model:"=ngModel"},require:"ngModel",link:function(e,n,t,i){n.addClass("switch-toggle");var a=function(){e.model^"undefined"!=typeof t.invert?n.addClass("active"):n.removeClass("active")};e.$watch("model",a),n.bind("click",function(n){e.model=!e.model,i.$setViewValue(e.model,n)})}}}).directive("timeForm",["DatePickerService",function(e){return{scope:{event:"=",form:"="},templateUrl:"templates/form/timeForm.html",link:function(n){var t,i=!1,a=n.$watch("event.dates",function(s){s&&!i&&a(),i=!0,t=new e(n.event.dates),n.unsetDate=function(e){t.removeDate(e)}})}}}]).directive("timePicker",["$timeout",function(){return{scope:{model:"=ngModel"},require:"ngModel",link:function(e,n,t,i){i.$viewChangeListeners.push(function(){e.model=i.$modelValue}),i.$parsers.push(function(e){return e?Date.parse(e):void 0}),i.$validators.time=function(e){if(i.$isEmpty(e))return!0;var n=Date.parse(e);return n?(i.$setViewValue(n.toString("hh:mm tt")),i.$render(),!0):!1}}}}]),angular.module("rallly").directive("poll",["$timeout","Participant","ConfirmModal",function(e,n,t){return{restrict:"A",templateUrl:"templates/directives/poll.html",scope:{event:"="},link:function(e){e.defaults=[],e.participant={};var i=[];e.event.$promise.then(function(n){for(var t=["John Example","Jane Specimen","Mark Instance","Mary Case"],i=[],a=0;an)return!1;return!0},e.selectedDate=function(n){i[n]=0;for(var t=0;t30?"on "+e("date")(n,"MMMM d"):d>1?d+" days ago":1==d?"1 day ago":l>1?l+" hours ago":1==l?"an hour ago":o>1?o+" minutes ago":1==o?"a minute ago":"a few seconds ago"}}}]),angular.module("rallly").factory("ConfirmModal",["btfModal",function(e){return function(n){var t;t=e({templateUrl:"templates/confirmmodal.html",controllerAs:"modal",controller:function(){this.title=n.title,this.message=n.message,this.confirm=n.confirm?function(){n.confirm(),t.deactivate()}:!1,this.cancel=t.deactivate,this.confirmText=n.confirmText||"Confirm",this.cancelText=n.cancelText||"Cancel",this.isDestructive=n.isDestructive}}),t.activate(),this.destroy=function(){t.deactivate()}}}]),angular.module("rallly").factory("Notification",["$timeout","btfModal",function(e,n){return function(t){var i;i=n({templateUrl:"templates/notification.html",controllerAs:"notification",controller:function(){this.title=t.title,this.message=t.message,this.close=i.deactivate,this.type=t.type;var n=t.timeout||5e3;e(i.deactivate,n)}}),i.activate(),this.destroy=function(){i.deactivate()}}}]);
//# sourceMappingURL=app.js.map