diff --git a/app/events/edit-event/edit-event.component.css b/app/events/edit-event/edit-event.component.css index 5866c1a..c71a3cd 100644 --- a/app/events/edit-event/edit-event.component.css +++ b/app/events/edit-event/edit-event.component.css @@ -2,8 +2,3 @@ height: 100%; background-color: #fff; } - -.btn-delete { - color: red; - text-align: right; -} diff --git a/app/events/edit-event/edit-event.component.ts b/app/events/edit-event/edit-event.component.ts index b3cae23..3a9922c 100644 --- a/app/events/edit-event/edit-event.component.ts +++ b/app/events/edit-event/edit-event.component.ts @@ -77,24 +77,6 @@ export class EditEventComponent implements OnInit { }); } - delete() { - this._alertsService.askConfirmation(`Delete event "${this.event.Name}"?`) - .then(() => { - return this._eventsService.deleteById(this.event.Id); - }) - .then(() => { - return this._alertsService.showSuccess(`Deleted "${this.event.Name}" successfully.`) - }) - .then(() => { - this._routerExtensions.navigate(['/events']); - }) - .catch(err => { - if (err) { - this._alertsService.showError(err.message); - } - }); - } - onCancel() { this._routerExtensions.back(); } diff --git a/app/events/edit-event/edit-event.template.html b/app/events/edit-event/edit-event.template.html index b0045ce..6ae9bfb 100644 --- a/app/events/edit-event/edit-event.template.html +++ b/app/events/edit-event/edit-event.template.html @@ -11,7 +11,6 @@ - diff --git a/app/events/event-details/event-details.component.ts b/app/events/event-details/event-details.component.ts index 019a73d..2b97f76 100644 --- a/app/events/event-details/event-details.component.ts +++ b/app/events/event-details/event-details.component.ts @@ -30,6 +30,7 @@ export class EventDetailsComponent implements OnInit { isPastEvent = false; registeredUsersExpanded = false; isAndroid: boolean = false; + iosPopupOpen: boolean = false; private _eventId: string = null; private _countByDate: any; @@ -52,6 +53,14 @@ export class EventDetailsComponent implements OnInit { this.isAndroid = this._platform.isAndroid; } + showIf(shouldShow: boolean) { + return shouldShow ? 'visible' : 'collapse'; + } + + toggleIosPopup() { + this.iosPopupOpen = !this.iosPopupOpen; + } + ngOnInit() { this._page.actionBar.title = ''; this._route.params.subscribe(p => { @@ -83,11 +92,6 @@ export class EventDetailsComponent implements OnInit { }); } - private _updateCountsByDate() { - return this._eventsService.getDateChoicesVotes(this.event.Id) - .then(result => this._countByDate = result.countByDate); - } - onEdit() { this._routerExtensions.navigate([`/events/${this.event.Id}/edit`]); } @@ -96,6 +100,14 @@ export class EventDetailsComponent implements OnInit { return this._currentUser && this.event && this.event.Owner === this._currentUser.Id; } + deleteEvent() { + this._alertsService.askConfirmation(`Delete event "${this.event.Name}"?`) + .then(() => this._eventsService.deleteById(this.event.Id)) + .then(() => this._alertsService.showSuccess(`Deleted "${this.event.Name}" successfully.`)) + .then(() => this._routerExtensions.navigate(['/events'])) + .catch(err => err && this._alertsService.showError(err.message)); + } + register() { let dateSelectionPromise: Promise = null; @@ -205,6 +217,11 @@ export class EventDetailsComponent implements OnInit { .catch(err => err && this._alertsService.showError(err.message)); } + private _updateCountsByDate() { + return this._eventsService.getDateChoicesVotes(this.event.Id) + .then(result => this._countByDate = result.countByDate); + } + private _openDateSelectionModal(isChangeVote = false) { let opts: ModalDialogOptions = { context: { diff --git a/app/events/event-details/event-details.template.html b/app/events/event-details/event-details.template.html index 9a6cff6..8eb72e0 100644 --- a/app/events/event-details/event-details.template.html +++ b/app/events/event-details/event-details.template.html @@ -10,20 +10,25 @@ - - - - - + + + + + + + + + + + - diff --git a/app/events/event-registration-modal/event-registration-modal.component.css b/app/events/event-registration-modal/event-registration-modal.component.css index 61cf100..48e6f17 100644 --- a/app/events/event-registration-modal/event-registration-modal.component.css +++ b/app/events/event-registration-modal/event-registration-modal.component.css @@ -1,4 +1,8 @@ .reg-modal { padding-left: 20; padding-right: 20; -} \ No newline at end of file +} + +.date-options-list { + height: 40%; +} diff --git a/app/events/event-registration-modal/event-registration-modal.template.html b/app/events/event-registration-modal/event-registration-modal.template.html index 8b06e4c..45b1108 100644 --- a/app/events/event-registration-modal/event-registration-modal.template.html +++ b/app/events/event-registration-modal/event-registration-modal.template.html @@ -1,6 +1,6 @@ - +