Change day headers

This commit is contained in:
vakrilov
2015-03-21 09:19:52 +02:00
parent 5ab1ec2c19
commit 43e1a59ca8
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
import observable = require("data/observable"); import observable = require("data/observable");
import button = require("ui/button"); import button = require("ui/button");
var dayHeaders = ["WORKSHOPS", "CONFERENCE DAY 1", "CONFERENCE DAY 2"];
export class AppViewModel extends observable.Observable { export class AppViewModel extends observable.Observable {
public selectedViewIndex: number; public selectedViewIndex: number;
@@ -42,6 +44,8 @@ export class AppViewModel extends observable.Observable {
this._selectedIndex = value; this._selectedIndex = value;
this.notify({ object: this, eventName: observable.knownEvents.propertyChange, propertyName: "selectedIndex", value: value }); this.notify({ object: this, eventName: observable.knownEvents.propertyChange, propertyName: "selectedIndex", value: value });
this.set("dayHeader", dayHeaders[value]);
if (this.search !== "") { if (this.search !== "") {
this.search = ""; this.search = "";
} else { } else {

View File

@@ -42,7 +42,7 @@
<Label.formattedText> <Label.formattedText>
<FormattedString fontSize="18" foregroundColor="#fac950"> <FormattedString fontSize="18" foregroundColor="#fac950">
<FormattedString.spans> <FormattedString.spans>
<Span text="WORKSHOPS" fontAttributes="Bold" /> <Span text="{{ dayHeader }}" fontAttributes="Bold" />
</FormattedString.spans> </FormattedString.spans>
</FormattedString> </FormattedString>
</Label.formattedText> </Label.formattedText>