From 9b238646d7c9d8ed1fde010cde5597f8787a8806 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 1 Jun 2012 19:04:38 -0700 Subject: Binding Panel - Item css and toggle button action handler --- js/controllers/objects-controller.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index a02c3045..59646083 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js @@ -89,19 +89,21 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { bindingsArray = [], property, descriptor, bindingArgsObject; - for(property in descriptors) { - if(descriptors.hasOwnProperty(property)) { - descriptor = descriptors[property]; - - bindingArgsObject = { - sourceObject : object, - sourceObjectPropertyPath : property, - boundObject : descriptor.boundObject, - boundObjectPropertyPath : descriptor.boundObjectPropertyPath, - onweway : descriptor.oneway - }; - - bindingsArray.push(bindingArgsObject); + if(descriptors) { + for(property in descriptors) { + if(descriptors.hasOwnProperty(property)) { + descriptor = descriptors[property]; + + bindingArgsObject = { + sourceObject : object, + sourceObjectPropertyPath : property, + boundObject : descriptor.boundObject, + boundObjectPropertyPath : descriptor.boundObjectPropertyPath, + oneway : (descriptor.oneway || descriptor.oneway === null) ? true : false + }; + + bindingsArray.push(bindingArgsObject); + } } } -- cgit v1.2.3 From 62d3628e1a00d56a055bfe23a5b21bac1afdf2b8 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 1 Jun 2012 19:17:31 -0700 Subject: Objects Controller - Fix access to the oneway property --- js/controllers/objects-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 59646083..2c9f2d66 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js @@ -99,7 +99,7 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { sourceObjectPropertyPath : property, boundObject : descriptor.boundObject, boundObjectPropertyPath : descriptor.boundObjectPropertyPath, - oneway : (descriptor.oneway || descriptor.oneway === null) ? true : false + oneway : descriptor.oneway }; bindingsArray.push(bindingArgsObject); -- cgit v1.2.3