From cde1dd9a9156b9682fdf85ce2cd4acdd94124c37 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Fri, 10 Feb 2012 16:00:35 -0800 Subject: -Changed the capitalization of all main top level menus from all caps -Added new main-menu-controller to be the default generic handler for menu item calls that do not need to call to a specific controller -Removed the test menu item -Finalized the help submenu items and hooked them up to the main-menu-controller --- js/controllers/main-menu-controller.js | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 js/controllers/main-menu-controller.js (limited to 'js/controllers') diff --git a/js/controllers/main-menu-controller.js b/js/controllers/main-menu-controller.js new file mode 100644 index 00000000..5e126617 --- /dev/null +++ b/js/controllers/main-menu-controller.js @@ -0,0 +1,43 @@ +/* +This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + + +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; + +exports.MainMenuController = Montage.create(Component, { + deserializedFromTemplate:{ + value:function () { + this.eventManager.addEventListener("executeHelpFAQ", this, false); + this.eventManager.addEventListener("executeHelpForums", this, false); + this.eventManager.addEventListener("executeHelpTopics", this, false); + this.eventManager.addEventListener("executeHelpAbout", this, false); + } + }, + + // Basic help menu handling methods + handleExecuteHelpFAQ:{ + value:function () { + window.open('http://www.tetsubo.org/go/ninjafaq'); + } + }, + handleExecuteHelpForums:{ + value:function () { + window.open('http://www.tetsubo.org/go/ninjaforums'); + } + }, + handleExecuteHelpTopics:{ + value:function () { + window.open('http://www.tetsubo.org/go/ninjadocs'); + } + }, + handleExecuteHelpAbout:{ + value:function () { + // TODO + console.log("Pull up the about popup"); + } + } +}); -- cgit v1.2.3