-enyo.kind({
- name: "blerg.Blerg",
- kind: "Control",
- lastHash: null,
- handlers: {
- onStartSignup: "showSignupDialog",
- onTryLogin: "tryLogin",
- onTryLogout: "tryLogout",
- onSetTitle: "setTitle"
- },
- components: [
- {classes: "blerg-header", components: [
- {name: "title", kind: "blerg.Title"},
- {name: "controls", kind: "blerg.Controls"},
- {style: "clear: both"},
- {name: "post", kind: "blerg.Post", showing: false},
- {name: "help", kind: "blerg.Help"}
- ]},
- {name: "main", kind: "blerg.Main"},
- {name: "signupDialog", kind: "blerg.SignupDialog"},
- {name: "passwdDialog", kind: "blerg.PasswdDialog"},
- {name: "api", kind: "blerg.API",
- onLoginSuccessful: "loginSuccessful",
- onLoginFailed: "loginFailed",
- onLogoutSuccessful: "logout"}
- ],
- urlmap: [
- ['search', /^\?post\/([^/]+)\/(.+)/, "blerg.ExternalURLPost"],
- ['hash', /^#\/(ref|tag)\/([A-Za-z0-9_-]+)(?:\/p(\d+))?$/, "blerg.Tag"],
- ['hash', /^#\/feed(?:\/p(\d+))?$/, "blerg.Feed"],
- ['hash', /^#([A-Za-z0-9_-]+)(?:\/(p)?(\d+))?$/, "blerg.User"]
- ],
- pathHandlers: [ blerg.Welcome ],
- rendered: function() {
- this.inherited(arguments);
-
- this.lastHash = location.hash;
- this.urlSwitch();