Created
May 19, 2011 19:28
-
-
Save thurloat/981521 to your computer and use it in GitHub Desktop.
2 Different ways to write a menu widget?
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
/** | |
* In your display, you might add the menu widget to the menu panel like so | |
*/ | |
var menu_root = new sd.Widgets.MenuRoot(); | |
menu_root.as_widget().prependTo(menu); | |
menu_root.on_logout_click(function() { | |
sd.Gadget.client.oauth.logout(); | |
sd.Gadget.render_login_page(); | |
sd.Gadget.render_menu(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment