- name: "blerg.Record",
- kind: "Control",
- classes: "record",
- published: {
- data: "",
- timestamp: 0,
- author: "",
- record: null
- },
- components: [
- {name: "data", noDom: true, allowHtml: true},
- {classes: "info", components: [
- {noDom: true, content: "Posted "},
- {name: "date", noDom: true},
- {noDom: true, content: ". "},
- {name: "permalink", kind: "blerg.Link", content: "[permalink]"},
- {noDom: true, content: " "},
- {name: "reply", kind: "blerg.Link", content: "[reply]", onclick: "postPopup"}
- ]}
- ],
- create: function() {
- this.inherited(arguments);
- this.dataChanged();
- this.timestampChanged();
- this.updateLinks();
- },
- dataChanged: function() {
- this.$.data.setContent(blerg.Util.blergFormat(this.data));
- },
- timestampChanged: function() {
- this.$.date.setContent(new Date(this.timestamp * 1000).toString());
- },
- authorChanged: function() {
- this.updateLinks();
- },
- recordChanged: function() {
- this.updateLinks();
- },
- updateLinks: function() {
- this.$.permalink.setHref(baseURL + enyo.macroize("/#{$author}/{$record}", this));
- },
- postPopup: function() {
- this.bubble('onPostVisibility', {
- showing: true,
- data: enyo.macroize("@{$author}/{$record}", this)
- });
- return true;
- }
+ name: "blerg.Record",
+ kind: "Control",
+ classes: "record",
+ published: {
+ data: "",
+ timestamp: 0,
+ author: "",
+ record: null
+ },
+ components: [
+ {name: "data", tag: null, allowHtml: true},
+ {classes: "info", components: [
+ {tag: null, content: "Posted "},
+ {name: "date", tag: null},
+ {tag: null, content: ". "},
+ {name: "permalink", kind: "blerg.Link", content: "[permalink]"},
+ {tag: null, content: " "},
+ {name: "reply", kind: "blerg.Link", content: "[reply]", onNavigate: "postPopup"}
+ ]}
+ ],
+ create: function() {
+ this.inherited(arguments);
+ this.dataChanged();
+ this.timestampChanged();
+ this.updateLinks();
+ },
+ dataChanged: function() {
+ this.$.data.setContent(blerg.Util.blergFormat(this.data));
+ },
+ timestampChanged: function() {
+ this.$.date.setContent(new Date(this.timestamp * 1000).toString());
+ },
+ authorChanged: function() {
+ this.updateLinks();
+ },
+ recordChanged: function() {
+ this.updateLinks();
+ },
+ updateLinks: function() {
+ this.$.permalink.setHref(baseURL + enyo.macroize("/#{$author}/{$record}", this));
+ },
+ postPopup: function() {
+ this.bubble('onPostVisibility', {
+ showing: true,
+ data: enyo.macroize("@{$author}/{$record}: ", this)
+ });
+ return true;
+ }