Change texts, according to update wireframes.

This commit is contained in:
Georgi Prodanov 2017-03-07 12:23:14 +02:00
Родитель 59872fc7e1
Коммит c64efccd61
5 изменённых файлов: 17 добавлений и 11 удалений

Просмотреть файл

@ -137,7 +137,7 @@ export class EventDetailsComponent implements OnInit {
.then(() => {
this._updateCountsByDate();
this._userRegForThisEvent.Choices = updatedChoices;
this._alertsService.showSuccess('Date vote updated');
this._alertsService.showSuccess('Vote updated');
})
.catch(err => err && this._alertsService.showError(err.message));
}
@ -234,7 +234,7 @@ export class EventDetailsComponent implements OnInit {
actions: this._actions,
cancelButtonText: 'Cancel'
}).then((result) => {
if (result === 'Change Date Vote') {
if (result === 'Change vote') {
this.changeVote();
} else if (result === 'I\'m not going') {
this.unregister();
@ -281,7 +281,7 @@ export class EventDetailsComponent implements OnInit {
}
if (this.canChangeVote()) {
this._actions.push('Change Date Vote');
this._actions.push('Change vote');
}
if (this.canUnregister() || this.rethinkAndDontGo()) {
@ -322,8 +322,8 @@ export class EventDetailsComponent implements OnInit {
private _showSuccessfulRegistrationModal() {
let ctx = {
title: 'Hooooray!',
text: 'You have successfully registered for this event.',
title: 'HOOOORAY!',
text: 'You have successfully voted for event date.',
closeTimeout: constants.modalsTimeout
};
@ -352,7 +352,8 @@ export class EventDetailsComponent implements OnInit {
};
if (isChangeVote) {
opts.context.title = 'Change date vote';
opts.context.title = 'Change vote';
opts.context.buttons = { ok: 'Submit new vote' };
}
return this._modalService.showModal(EventRegistrationModalComponent, opts)

Просмотреть файл

@ -12,7 +12,7 @@
</ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(canFinalize())" (tap)="goFinalize()" text="Set final date" android.position="popup"></ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(canChangeVote())" (tap)="changeVote()" text="Change Date Vote" android.position="popup"></ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(canChangeVote())" (tap)="changeVote()" text="Change vote" android.position="popup"></ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(canUnregister() || rethinkAndDontGo())" (tap)="unregister()" text="I'm not going" android.position="popup"></ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(rethinkAndGo())" (tap)="register()" text="I'm going" android.position="popup"></ActionItem>
<ActionItem *ngIf="isAndroid" [visibility]="showIf(canEdit())" (tap)="deleteEvent()" text="Delete Event" android.position="popup"></ActionItem>
@ -30,7 +30,7 @@
<photo-picker [url]="event.ImageUrl" [type]="'event'" [noImageIcon]="'&#x77;'" [noImageText]="'No image available'"></photo-picker>
</StackLayout>
<StackLayout left="0" top="20" height="40">
<Label *ngIf="alreadyRegistered" text="Registered" class="registered-label"></Label>
<Label *ngIf="alreadyRegistered" text="Voted" class="registered-label"></Label>
</StackLayout>
</AbsoluteLayout>

Просмотреть файл

@ -14,10 +14,15 @@ export class EventRegistrationModalComponent {
availableDates: Array<{ value: Date, isSelected: boolean }>;
dateFormat = utilities.dateFormat;
title: string;
buttons = { ok: 'Submit', cancel: 'Maybe later' };
private _locked: boolean = false;
constructor(private _params: ModalDialogParams, private _alertsService: AlertService) {
this.title = this._params.context.title || 'Registration';
this.title = this._params.context.title || 'Vote for date';
if (this._params.context.buttons) {
this.buttons.ok = this._params.context.buttons.ok || this.buttons.ok;
this.buttons.cancel = this._params.context.buttons.cancel || this.buttons.cancel;
}
this.availableDates = this._params.context.availableDates.map((dateAsString: string) => {
return {
value: new Date(dateAsString),

Просмотреть файл

@ -1,4 +1,4 @@
<app-modal (ok)="onOk($event)" (cancel)="onCancel($event)" [title]="title" [buttons]="{ ok: 'Submit', cancel: 'Maybe later' }">
<app-modal (ok)="onOk($event)" (cancel)="onCancel($event)" [title]="title" [buttons]="buttons">
<StackLayout class="reg-modal">
<ListView class="date-options-list" [items]="availableDates" separatorColor="transparent">
<template let-option="item" class="form">

Просмотреть файл

@ -3,7 +3,7 @@
<StackLayout *ngFor="let event of events; let isLast = last; trackBy: event?.Id" (tap)="eventTap(event)">
<WrapLayout class="event-name-wrp">
<Label [text]="event.Name" textWrap="true" class="event-name"></Label>
<Label *ngIf="userIsRegistered(event.Id) && !isPastEvent(event)" class="registered-label" text="Registered"></Label>
<Label *ngIf="userIsRegistered(event.Id) && !isPastEvent(event)" class="registered-label" text="Voted"></Label>
</WrapLayout>
<GridLayout columns="auto, *" class="event-date-wrp">
<Label *ngIf="getEventDate(event)" [text]="getEventDate(event) | date:dateFormat | uppercase" col="0" class="event-date" textWrap="true"></Label>