diff --git a/app/events/edit-event/edit-event.component.ts b/app/events/edit-event/edit-event.component.ts index 150faae..7c302a1 100644 --- a/app/events/edit-event/edit-event.component.ts +++ b/app/events/edit-event/edit-event.component.ts @@ -76,7 +76,8 @@ export class EditEventComponent implements OnInit { return this._alertsService.showSuccess(`Event "${this.event.Name}" updated!`); }) .then((res) => { - this._routerExtensions.navigate([`/events/${this.event.Id}`]); + let transition = utilities.getReversePageTransition(); + this._routerExtensions.navigate([`/events/${this.event.Id}`], { clearHistory: true, transition }); }) .catch(err => { if (err) { diff --git a/app/events/event-details/event-details.component.ts b/app/events/event-details/event-details.component.ts index de60a18..a941756 100644 --- a/app/events/event-details/event-details.component.ts +++ b/app/events/event-details/event-details.component.ts @@ -96,6 +96,10 @@ export class EventDetailsComponent implements OnInit { this._routerExtensions.navigate([`/events/${this.event.Id}/edit`]); } + canGoBack() { + return this._routerExtensions.canGoBack(); + } + canEdit() { return this._currentUser && this.event && !this.isPastEvent && this.event.Owner === this._currentUser.Id; } @@ -158,8 +162,9 @@ export class EventDetailsComponent implements OnInit { onBack() { if (this._routerExtensions.canGoBack()) { this._routerExtensions.back(); - } else { - this._routerExtensions.navigate(['/events'], { clearHistory: true }); + } else { // simulate going back + let transition = utilities.getReversePageTransition(); + this._routerExtensions.navigate(['/events'], { clearHistory: true, transition }); } } diff --git a/app/events/event-details/event-details.template.html b/app/events/event-details/event-details.template.html index 6d4a548..75ea5a0 100644 --- a/app/events/event-details/event-details.template.html +++ b/app/events/event-details/event-details.template.html @@ -2,6 +2,9 @@ + + + diff --git a/app/shared/utilities.ts b/app/shared/utilities.ts index 8def023..a4ae629 100644 --- a/app/shared/utilities.ts +++ b/app/shared/utilities.ts @@ -119,3 +119,7 @@ export function getMenuTransition() { export function getPageTransition() { return getTransition(); } + +export function getReversePageTransition() { + return getTransition('slideRight'); +}