aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormayhewinator2012-02-10 16:25:23 -0800
committermayhewinator2012-02-10 16:25:23 -0800
commite142611e22718b1f1d1696902ad9161ec5f33f98 (patch)
tree9fe9a49b5b49c3c0d15ea4fc124df4c100ffb730 /js
parent344933fd505afb9f5dfa3be8cc959112df04da0a (diff)
parenteb0032234971f2c1c471f562d52c086fcffe8a14 (diff)
downloadninja-e142611e22718b1f1d1696902ad9161ec5f33f98.tar.gz
Merge pull request #32 from mayhewinator/WorkingBranch
Updates for splash screen, menu items and implemented some of the new help menu items
Diffstat (limited to 'js')
-rw-r--r--js/controllers/main-menu-controller.js43
-rw-r--r--js/data/menu-data.js41
-rw-r--r--js/ninja.reel/ninja.html15
3 files changed, 70 insertions, 29 deletions
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 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8var Montage = require("montage/core/core").Montage,
9 Component = require("montage/ui/component").Component;
10
11exports.MainMenuController = Montage.create(Component, {
12 deserializedFromTemplate:{
13 value:function () {
14 this.eventManager.addEventListener("executeHelpFAQ", this, false);
15 this.eventManager.addEventListener("executeHelpForums", this, false);
16 this.eventManager.addEventListener("executeHelpTopics", this, false);
17 this.eventManager.addEventListener("executeHelpAbout", this, false);
18 }
19 },
20
21 // Basic help menu handling methods
22 handleExecuteHelpFAQ:{
23 value:function () {
24 window.open('http://www.tetsubo.org/go/ninjafaq');
25 }
26 },
27 handleExecuteHelpForums:{
28 value:function () {
29 window.open('http://www.tetsubo.org/go/ninjaforums');
30 }
31 },
32 handleExecuteHelpTopics:{
33 value:function () {
34 window.open('http://www.tetsubo.org/go/ninjadocs');
35 }
36 },
37 handleExecuteHelpAbout:{
38 value:function () {
39 // TODO
40 console.log("Pull up the about popup");
41 }
42 }
43});
diff --git a/js/data/menu-data.js b/js/data/menu-data.js
index e9e47dc0..34adc82d 100644
--- a/js/data/menu-data.js
+++ b/js/data/menu-data.js
@@ -10,7 +10,7 @@ exports.MenuData = Montage.create( Montage, {
10 topLevelMenu: { 10 topLevelMenu: {
11 value: [ 11 value: [
12 { 12 {
13 "header": "FILE", 13 "header": "File",
14 "entries": [ 14 "entries": [
15 { 15 {
16 "displayText" : "New Project", 16 "displayText" : "New Project",
@@ -71,7 +71,7 @@ exports.MenuData = Montage.create( Montage, {
71 ] 71 ]
72 }, 72 },
73 { 73 {
74 "header": "EDIT", 74 "header": "Edit",
75 "entries": [ 75 "entries": [
76 { 76 {
77 "displayText" : "Undo", 77 "displayText" : "Undo",
@@ -111,7 +111,7 @@ exports.MenuData = Montage.create( Montage, {
111 ] 111 ]
112 }, 112 },
113 { 113 {
114 "header": "VIEW", 114 "header": "View",
115 "entries": [ 115 "entries": [
116 { 116 {
117 "displayText" : "Zoom In", 117 "displayText" : "Zoom In",
@@ -282,7 +282,7 @@ exports.MenuData = Montage.create( Montage, {
282 ] 282 ]
283 }, 283 },
284 { 284 {
285 "header": "WINDOW", 285 "header": "Window",
286 "entries": [ 286 "entries": [
287 { 287 {
288 "displayText" : "Tools", 288 "displayText" : "Tools",
@@ -356,41 +356,34 @@ exports.MenuData = Montage.create( Montage, {
356 ] 356 ]
357 }, 357 },
358 { 358 {
359 "header": "HELP", 359 "header": "Help",
360 "entries": [ 360 "entries": [
361 { 361 {
362 "displayText" : "About", 362 "displayText" : "Ninja FAQ",
363 "hasSubMenu" : false, 363 "hasSubMenu" : false,
364 "enabled": true 364 "enabled": true,
365 "action": "executeHelpFAQ"
365 }, 366 },
366 { 367 {
367 "displayText" : "FAQ", 368 "displayText" : "Ninja Forums",
368 "hasSubMenu" : false, 369 "hasSubMenu" : false,
369 "enabled": true 370 "enabled": true,
371 "action": "executeHelpForums"
370 }, 372 },
371 { 373 {
372 "displayText" : "Forums", 374 "displayText" : "Help Topics",
373 "hasSubMenu" : false, 375 "hasSubMenu" : false,
374 "enabled": true 376 "enabled": true,
375 } 377 "action": "executeHelpTopics"
376 ]
377 },
378 {
379 "header": "TEST",
380 "entries": [
381 {
382 "displayText" : "Open CSS View",
383 "hasSubMenu" : false,
384 "enabled": true
385 }, 378 },
386 { 379 {
387 "displayText" : "Open JS View", 380 "displayText" : "About Ninja...",
388 "hasSubMenu" : false, 381 "hasSubMenu" : false,
389 "enabled": true 382 "enabled": true,
383 "action": "executeHelpAbout"
390 } 384 }
391 ] 385 ]
392 } 386 }
393
394 ] 387 ]
395 } 388 }
396}); 389});
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index 158bcaff..c8625159 100644
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -259,6 +259,11 @@
259 "name": "NewFileWorkflowController" 259 "name": "NewFileWorkflowController"
260 }, 260 },
261 261
262 "mainMenuController": {
263 "module": "js/controllers/main-menu-controller",
264 "name": "MainMenuController"
265 },
266
262 "owner": { 267 "owner": {
263 "module": "js/ninja.reel", 268 "module": "js/ninja.reel",
264 "name": "Ninja", 269 "name": "Ninja",
@@ -280,10 +285,10 @@
280 "filePickerController": {"@": "filePickerController"}, 285 "filePickerController": {"@": "filePickerController"},
281 "newFileController": {"@": "newFileController"}, 286 "newFileController": {"@": "newFileController"},
282 "documentBar": {"@": "documentBar"}, 287 "documentBar": {"@": "documentBar"},
283 "timeline": {"@": "timeline"} 288 "timeline": {"@": "timeline"},
289 "mainMenuController": {"@": "mainMenuController"}
284 } 290 }
285 } 291 }
286
287 } 292 }
288 </script> 293 </script>
289 294
@@ -345,9 +350,9 @@
345 </section> 350 </section>
346 351
347 <section id="timelineResizer" class="timelineResizer resizeBar"></section> 352 <section id="timelineResizer" class="timelineResizer resizeBar"></section>
348 <section id="breadCrumbTrail"> 353 <section id="breadCrumbTrail">
349 <div id="breadCrumbComponent"></div> 354 <div id="breadCrumbComponent"></div>
350 </section> 355 </section>
351 <section id="bottomPanelContainer" class="panelContainer"> 356 <section id="bottomPanelContainer" class="panelContainer">
352 <section id="timelinePanel" class="panel"> 357 <section id="timelinePanel" class="panel">
353 <div id="timelinePanelComponent"></div> 358 <div id="timelinePanelComponent"></div>