Created
January 9, 2012 21:20
-
-
Save guilhermeblanco/1584994 to your computer and use it in GitHub Desktop.
Page in PureMVC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.declare('base.page.index.IndexStartupCommand'); | |
base.page.index.IndexStartupCommand = function () | |
{ | |
base.page.PageMacroCommand.call(this); | |
}; | |
Object.extend(base.page.index.IndexStartupCommand, base.page.PageMacroCommand); | |
var _p = base.page.index.IndexStartupCommand.prototype; | |
_p._initializeMacroCommand = function () | |
{ | |
base.page.PageMacroCommand.prototype._initializeMacroCommand.call(this); | |
// Initialize page only widgets here | |
//this.addSubCommand(base.widget.otherWidget.Command); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.declare('base.page.PageMacroCommand'); | |
base.page.PageMacroCommand = function () | |
{ | |
org.puremvc.js.patterns.command.MacroCommand.call(this); | |
} | |
Object.extend(base.page.PageMacroCommand, org.puremvc.js.patterns.command.MacroCommand); | |
var _p = base.page.PageMacroCommand.prototype; | |
_p._initializeMacroCommand = function () | |
{ | |
// Initialize app-wide generic behavior | |
$("html").removeClass("no-js").addClass("js"); | |
// Initialize app-wide widgets | |
this.addSubCommand(base.widget.sampleWidget.Command); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment