From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/controllers/elements/block-controller.js | 0 js/controllers/elements/canvas-controller.js | 0 js/controllers/elements/component-controller.js | 0 js/controllers/elements/controller-factory.js | 0 js/controllers/elements/element-controller.js | 0 js/controllers/elements/image-controller.js | 0 js/controllers/elements/shapes-controller.js | 0 js/controllers/elements/stage-controller.js | 0 js/controllers/elements/video-controller.js | 0 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/controllers/elements/block-controller.js mode change 100644 => 100755 js/controllers/elements/canvas-controller.js mode change 100644 => 100755 js/controllers/elements/component-controller.js mode change 100644 => 100755 js/controllers/elements/controller-factory.js mode change 100644 => 100755 js/controllers/elements/element-controller.js mode change 100644 => 100755 js/controllers/elements/image-controller.js mode change 100644 => 100755 js/controllers/elements/shapes-controller.js mode change 100644 => 100755 js/controllers/elements/stage-controller.js mode change 100644 => 100755 js/controllers/elements/video-controller.js (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/block-controller.js b/js/controllers/elements/block-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/controller-factory.js b/js/controllers/elements/controller-factory.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/image-controller.js b/js/controllers/elements/image-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js old mode 100644 new mode 100755 diff --git a/js/controllers/elements/video-controller.js b/js/controllers/elements/video-controller.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 0dca2755c07f9928e9d9b0b7feace48edf969900 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 27 Jan 2012 15:05:27 -0800 Subject: Updated canvas controller to override setProperties so we don't set styles when updating width and height. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/canvas-controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js index 7af7e824..21de9879 100755 --- a/js/controllers/elements/canvas-controller.js +++ b/js/controllers/elements/canvas-controller.js @@ -33,5 +33,13 @@ exports.CanvasController = Montage.create(ElementController, { ElementController.setProperty(el, p, value); } } + }, + + setProperties: { + value: function(el, props, index) { + for(var p in props) { + el.elementModel.controller.setProperty(el, p, props[p][index]); + } + } } }); \ No newline at end of file -- cgit v1.2.3 From d26a13de2aca25c36cb35f85604de1ac2b9befbb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 1 Feb 2012 14:37:30 -0800 Subject: Simple button native widget test. Added a controller, pi and panel code. Signed-off-by: Valerio Virgillito --- js/controllers/elements/component-controller.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 458e6b46..7a8acb3a 100644 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js @@ -9,4 +9,27 @@ var Montage = require("montage/core/core").Montage, exports.ComponentController = Montage.create(ElementController, { + getProperty: { + value: function(el, prop) { + switch(prop) { + case "label": + return this.application.ninja.currentDocument.getComponentFromElement(el).label; + break; + default: + return ElementController.getProperty(el, prop); + } + } + }, + + setProperty: { + value: function(el, p, value) { + switch(p) { + case "label": + this.application.ninja.currentDocument.getComponentFromElement(el).label = value; + break; + default: + ElementController.setProperty(el, p, value); + } + } + } }); -- cgit v1.2.3 From dbd3a60478db35b0b12baa2ca54a0712d880951f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 3 Feb 2012 15:50:35 -0800 Subject: button component using json data Signed-off-by: Valerio Virgillito --- js/controllers/elements/component-controller.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 7a8acb3a..1b0591be 100644 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js @@ -15,8 +15,11 @@ exports.ComponentController = Montage.create(ElementController, { case "label": return this.application.ninja.currentDocument.getComponentFromElement(el).label; break; + case "enabled": + return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; + break; default: - return ElementController.getProperty(el, prop); + return ElementController.getProperty(el, prop, true); } } }, @@ -27,6 +30,9 @@ exports.ComponentController = Montage.create(ElementController, { case "label": this.application.ninja.currentDocument.getComponentFromElement(el).label = value; break; + case "enabled": + this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; + break; default: ElementController.setProperty(el, p, value); } -- cgit v1.2.3 From 47df0aff81c25334b129047bb227ea5015357eda Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 9 Feb 2012 16:22:03 -0800 Subject: Setting defaults and more cleanup Signed-off-by: Valerio Virgillito --- js/controllers/elements/component-controller.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 1b0591be..33b9b79a 100644 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js @@ -18,6 +18,12 @@ exports.ComponentController = Montage.create(ElementController, { case "enabled": return this.application.ninja.currentDocument.getComponentFromElement(el).enabled; break; + case "disabled": + return this.application.ninja.currentDocument.getComponentFromElement(el).disabled; + break; + case "value": + return this.application.ninja.currentDocument.getComponentFromElement(el).value; + break; default: return ElementController.getProperty(el, prop, true); } @@ -33,6 +39,12 @@ exports.ComponentController = Montage.create(ElementController, { case "enabled": this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value; break; + case "disabled": + this.application.ninja.currentDocument.getComponentFromElement(el).disabled = value; + break; + case "value": + this.application.ninja.currentDocument.getComponentFromElement(el).value = value; + break; default: ElementController.setProperty(el, p, value); } -- cgit v1.2.3 From 08101852de934ed674807b26ab89f432daa4d6fe Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 14 Feb 2012 12:01:57 -0800 Subject: Fixing the live preview background issue. Signed-off-by: Valerio Virgillito --- js/controllers/elements/stage-controller.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index af7c4858..a8546662 100644 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -92,7 +92,11 @@ exports.StageController = Montage.create(ElementController, { setProperty: { value: function(el, p, value) { + switch(p) { + case "body-background": + el.elementModel.body.style.setProperty("background", value); + break; case "background": el.elementModel.stageBackground.style.setProperty(p, value); break; -- cgit v1.2.3