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/main-menu-controller.js') 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 From be18a677863925963551ce3e88a4a4d254f3870c Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 14 Feb 2012 09:26:18 -0800 Subject: Implemented about box component and hooked it up to the About menu --- js/controllers/main-menu-controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/controllers/main-menu-controller.js') diff --git a/js/controllers/main-menu-controller.js b/js/controllers/main-menu-controller.js index 5e126617..2b848b9f 100644 --- a/js/controllers/main-menu-controller.js +++ b/js/controllers/main-menu-controller.js @@ -6,7 +6,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; + Component = require("montage/ui/component").Component, + AboutBoxPopup = require("js/components/about-box.reel").AboutBox; exports.MainMenuController = Montage.create(Component, { deserializedFromTemplate:{ @@ -36,8 +37,7 @@ exports.MainMenuController = Montage.create(Component, { }, handleExecuteHelpAbout:{ value:function () { - // TODO - console.log("Pull up the about popup"); + AboutBoxPopup.show(); } } }); -- cgit v1.2.3