Redesign user tasks
[blerg.git] / www / jssrc / blerg / Blerg.js
index 2a571a8..31d28a8 100644 (file)
@@ -6,7 +6,8 @@ enyo.kind({
                onStartSignup: "showSignupDialog",
                onTryLogin: "tryLogin",
                onTryLogout: "tryLogout",
-               onSetTitle: "setTitle"
+               onSetTitle: "setTitle",
+               onPostVisibility: "postVisibilityUpdate"
        },
        components: [
                {classes: "blerg-header", components: [
@@ -71,16 +72,7 @@ enyo.kind({
                this.$.signupDialog.show();
        },
        setTitle: function(inSender, inEvent) {
-               if (inEvent.section != undefined)
-                       this.$.title.setSection(inEvent.section);
-
-               if (inEvent.subscribed != undefined)
-                       this.$.title.setSubscribed(inEvent.subscribed);
-
-               if (inEvent.showControls)
-                       this.$.title.showControls()
-               else
-                       this.$.title.hideControls();
+               this.$.title.waterfall('onSetTitle', inEvent);
        },
        tryLogin: function(inSender, inEvent) {
                this.$.api.login(inEvent.username, inEvent.password);
@@ -102,5 +94,9 @@ enyo.kind({
        logout: function(inSender, inEvent) {
                clearInterval(this.feedStatusUpdateInterval);
                this.waterfall('onLogout');
+       },
+       postVisibilityUpdate: function(inSender, inEvent) {
+               this.$.post.waterfall('onPostVisibility', inEvent);
+               this.$.controls.waterfall('onPostVisibility', inEvent);
        }
 });