From e07ec7dd1a4b8df747f6af0d54fe95e3a237f0c8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 14 Mar 2012 11:47:06 -0700 Subject: Removing the name attribute from the PI. Fixing the ID and Class attribute from the PI Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.html | 70 ++++++------------------------- js/panels/properties.reel/properties.js | 64 +++++++++++++++------------- 2 files changed, 47 insertions(+), 87 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index 72a6def6..bcf54b95 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html @@ -10,35 +10,19 @@ + + +
+
+
+ + \ No newline at end of file diff --git a/js/panels/presets/animations-presets.reel/animations-presets.js b/js/panels/presets/animations-presets.reel/animations-presets.js new file mode 100644 index 00000000..ab200212 --- /dev/null +++ b/js/panels/presets/animations-presets.reel/animations-presets.js @@ -0,0 +1,73 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component, + DefaultPresets = require("js/panels/presets/default-animation-presets").animationPresets; + +exports.AnimationsLibrary = Montage.create(Component, { + hasTemplate: { + value: true + }, + presetData : { + value: null + }, + deserializedFromTemplate : { + value: function() { + this.presetData = DefaultPresets; + } + }, + handleNodeActivation: { + value: function(presetData) { + //debugger; + var selection = this.application.ninja.selectedElements, + stylesController = this.application.ninja.stylesController, + selectorBase = presetData.selectorBase, + self = this; + + if(!selection || !selection.length || selection.length === 0) { + return false; + } + + selectorBase = stylesController.generateClassName(selectorBase); + + presetData.rules.forEach(function(rule) { + if(rule.isKeyFrameRule) { + this.application.ninja.stylesController.addRule( + '@-webkit-keyframes ' + presetData.selectorBase, + this.stringifyKeys(rule.keys) + ); + } else { + this.application.ninja.stylesController.addRule('.' + selectorBase + rule.selectorSuffix, rule.styles); + } + + }, this); + + selection.forEach(function(el) { + el._element.classList.add(selectorBase); + }, this); + + } + }, + + stringifyKeys : { + value: function(keysArray) { + var keysString = ''; + + keysArray.forEach(function(key) { + var styles = '', style; + + for(style in key.styles) { + styles += style + ':' + key.styles[style] + '; '; + } + + keysString += key.keyText + ' {' + styles + ' }'; + }); + + return keysString; + } + } +}); diff --git a/js/panels/presets/content.reel/content.html b/js/panels/presets/content.reel/content.html index 38de2a6d..f01e6435 100644 --- a/js/panels/presets/content.reel/content.html +++ b/js/panels/presets/content.reel/content.html @@ -19,7 +19,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "tabBar" : {"#": "tab-bar" }, "tabs" : [ {"key":"styles", "tab": {"#": "styles" }}, - {"key":"transitions", "tab": {"#": "transitions" }} + {"key":"transitions", "tab": {"#": "transitions" }}, + {"key":"animations", "tab": {"#": "animations" }} ] } }, @@ -30,8 +31,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element": {"#": "librarySlot"}, "switchComponents": { "styles": {"@": "stylesLibrary"}, - "transitions": {"@": "transitionsLibrary"} - + "transitions": {"@": "transitionsLibrary"}, + "animations": {"@": "animationsLibrary"} } }, "bindings": { @@ -49,6 +50,10 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "transitionsLibrary": { "module": "js/panels/presets/transitions-presets.reel", "name": "TransitionsLibrary" + }, + "animationsLibrary": { + "module": "js/panels/presets/animations-presets.reel", + "name": "AnimationsLibrary" } } @@ -59,6 +64,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
diff --git a/js/panels/presets/default-animation-presets.js b/js/panels/presets/default-animation-presets.js new file mode 100644 index 00000000..10a3e906 --- /dev/null +++ b/js/panels/presets/default-animation-presets.js @@ -0,0 +1,94 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +exports.animationPresets = { + "text": "Animation Presets Library", + "children": [{ + "text": "Border Animations", + "children": [ + { + "text": "Border Morph", + "selectorBase" : "border-morph", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "-webkit-animation": "border-morph 2s infinite" + } + }, + { + "isKeyFrameRule": true, + "keys" : [{ + "keyText": "0%", + "styles": { "border-radius": "0" } + }, { + "keyText": "50%", + "styles": { + "border-radius": "100%" + } + }, { + "keyText": "100%", + "styles": { + "border-radius": "0%" + } + }] + }] + }] + }, { + "text": "3D Animations", + "children": [ + { + "text": "Rotater", + "selectorBase" : "rotate-with-alpha-keyframes", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "-webkit-animation-name": "rotate-with-alpha-keyframes", + "-webkit-animation-duration": "5s", + "-webkit-animation-iteration-count": "infinite", + "-webkit-animation-direction": "normal", + "-webkit-animation-timing-function": "ease-out", + "-webkit-transform-origin": "200% 50%", + "-webkit-transform-style": "preserve-3d", + "-webkit-transform": "perspective(1000)", + "-webkit-animation-delay": "0s" + } + },{ + "isKeyFrameRule": true, + "keys" : [{ + "keyText": "0%", + "styles": { + "opacity": "1", + "-webkit-transform": "perspective(1000) rotateY(0deg)" + } + }, { + "keyText": "70%", + "styles": { + "opacity": "1", + "-webkit-transform": "perspective(1000) rotateY(0deg)" + } + }, { + "keyText": "85%", + "styles": { + "opacity": "0", + "-webkit-transform": "perspective(1000) rotateY(95deg)" + } + }, { + "keyText": "86%", + "styles": { + "opacity": "0", + "-webkit-transform": "perspective(1000) rotateY(-90deg)" + } + }, { + "keyText": "100%", + "styles": { + "opacity": "1", + "-webkit-transform": "perspective(1000) rotateY(0deg)" + } + }] + }] + }] + }] +}; \ No newline at end of file -- cgit v1.2.3 From a6a6f9bcc5ff92f5bb5e9275336dfaec2d8e8f4c Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 16 Mar 2012 17:56:25 -0700 Subject: Presets Panel - Change Tab labels, Add Un-3d preset --- js/panels/presets/content.reel/content.html | 6 +++--- js/panels/presets/default-transition-presets.js | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'js/panels') diff --git a/js/panels/presets/content.reel/content.html b/js/panels/presets/content.reel/content.html index f01e6435..afbdd559 100644 --- a/js/panels/presets/content.reel/content.html +++ b/js/panels/presets/content.reel/content.html @@ -62,9 +62,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
diff --git a/js/panels/presets/default-transition-presets.js b/js/panels/presets/default-transition-presets.js index 00873231..48f7c2b7 100644 --- a/js/panels/presets/default-transition-presets.js +++ b/js/panels/presets/default-transition-presets.js @@ -88,6 +88,22 @@ exports.transitionPresets = { "-webkit-transform": "rotate(180deg)" } }] + },{ + "text": "Remove 3D", + "selectorBase" : "remove-3d", + "rules" : [{ + "selectorSuffix": "", + "styles" : { + "-webkit-transition": "all 0.4s ease-in" + } + }, + { + "selectorSuffix" : ":hover", + "styles" : { + "-webkit-transform": "rotateX(0deg)", + "opacity": "1" + } + }] }] }] }; \ No newline at end of file -- cgit v1.2.3 From 41740c12e03ca1380eb80dc557faedae05e4ce1c Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Sat, 17 Mar 2012 00:06:03 -0700 Subject: Presets Panel - Fix conflict with default transition presets --- js/panels/presets/default-transition-presets.js | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'js/panels') diff --git a/js/panels/presets/default-transition-presets.js b/js/panels/presets/default-transition-presets.js index 48f7c2b7..15f4882f 100644 --- a/js/panels/presets/default-transition-presets.js +++ b/js/panels/presets/default-transition-presets.js @@ -89,6 +89,36 @@ exports.transitionPresets = { } }] },{ + "text": "Scale Up", + "selectorBase" : "scale-up", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "-webkit-transition": "-webkit-transform 0.4s ease-in" + } + }, { + "selectorSuffix" : ":hover", + "styles" : { + "-webkit-transform": "scale(1.4)" + } + }] + }, + { + "text": "Scale Down", + "selectorBase" : "scale-down", + "rules" : [{ + "selectorSuffix" : "", + "styles" : { + "-webkit-transition": "-webkit-transform 0.4s ease-in" + } + }, { + "selectorSuffix" : ":hover", + "styles" : { + "-webkit-transform": "scale(.5)" + } + }] + }, + { "text": "Remove 3D", "selectorBase" : "remove-3d", "rules" : [{ -- cgit v1.2.3 From 50ee8428d398d2a5f21f4d642642ba85d7df3e5e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 19 Mar 2012 13:51:31 -0700 Subject: Replacing old button component with montage button component in our UI. Signed-off-by: Nivesh Rajbhandari --- .../materials-library-panel.css | 8 ++--- .../materials-library-panel.html | 42 ++++++++++++++++++++-- .../materials-library-panel.js | 21 +---------- .../materials-popup.reel/materials-popup.html | 8 ++--- .../materials-popup.reel/materials-popup.js | 5 ++- .../color/colorchippopup.reel/colorchippopup.js | 1 - .../color/colorpanelpopup.reel/colorpanelpopup.js | 1 - 7 files changed, 50 insertions(+), 36 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css index 07488da1..fe88ebf6 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.css @@ -23,7 +23,7 @@ width: 97%; } -#ml_buttons button { +#ml_buttons .nj-skinned{ height: 22px; overflow: hidden; display: block; @@ -31,17 +31,17 @@ margin: 0px 1px; } -#materialsLibraryPanel-ml_add_btn { +#ml_add_btn { float: left; width: 60px; } -#materialsLibraryPanel-ml_copy_btn { +#ml_copy_btn { float: left; width: 60px; } -#materialsLibraryPanel-ml_delete_btn { +#ml_delete_btn { float: right; width: 60px; } \ No newline at end of file diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html index 6ba4ac75..fe17d0f8 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html @@ -10,6 +10,42 @@