Skip to content

Instantly share code, notes, and snippets.

@jbueza
Created May 10, 2010 23:44
Show Gist options
  • Save jbueza/396704 to your computer and use it in GitHub Desktop.
Save jbueza/396704 to your computer and use it in GitHub Desktop.
dojo.provide("clubn.controller.CycleController");
dojo.declare("clubn.controller.CycleController", mojo.controller.Controller,
{
addObservers: function() {
this.addObserver(this, "onInit", "InitializeCycle", function(context, caller) {
return {
timeout: 6000
};
});
},
addCommands: function() {
this.addCommand("InitializeCycle", "InitializeCycleBehavior");
},
addIntercepts: function() {
}
});
dojo.provide("clubn.behavior.InitializeCycleBehavior");
dojo.declare("clubn.behavior.InitializeCycleBehavior", mojo.command.Behavior, {
execute: function(requestObj) {
var params = requestObj.getParams();
jQuery(requestObj.getContextElement()).cycle({
fx: 'fade',
timeout: params.timeout
});
}
});
clubn.SiteMap = [
{
pattern: "#banner",
controllers: [{
controller: "clubn.controller.CycleController"
}]
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment