From b435e97ff312eea15086069ce0ab6991acac32ff Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 25 Jun 2012 11:52:28 -0700 Subject: Color Popup Test Candidate Preliminary check in for testing to commence on new color popup functionality. --- js/panels/properties.reel/properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 5719a63d..c8383307 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -373,7 +373,7 @@ exports.Properties = Montage.create(Component, { } } } - + if (previousInput === 'chip') return; this.application.ninja.colorController.colorModel.input = previousInput; var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; color.c.wasSetByCode = true; -- cgit v1.2.3 From a892b069e866f7d87bd0d8439deec38e2cd604fd Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 28 Jun 2012 11:05:07 -0700 Subject: Fixing body background bug --- js/panels/properties.reel/sections/custom.reel/custom.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 9c31cf45..5112fca9 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -115,11 +115,25 @@ exports.CustomSection = Montage.create(Component, { value: function(event) { // Change the stage color for now //console.log(this, event); - if (event._event.color && event._event.color.css) { + + if (event._event.colorMode !== 'gradient' && event._event.color) { + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", ''); + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); + } else if (event._event.color) { + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", ''); + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); + } else { + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); + } + + /* +if (event._event.color && event._event.color.css) { ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); } else { ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", ''); } +*/ /* var propEvent = document.createEvent("CustomEvent"); propEvent.initEvent("propertyChange", true, true); -- cgit v1.2.3 From e25474df5116a7e336933a1d1d17ff11a0ef9786 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 28 Jun 2012 11:17:28 -0700 Subject: Fixing the button for the shape pi Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.css | 12 ++++++++---- js/panels/properties.reel/sections/custom.reel/custom.js | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css index d1aa750a..ce5145d0 100755 --- a/js/panels/properties.reel/properties.css +++ b/js/panels/properties.reel/properties.css @@ -314,11 +314,13 @@ input label { width:45px; } -.propertiesPanel div.montage-button:disabled { +/*.propertiesPanel div.montage-button:disabled {*/ +.propertiesPanel div[type=button]:disabled { opacity: 0.4; } -.propertiesPanel div.montage-button { +/*.propertiesPanel div.montage-button {*/ +.propertiesPanel div[type=button] { font-size: 9px; cursor: pointer; display: block; @@ -336,10 +338,12 @@ input label { height: 14px; } -.propertiesPanel div.montage-button:active { +/*.propertiesPanel div.montage-button:active {*/ +.propertiesPanel div[type=button]:active { background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); } -.propertiesPanel div.montage-button:hover { +/*.propertiesPanel div.montage-button:hover {*/ +.propertiesPanel div[type=button]:hover { -webkit-box-shadow: 0px 0px 3px #b4b4b4; } \ No newline at end of file diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 9c31cf45..84e89334 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -20,7 +20,7 @@ var Dropdown = require("js/components/combobox.reel").Combobox; var TextField = require("js/components/textfield.reel").TextField; var LabelCheckbox = require("js/components/ui/label-checkbox.reel").LabelCheckbox; var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; -var Button = require("montage/ui/button.reel").Button; +var Button = require("montage/ui/native/button.reel").Button; exports.CustomSection = Montage.create(Component, { -- cgit v1.2.3 From 12b8f40d5593d55e1fe64e4bef2ac3bc6709f6ff Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 28 Jun 2012 11:24:41 -0700 Subject: removing some comments Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css index ce5145d0..786eb57a 100755 --- a/js/panels/properties.reel/properties.css +++ b/js/panels/properties.reel/properties.css @@ -314,12 +314,10 @@ input label { width:45px; } -/*.propertiesPanel div.montage-button:disabled {*/ .propertiesPanel div[type=button]:disabled { opacity: 0.4; } -/*.propertiesPanel div.montage-button {*/ .propertiesPanel div[type=button] { font-size: 9px; cursor: pointer; @@ -338,12 +336,10 @@ input label { height: 14px; } -/*.propertiesPanel div.montage-button:active {*/ .propertiesPanel div[type=button]:active { background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); } -/*.propertiesPanel div.montage-button:hover {*/ .propertiesPanel div[type=button]:hover { -webkit-box-shadow: 0px 0px 3px #b4b4b4; } \ No newline at end of file -- cgit v1.2.3 From c1a3bfcc53e4526d5bb54687ba18ccaaefa96fc2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 28 Jun 2012 11:49:45 -0700 Subject: Fixing body PI background getter --- js/panels/properties.reel/properties.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index c8383307..b2941fe8 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -296,9 +296,20 @@ exports.Properties = Montage.create(Component, { // Root element color chip if(isRoot) { - var backgroundChip = this.customSections[0].content.controls["background"]; - var rootBackgroundColor = ElementsMediator.getProperty(el, "background"); - + // + var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; + // + if (ElementsMediator.getProperty(el, "background-image")) { + rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } else if (ElementsMediator.getProperty(el, "background-color")){ + rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } else if (ElementsMediator.getProperty(el, "background")){ + rootBackgroundColor = ElementsMediator.getProperty(el, "background"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } + // if(rootBackgroundColor) { backgroundChip.color = rootBackgroundColor; } else { -- cgit v1.2.3