From c58dc96130c7eb5d964af53e9ad6e80bba5e647f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 17:24:40 -0700 Subject: initial stage web template Signed-off-by: Valerio Virgillito --- js/data/menu-data.js | 61 +++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 27 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index a1fe2703..9e8bf945 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -39,8 +39,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if(activeDocument !== null){return true;} - else{return false;} + return activeDocument !== null; } }, "action": "executeFileClose" @@ -54,8 +53,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if(activeDocument !== null){return true;} - else{return false;} + return activeDocument !== null; } }, "action": "executeFileCloseAll" @@ -73,8 +71,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if(activeDocument !== null){return true;} - else{return false;} + return activeDocument !== null; } }, "action": "executeSave" @@ -87,9 +84,8 @@ exports.MenuData = Montage.create( Montage, { "boundObj": "documentController", "boundProperty": "activeDocument", "oneway": true, - "boundValueMutator": function(activeDocument){ - if(activeDocument !== null){return true;} - else{return false;} + "boundValueMutator": function(activeDocument) { + return activeDocument !== null; } }, "action":"executeSaveAs" @@ -103,8 +99,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if(activeDocument !== null){return true;} - else{return false;} + return activeDocument !== null; } }, "action": "executeSaveAll" @@ -127,6 +122,26 @@ exports.MenuData = Montage.create( Montage, { "displayText" : "Close Project", "hasSubMenu" : false, "enabled": false + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "New Webpage", + "hasSubMenu" : false, + "enabled": true, + "action": "executeNewWebpage" + }, + { + "displayText" : "Open Webpage", + "hasSubMenu" : false, + "enabled": true, + "action": "executeWebpageOpen" } ] }, @@ -184,8 +199,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "checked": { @@ -202,8 +216,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "checked": { @@ -220,8 +233,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "submenu": true, @@ -267,8 +279,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "checked": { @@ -326,8 +337,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "checked": { @@ -348,8 +358,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "radio": true, @@ -367,8 +376,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "radio": true, @@ -386,8 +394,7 @@ exports.MenuData = Montage.create( Montage, { "boundProperty": "activeDocument", "oneway": true, "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} + return (activeDocument !== null) && (activeDocument.currentView === "design"); } }, "radio": true, -- cgit v1.2.3