From 0ebb822b0535bf1bb100b3f3cb396c8b6d3383f1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 11:23:12 -0700 Subject: fixing some of the document bindings. Signed-off-by: Valerio Virgillito --- js/data/menu-data.js | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 1cde3e8d..7cf40a8a 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -36,11 +36,8 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - return activeDocument !== null; - } + "boundProperty": "_documents.count()", + "oneway": true }, "action": "executeFileClose" }, @@ -50,11 +47,8 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - return activeDocument !== null; - } + "boundProperty": "_documents.count()", + "oneway": true }, "action": "executeFileCloseAll" }, @@ -68,11 +62,8 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - return activeDocument !== null; - } + "boundProperty": "_documents.count()", + "oneway": true }, "action": "executeSave" }, @@ -82,11 +73,8 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument) { - return activeDocument !== null; - } + "boundProperty": "_documents.count()", + "oneway": true }, "action":"executeSaveAs" }, @@ -96,11 +84,8 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - return activeDocument !== null; - } + "boundProperty": "_documents.count()", + "oneway": true }, "action": "executeSaveAll" }, -- cgit v1.2.3