From 0e1a276f19ea70009c5a649e9667861d7c346a7e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 6 Jun 2012 00:25:27 -0700 Subject: first iteration of adding serializable to ninja plus other changes to run the latest montage Signed-off-by: Valerio Virgillito --- .../materials-library-panel.js | 3 +- js/panels/Panel.reel/Panel.html | 1 - js/panels/Panel.reel/Panel.js | 8 +- js/panels/PanelContainer.reel/PanelContainer.js | 48 +++++++- js/panels/Resizer.js | 13 ++- js/panels/Splitter.js | 9 +- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 122 ++++++++++++++++++--- .../components-panel.reel/components-panel.html | 3 +- js/panels/css-panel/css-panel.reel/css-panel.js | 10 ++ js/panels/css-panel/css-style.reel/css-style.html | 2 +- .../css-style-rule.reel/css-style-rule.html | 2 +- .../rule-list-container.js | 10 ++ js/panels/css-panel/rule-list.reel/rule-list.js | 5 + .../style-declaration.reel/style-declaration.html | 6 +- .../style-sheets-view.reel/style-sheets-view.js | 13 ++- .../styles-view-container.html | 1 - .../styles-view-container.js | 19 ++++ js/panels/css-panel/styles-view-delegate.js | 6 + js/panels/presets/content.reel/content.js | 15 ++- js/panels/properties.reel/properties.html | 9 +- js/panels/properties.reel/properties.js | 19 +++- js/panels/properties.reel/section.reel/section.js | 9 +- .../sections/position-size.reel/position-size.html | 9 +- .../sections/position-size.reel/position-size.js | 41 +++++++ .../sections/three-d-view.reel/three-d-view.html | 2 - .../sections/three-d-view.reel/three-d-view.js | 55 ++++++++++ js/panels/resize-composer.js | 6 +- 27 files changed, 388 insertions(+), 58 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js index 2176c6d5..c600fd0d 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js @@ -68,7 +68,8 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { }, _materialInfo: { - enumerable:true + enumerable:true, + serializable: true }, _showMaterialPopup: { diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index f0fb1044..5937b58f 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html @@ -75,7 +75,6 @@ "prototype": "montage/ui/button.reel", "properties": { "element": {"#": "btnClose"}, - "pressedClass": "hide", "identifier": "btnClose" }, "listeners": [ diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 0c5f0b4b..fde5c962 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -13,6 +13,11 @@ exports.Panel = Montage.create(Component, { value: "Panel" }, + panelContent: { + value: null, + serializable: true + }, + _collapsed: { value: false }, @@ -46,7 +51,8 @@ exports.Panel = Montage.create(Component, { }, resizer: { - value: null + value: null, + serializable: true }, modulePath: { diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 7cb03255..5c733b92 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -12,8 +12,54 @@ var Montage = require("montage/core/core").Montage, exports.PanelContainer = Montage.create(Component, { + panelSplitter: { + value: null, + serializable: true + }, + + appModel: { + value: null, + serializable: true + }, + panelData: { - value: null + value: null, + serializable: true + }, + + panel_0: { + value: null, + serializable: true + }, + + panel_1: { + value: null, + serializable: true + }, + + panel_2: { + value: null, + serializable: true + }, + + panel_3: { + value: null, + serializable: true + }, + + panel_4: { + value: null, + serializable: true + }, + + panel_5: { + value: null, + serializable: true + }, + + panel_6: { + value: null, + serializable: true }, _currentDocument: { diff --git a/js/panels/Resizer.js b/js/panels/Resizer.js index 0252c4fb..0f4c39f7 100755 --- a/js/panels/Resizer.js +++ b/js/panels/Resizer.js @@ -54,7 +54,8 @@ exports.Resizer = Montage.create(Component, { }, set: function(val) { this._isInversed = val; - } + }, + serializable: true }, _isVertical: { @@ -67,7 +68,8 @@ exports.Resizer = Montage.create(Component, { }, set: function(val) { this._isVertical = val; - } + }, + serializable: true }, _isPanel: { @@ -79,8 +81,10 @@ exports.Resizer = Montage.create(Component, { }, set: function(value) { this._isPanel = value; - } + }, + serializable: true }, + _panel : { value: null }, @@ -92,7 +96,8 @@ exports.Resizer = Montage.create(Component, { set: function(val) { this._panel = val; if(val._element) this._panel = val._element; - } + }, + serializable: true }, height: { diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index f0fb1a45..15865acc 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -18,8 +18,7 @@ exports.Splitter = Montage.create(Component, { }, _panel: { - value: null, - enumerable:true + value: null }, panel: { @@ -28,7 +27,8 @@ exports.Splitter = Montage.create(Component, { }, set: function(value) { this._panel = value; - } + }, + serializable: true }, _resizeBar: { @@ -41,7 +41,8 @@ exports.Splitter = Montage.create(Component, { }, set: function(val) { this._resizeBar = val; - } + }, + serializable: true }, _collapsed : { diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 6e9513f2..7af88662 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -10,10 +10,98 @@ var nj = require("js/lib/NJUtils").NJUtils; var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { - hasTemplate:{ - value:true + user_layers: { + value: null, + serializable: true + }, + + track_container: { + value: null, + serializable: true + }, + + timeline_leftpane: { + value: null, + serializable: true + }, + + layer_tracks: { + value: null, + serializable: true + }, + + master_track: { + value: null, + serializable: true + }, + + time_markers: { + value: null, + serializable: true + }, + + playhead: { + value: null, + serializable: true + }, + + playheadmarker: { + value: null, + serializable: true + }, + + timetext: { + value: null, + serializable: true + }, + + timebar: { + value: null, + serializable: true + }, + + container_tracks: { + value: null, + serializable: true }, + end_hottext: { + value: null, + serializable: true + }, + + container_layers: { + value: null, + serializable: true + }, + + timeline_disabler: { + value: null, + serializable: true + }, + + checkable_relative: { + value: null, + serializable: true + }, + + checkable_absolute: { + value: null, + serializable: true + }, + + checkable_animated: { + value: null, + serializable: true + }, + + tl_configbutton: { + value: null, + serializable: true + }, + + + /* === BEGIN: Models === */ _currentDocument: { value : null @@ -90,7 +178,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - } + }, + serializable: true }, // Set to false to skip array caching array sets in current document @@ -234,7 +323,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - } + }, + serializable: true }, _selectedKeyframes:{ @@ -488,11 +578,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.currentDocument.tlArrLayers = this.arrLayers; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, @@ -500,12 +592,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { initTimelineCache: { value: function() { // Initialize the currentDocument for a new set of timeline data. - this.application.ninja.currentDocument.isTimelineInitialized = true; - this.application.ninja.currentDocument.tlArrLayers = []; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = false; - this.application.ninja.currentDocument.tlCurrentLayersSelected = false; + this.currentDocument.isTimelineInitialized = true; + this.currentDocument.tlArrLayers = []; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = false; + this.currentDocument.tlCurrentLayersSelected = false; } }, diff --git a/js/panels/components-panel.reel/components-panel.html b/js/panels/components-panel.reel/components-panel.html index 1a257957..a8d71d50 100755 --- a/js/panels/components-panel.reel/components-panel.html +++ b/js/panels/components-panel.reel/components-panel.html @@ -14,8 +14,7 @@ "owner": { "prototype": "js/panels/components-panel.reel", "properties": { - "element": {"#": "components_panel"}, - "controller": {"@": "componentsTree"} + "element": {"#": "components_panel"} } }, diff --git a/js/panels/css-panel/css-panel.reel/css-panel.js b/js/panels/css-panel/css-panel.reel/css-panel.js index 96d94b36..a2a288c9 100644 --- a/js/panels/css-panel/css-panel.reel/css-panel.js +++ b/js/panels/css-panel/css-panel.reel/css-panel.js @@ -9,6 +9,16 @@ var Montage = require("montage/core/core").Montage, exports.CssPanel = Montage.create(Component, { + styleSheetsView: { + value: null, + serializable: true + }, + + stylesViewContainer: { + value: null, + serializable: true + }, + _currentDocument: { value : null }, diff --git a/js/panels/css-panel/css-style.reel/css-style.html b/js/panels/css-panel/css-style.reel/css-style.html index 00cebf39..0f16b3d8 100644 --- a/js/panels/css-panel/css-style.reel/css-style.html +++ b/js/panels/css-panel/css-style.reel/css-style.html @@ -30,7 +30,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "checked": true }, "bindings": { - "checked" : {"<<->": "@owner.enabled" } + "checked" : {"<->": "@owner.enabled" } } }, "property": { diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html index f203b61f..9aab5649 100644 --- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html @@ -34,7 +34,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element": {"#": "rule-selector"} }, "bindings": { - "value" : {"<<->":"@owner.selector" } + "value" : {"<->":"@owner.selector" } } }, "declaration": { diff --git a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js index c7766d08..509ca565 100644 --- a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js +++ b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js @@ -8,6 +8,16 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.RuleListContainer = Montage.create(Component, { + focusDelegate: { + value: null, + serializable: true + }, + + ruleListComponent: { + value: null, + serializable: true + }, + _instanceToAdd : { value: null }, _appendElement : { value: null }, _lastDisplayedList : { value: null }, diff --git a/js/panels/css-panel/rule-list.reel/rule-list.js b/js/panels/css-panel/rule-list.reel/rule-list.js index 3e18c3bf..27d74b2f 100644 --- a/js/panels/css-panel/rule-list.reel/rule-list.js +++ b/js/panels/css-panel/rule-list.reel/rule-list.js @@ -8,6 +8,11 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.RuleList = Montage.create(Component, { + supportedRules: { + value: null, + serializable: true + }, + focusDelegate : { value: null }, ruleNodeName : { value: 'li' }, _needsScrollToBottom: { value: null }, diff --git a/js/panels/css-panel/style-declaration.reel/style-declaration.html b/js/panels/css-panel/style-declaration.reel/style-declaration.html index fad54453..4cdf0741 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.html +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.html @@ -43,9 +43,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot }, "bindings": { "source": {"<-": "@repetition.objectAtCurrentIteration" }, - "propertyText": {"<<->": "@repetition.objectAtCurrentIteration.name" }, - "valueText": {"<<->": "@repetition.objectAtCurrentIteration.value" }, - "empty": {"<<->": "@repetition.objectAtCurrentIteration.isEmpty" }, + "propertyText": {"<->": "@repetition.objectAtCurrentIteration.name" }, + "valueText": {"<->": "@repetition.objectAtCurrentIteration.value" }, + "empty": {"<->": "@repetition.objectAtCurrentIteration.isEmpty" }, "delegate": {"<-": "@owner.focusDelegate" } } } diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js index 9e3b4a49..c090a1fc 100644 --- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js @@ -8,13 +8,24 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.StyleSheetsView = Montage.create(Component, { + + toolbar: { + value: null, + serializable: true + }, + + styleSheetList: { + value: null, + serializable: true + }, + documentLoaded : { value: false }, showToolbar : { value: false }, stylesController : { value: null }, styleSheets : { value: [] }, _initView : { value: false }, _needsScroll : { value: false }, - documentNameLabel : { value: null }, + documentNameLabel : { value: null, serializable: true }, noDocumentLabelClass : { value: "no-document" }, _activeDocument: { diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.html b/js/panels/css-panel/styles-view-container.reel/styles-view-container.html index 93ac3793..150f20fa 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.html +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.html @@ -16,7 +16,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element" : {"#" : "container"}, "ruleListContainer": {"@": "ruleListContainer" }, "computedStyleView": {"@": "computedStyleView" }, - "substitution": {"@": "substitution" }, "delegate": {"@": "stylesViewDelegate"}, "toolbar": {"@": "toolbar"} } diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js index 157d99de..153e74b6 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js @@ -9,6 +9,21 @@ var Montage = require("montage/core/core").Montage, exports.StylesViewContainer = Montage.create(Component, { + ruleListContainer: { + value: null, + serializable: true + }, + + computedStyleView: { + value: null, + serializable: true + }, + + toolbar: { + value: null, + serializable: true + }, + _currentDocument: { value : null }, @@ -37,6 +52,10 @@ exports.StylesViewContainer = Montage.create(Component, { contentPanel : { value: 'rules' }, + selectionName: { + value: null, + serializable: true + }, _selectionNameLabelText : { value: null }, diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js index 87686826..a7c1f0d9 100644 --- a/js/panels/css-panel/styles-view-delegate.js +++ b/js/panels/css-panel/styles-view-delegate.js @@ -9,6 +9,12 @@ var Montage = require("montage/core/core").Montage, Keyboard = require("js/mediators/keyboard-mediator").Keyboard; exports.StylesViewDelegate = Montage.create(Component, { + + ruleListContainer: { + value: null, + serializable: true + }, + newClassPrefix : { value: "new-class" }, elementOutlineClass : { value: "nj-element-highlight" }, diff --git a/js/panels/presets/content.reel/content.js b/js/panels/presets/content.reel/content.js index 1ede7246..eba150c3 100644 --- a/js/panels/presets/content.reel/content.js +++ b/js/panels/presets/content.reel/content.js @@ -14,6 +14,10 @@ exports.content = Montage.create(Component, { contentPanel : { value: null }, + activeTabIndex: { + value: null, + serializable: true + }, templateDidLoad : { value: function() { var storedTabIndex = this.application.localStorage.getItem("presetsTabIndex"); @@ -55,7 +59,16 @@ exports.content = Montage.create(Component, { this._activeTab = tabObject; this.needsDraw = this._needsTabSwitch = true; - } + }, + serializable: true + }, + tabBar: { + value: null, + serializable: true + }, + tabs:{ + value: null, + serializable: true }, _tabToDeactivate : { value: null, diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index b9aa206b..a737bd39 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html @@ -13,24 +13,21 @@ "elementName": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementName"}, - "readOnly": true + "element": {"#": "elementName"} } }, "elementId": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementId"}, - "readOnly": false + "element": {"#": "elementId"} } }, "elementClass": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementClass"}, - "readOnly": false + "element": {"#": "elementClass"} } }, diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 934a3851..0017b54f 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -43,15 +43,28 @@ exports.Properties = Montage.create(Component, { }, elementName: { - value: null + value: null, + serializable: true }, elementId: { - value: null + value: null, + serializable: true }, elementClass: { - value: null + value: null, + serializable: true + }, + + positionSize: { + value: null, + serializable: true + }, + + threeD: { + value: null, + serializable: true }, customSections: { diff --git a/js/panels/properties.reel/section.reel/section.js b/js/panels/properties.reel/section.reel/section.js index b246c171..1873eb8c 100755 --- a/js/panels/properties.reel/section.reel/section.js +++ b/js/panels/properties.reel/section.reel/section.js @@ -10,15 +10,18 @@ var Component = require("montage/ui/component").Component; exports.Section = Montage.create(Component, { name: { - value: "Panel" + value: "Panel", + serializable: true }, slot: { - value: null + value: null, + serializable: true }, content: { - value: null + value: null, + serializable: true }, prepareForDraw: { diff --git a/js/panels/properties.reel/sections/position-size.reel/position-size.html b/js/panels/properties.reel/sections/position-size.reel/position-size.html index 5d1a805a..ccc7a159 100755 --- a/js/panels/properties.reel/sections/position-size.reel/position-size.html +++ b/js/panels/properties.reel/sections/position-size.reel/position-size.html @@ -32,7 +32,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "minValue": -10000 }, "bindings": { - "value": {"<<->": "@owner.leftPosition"} + "value": {"<->": "@owner.leftPosition"} } }, "PosY": { @@ -43,7 +43,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "minValue": -10000 }, "bindings": { - "value": {"<<->": "@owner.topPosition"} + "value": {"<->": "@owner.topPosition"} } }, @@ -53,7 +53,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element": {"#": "PosH"} }, "bindings": { - "value": {"<<->": "@owner.heightSize"} + "value": {"<->": "@owner.heightSize"} } }, @@ -65,7 +65,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "units": "px" }, "bindings": { - "value": {"<<->": "@owner.widthSize"} + "value": {"<->": "@owner.widthSize"} } }, @@ -74,7 +74,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "posBound"}, "pressedClass": "lockUp", - "preventFocus": true, "identifier": "ratio" } } diff --git a/js/panels/properties.reel/sections/position-size.reel/position-size.js b/js/panels/properties.reel/sections/position-size.reel/position-size.js index 7c24e02a..fef2b195 100755 --- a/js/panels/properties.reel/sections/position-size.reel/position-size.js +++ b/js/panels/properties.reel/sections/position-size.reel/position-size.js @@ -8,6 +8,47 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; exports.PositionSize = Montage.create(Component, { + + position: { + value: null, + serializable: true + }, + + leftLabel: { + value: null, + serializable: true + }, + + leftControl: { + value: null, + serializable: true + }, + + topLabel: { + value: null, + serializable: true + }, + + topControl: { + value: null, + serializable: true + }, + + heightControl: { + value: null, + serializable: true + }, + + widthControl: { + value: null, + serializable: true + }, + + bindButton: { + value: null, + serializable: true + }, + leftPosition: { value: 0 }, diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html index 5ef13fab..572e5a60 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html @@ -219,7 +219,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "rdioLocal"}, "label": "Local", - "value": "Local", "group": {"@": "axisModeGroup"}, "checked": true } @@ -229,7 +228,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "rdioGlobal"}, "label": "Global", - "value": "Global", "group": {"@": "axisModeGroup"} } }, diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 104d474d..70fca99b 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -51,6 +51,61 @@ exports.ThreeD = Montage.create(Component, { } }, + x3DControl: { + value: null, + serializable: true + }, + + y3DControl: { + value: null, + serializable: true + }, + + z3DControl: { + value: null, + serializable: true + }, + + x3DLabel: { + value: null, + serializable: true + }, + + y3DLabel: { + value: null, + serializable: true + }, + + z3DLabel: { + value: null, + serializable: true + }, + + xAngleControl: { + value: null, + serializable: true + }, + + yAngleControl: { + value: null, + serializable: true + }, + + zAngleControl: { + value: null, + serializable: true + }, + + axisModeGroupControl: { + value: null, + serializable: true + }, + + flattenControl: { + value: null, + serializable: true + }, + x3D: { value: 0 }, diff --git a/js/panels/resize-composer.js b/js/panels/resize-composer.js index 0d1774cd..fe09aec8 100644 --- a/js/panels/resize-composer.js +++ b/js/panels/resize-composer.js @@ -10,11 +10,13 @@ var Composer = require("montage/ui/composer/composer").Composer; exports.ResizeComposer = Montage.create(Composer, { xAxis: { - value: true + value: true, + serializable: true }, yAxis: { - value: true + value: true, + serializable: true }, enabled : { -- cgit v1.2.3 From 1b510d86ebdd3cb58162e20cb9412e93d6f473c1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 11 Jun 2012 23:47:29 -0700 Subject: adding more missing properties Signed-off-by: Valerio Virgillito --- .../css-panel/style-sheet.reel/style-sheet.js | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js index cb69d25b..8ce8da0e 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.js +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js @@ -8,6 +8,37 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.StyleSheet = Montage.create(Component, { + + nameText: { + value: null, + serializable: true + }, + + mediaInput: { + value: null, + serializable: true + }, + + editButton: { + value: null, + serializable: true + }, + + editView: { + value: null, + serializable: true + }, + + disableButton: { + value: null, + serializable: true + }, + + deleteButton: { + value: null, + serializable: true + }, + _translateDistance: { value: null }, -- cgit v1.2.3 From 844d59d85a1881525c79a1f44a35a9ea59e70e4a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:02:22 -0700 Subject: removing the serializable from the timeline repetition and fixing the panels currentDocument binding Signed-off-by: Valerio Virgillito --- js/panels/Panel.reel/Panel.js | 4 ++-- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index fde5c962..15eb4da9 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -122,8 +122,8 @@ exports.Panel = Montage.create(Component, { this._currentDocument = value; - if(typeof this.panelContent.content[0].controller._currentDocument !== "undefined") { - this.panelContent.content[0].controller.currentDocument = this._currentDocument; + if(typeof this.panelContent.content._element.controller._currentDocument !== "undefined") { + this.panelContent.content._element.controller.currentDocument = this._currentDocument; } if(!value) { diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 658ac043..36b868d0 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,8 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, - serializable: true + }, }, // Set to false to skip array caching array sets in current document @@ -346,8 +345,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - }, - serializable: true + } }, _selectedKeyframes:{ @@ -603,11 +601,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; + this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; + this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, -- cgit v1.2.3 From 5e010900b91d8634ba6caed0c97ccc1ccdec1ff7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:13:28 -0700 Subject: adding more missing properties to the timeline Signed-off-by: Valerio Virgillito --- js/panels/Timeline/Layer.reel/Layer.js | 38 ++++++++++++++++++++-- js/panels/Timeline/Style.reel/Style.js | 30 ++++++++++++++--- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 4 +-- js/panels/Timeline/Track.reel/Track.js | 5 +-- js/panels/Timeline/Tween.reel/Tween.js | 10 ++++-- 5 files changed, 74 insertions(+), 13 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 16fb0303..474190b9 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -15,8 +15,39 @@ var nj = require("js/lib/NJUtils").NJUtils; var Layer = exports.Layer = Montage.create(Component, { - hasTemplate:{ - value: true + dynamicLayerName: { + value: null, + serializable: true + }, + + dynamicLayerTag: { + value: null, + serializable: true + }, + + positionCollapser: { + value: null, + serializable: true + }, + + transformCollapser: { + value: null, + serializable: true + }, + + styleCollapser: { + value: null, + serializable: true + }, + + clickerMain: { + value: null, + serializable: true + }, + + myLabel: { + value: null, + serializable: true }, /* Begin: Models */ @@ -31,7 +62,8 @@ var Layer = exports.Layer = Montage.create(Component, { }, set: function(newVal) { this._mainCollapser = newVal; - } + }, + serializable: true }, /* Style models: the array of styles, and the repetition that uses them */ diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index c39f3a56..eed58a65 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js @@ -20,10 +20,31 @@ var Component = require("montage/ui/component").Component; var LayerStyle = exports.LayerStyle = Montage.create(Component, { - hasTemplate:{ - value: true + styleContainer: { + value: null, + serializable: true }, - + + styleHintable: { + value: null, + serializable: true + }, + + styleProperty: { + value: null, + serializable: true + }, + + valueEditorHottext: { + value: null, + serializable: true + }, + + dtextProperty: { + value: null, + serializable: true + }, + /* === BEGIN: Models === */ // isSelected: whether or not the style is selected _isSelected: { @@ -112,7 +133,8 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { }, set: function(newVal) { this._myHintable = newVal; - } + }, + serializable: true }, _myHintableValue : { value: null diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 126e6a61..7cfe07a6 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -11,8 +11,8 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { - hasTemplate:{ - value:true + tween: { + value: null }, _trackID:{ diff --git a/js/panels/Timeline/Track.reel/Track.js b/js/panels/Timeline/Track.reel/Track.js index 8c52199a..2ef760b7 100644 --- a/js/panels/Timeline/Track.reel/Track.js +++ b/js/panels/Timeline/Track.reel/Track.js @@ -10,8 +10,9 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var Track = exports.Track = Montage.create(Component, { - hasTemplate:{ - value: true + track_lane: { + value: null, + serializable: true }, _trackID:{ diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 8b6826ed..dda06028 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -9,8 +9,14 @@ var Component = require("montage/ui/component").Component; var Tween = exports.Tween = Montage.create(Component, { - hasTemplate:{ - value: true + keyframe: { + value: null, + serializable: true + }, + + tweenspan: { + value: null, + serializable: true }, _tweenData:{ -- cgit v1.2.3 From 8e5536bddb9f9f991e1d5ed363d253879a159a28 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:20:47 -0700 Subject: fixing a timeline issue Signed-off-by: Valerio Virgillito --- js/panels/Timeline/Layer.reel/Layer.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 474190b9..ed0200ae 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -15,11 +15,6 @@ var nj = require("js/lib/NJUtils").NJUtils; var Layer = exports.Layer = Montage.create(Component, { - dynamicLayerName: { - value: null, - serializable: true - }, - dynamicLayerTag: { value: null, serializable: true -- cgit v1.2.3 From 0a5ce26ee62b74261e1b00877b7e43af0e681856 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 12 Jun 2012 10:10:11 -0700 Subject: Timeline: Fix document switching under Montage v.10 --- js/panels/Timeline/Layer.reel/Layer.js | 1 + .../Timeline/TimelinePanel.reel/TimelinePanel.js | 3 +++ .../Timeline/TimelineTrack.reel/TimelineTrack.js | 28 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index ed0200ae..6b64261e 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -456,6 +456,7 @@ var Layer = exports.Layer = Montage.create(Component, { }, layerData:{ + serializable: true, get:function(){ return this._layerData; }, diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 36b868d0..65476d6b 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -783,6 +783,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var i = 0, tlArrLayersLength = this.application.ninja.currentDocument.tlArrLayers.length; + + this._ignoreNextContainerChange = true; + // We're reading from the cache, not writing to it. this._boolCacheArrays = false; for (i = 0; i < tlArrLayersLength; i++) { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 7cfe07a6..75997466 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -155,7 +155,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, set: function(newVal) { this._arrPositionTracks = newVal; - this.trackData.arrPositionTracks = newVal; + if (typeof(this.trackData) === "undefined") { + //this.createTrackData(); + } + this.trackData.arrPositionTracks = newVal; + } }, _positionTracksRepetition: { @@ -348,6 +352,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, trackData:{ + serializable: true, get:function(){ return this._trackData; }, @@ -386,6 +391,27 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.needsDraw = true; } }, + createTrackData: { + value: function() { + tempData = {}; + tempData.bypassAnimation = this.bypassAnimation; + tempData.trackID = this.layerID; + tempData.tweens = this.tweens; + tempData.animatedElement = this.animatedElement; + tempData.arrStyleTracks = this.arrStyleTracks; + tempData.isTrackAnimated = this.isTrackAnimated; + tempData.trackDuration = this.trackDuration; + tempData.animationName = this.animationName; + tempData.currentKeyframeRule = this.currentKeyframeRule; + tempData.isMainCollapsed = this.isMainCollapsed; + tempData.isPositionCollapsed = this.isPositionCollapsed; + tempData.isTransformCollapsed = this.isTransformCollapsed; + tempData.isStyleCollapsed = this.isStyleCollapsed; + tempData.trackPosition = this.trackPosition; + tempData.isVisible = this.isVisible; + this.trackData = tempData; + } + }, // Data binding observation point and trigger method _bindingPoint : { -- cgit v1.2.3 From a61713e5187e10cebf7984ced7a8443949c412b0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 10:56:47 -0700 Subject: fix a typo Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 65476d6b..cb8185e5 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,7 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, + } }, // Set to false to skip array caching array sets in current document -- cgit v1.2.3 From 964484bc244dda21c6646f4c0d400d6c137ff442 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 11:04:46 -0700 Subject: fixing a default property Signed-off-by: Valerio Virgillito --- js/panels/css-panel/style-sheet.reel/style-sheet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html index 7e27dd93..d08453fa 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.html +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html @@ -27,7 +27,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "sheet-name"}, "identifier": "nameText", - "defaultText": "Style sheet" + "defaultValue": "Style sheet" }, "bindings": { "value": {"<-": "@owner.name"} -- cgit v1.2.3 From 55e392b4ac5e45e8bf468399b3c0ddde669a15fd Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 12 Jun 2012 11:10:38 -0700 Subject: montage v10 serialization updates for timeline Signed-off-by: Jonathan Duran --- js/panels/Timeline/Collapser.js | 34 ++++++++++++- js/panels/Timeline/Layer.reel/Layer.js | 13 +++++ .../Timeline/TimelineTrack.reel/TimelineTrack.html | 8 ++-- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 55 ++++++++++++++++++++-- 4 files changed, 101 insertions(+), 9 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index 88314c8b..e5c04279 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js @@ -41,6 +41,7 @@ var Montage = require("montage/core/core").Montage, value: 0 }, contentHeight: { + serializable: true, get: function() { return this._contentHeight; }, @@ -59,6 +60,7 @@ var Montage = require("montage/core/core").Montage, value: false }, isAnimated: { + serializable: true, get: function() { return this._isAnimated; }, @@ -71,6 +73,7 @@ var Montage = require("montage/core/core").Montage, value: true }, bypassAnimation: { + serializable: true, get: function() { return this._bypassAnimation; }, @@ -102,6 +105,7 @@ var Montage = require("montage/core/core").Montage, value: "" }, isCollapsed : { + serializable: true, get: function() { return this._isCollapsed; }, @@ -110,7 +114,6 @@ var Montage = require("montage/core/core").Montage, this._isCollapsed = newVal; //this.needsDraw = true; } - } }, @@ -141,6 +144,7 @@ var Montage = require("montage/core/core").Montage, value: true }, isLabelClickable : { + serializable: true, get: function() { return this._isLabelClickable; }, @@ -149,6 +153,34 @@ var Montage = require("montage/core/core").Montage, } }, + _myContent:{ + value:null + }, + + myContent:{ + serializable:true, + get:function () { + return this._myContent; + }, + set:function (newVal) { + this._myContent = newVal; + } + }, + + _clicker:{ + value:null + }, + + clicker:{ + serializable:true, + get:function () { + return this._clicker; + }, + set:function (newVal) { + this._clicker = newVal; + } + }, + // isToggling: Bindable property. Set this (to anything) to trigger a toggle. _isToggling: { serializable: true, diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 6b64261e..a2d6444d 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -372,6 +372,19 @@ var Layer = exports.Layer = Montage.create(Component, { _layerEditable : { value: false }, + + _dynamicLayerName:{ + value:true + }, + dynamicLayerName:{ + serializable:true, + get:function () { + return this._dynamicLayerName; + }, + set:function (newVal) { + this._dynamicLayerName = newVal; + } + }, // Are the various collapsers collapsed or not _isMainCollapsed : { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 5c5a8b76..091470f3 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -16,10 +16,10 @@ "element": {"#": "track"}, "tweenRepetition" : {"@" : "tweenRepetition"}, "tween": {"@" : "tween"}, - "_mainCollapser" : {"@" : "mainCollapser"}, - "_positionCollapser" : {"@" : "positionCollapser"}, - "_transformCollapser" : {"@" : "transformCollapser"}, - "_styleCollapser" : {"@" : "styleCollapser"} + "mainCollapser" : {"@" : "mainCollapser"}, + "positionCollapser" : {"@" : "positionCollapser"}, + "transformCollapser" : {"@" : "transformCollapser"}, + "styleCollapser" : {"@" : "styleCollapser"} } }, diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 75997466..87a5e156 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -11,10 +11,6 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { - tween: { - value: null - }, - _trackID:{ value:null }, @@ -31,6 +27,21 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } } }, + + _tween:{ + value:[] + }, + + tween:{ + serializable:true, + get:function () { + return this._tween; + }, + set:function (newVal) { + this._tween = newVal; + } + }, + _isVisible:{ value: true }, @@ -337,15 +348,51 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { _positionCollapser:{ value:null }, + positionCollapser:{ + serializable:true, + get:function(){ + return this._positionCollapser; + }, + set:function(val){ + this._positionCollapser = val; + } + }, _mainCollapser:{ value:null }, + mainCollapser:{ + serializable:true, + get:function () { + return this._mainCollapser; + }, + set:function (val) { + this._mainCollapser = val; + } + }, _transformCollapser:{ value:null }, + transformCollapser:{ + serializable:true, + get:function () { + return this._transformCollapser; + }, + set:function (val) { + this._transformCollapser = val; + } + }, _styleCollapser:{ value:null }, + styleCollapser:{ + serializable:true, + get:function () { + return this._styleCollapser; + }, + set:function (val) { + this._styleCollapser = val; + } + }, _trackData:{ value: false -- cgit v1.2.3 From 471776facca730c57b0f6b8448535914df6624fd Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 11:12:32 -0700 Subject: adding more nonexistent properties Signed-off-by: Valerio Virgillito --- js/panels/css-panel/css-style.reel/css-style.js | 4 ++++ .../css-style-rule.reel/css-style-rule.html | 21 --------------------- .../css-style-rule.reel/css-style-rule.js | 5 +++++ .../custom-rows/single-row.reel/single-row.js | 4 ++++ 4 files changed, 13 insertions(+), 21 deletions(-) (limited to 'js/panels') diff --git a/js/panels/css-panel/css-style.reel/css-style.js b/js/panels/css-panel/css-style.reel/css-style.js index 84841f5b..29b3b34d 100644 --- a/js/panels/css-panel/css-style.reel/css-style.js +++ b/js/panels/css-panel/css-style.reel/css-style.js @@ -8,6 +8,10 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.CssStyle = Montage.create(Component, { + declaration: { + value: null + }, + delegate : { value: null }, disabledClass : { value: 'style-item-disabled' }, editingStyleClass : { value: 'edit-style-item' }, diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html index 9aab5649..8b0c3101 100644 --- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html @@ -56,27 +56,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot } } -
  • diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js index 54181bf3..5361e5cc 100644 --- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js @@ -8,6 +8,11 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.CssStyleRule = Montage.create(Component, { + + selectorField: { + value: null + }, + addClassNameOnChange : { value: null }, diff --git a/js/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.js b/js/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.js index b606d6b8..a11cd3f6 100755 --- a/js/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.js +++ b/js/panels/properties.reel/sections/custom-rows/single-row.reel/single-row.js @@ -8,6 +8,10 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; exports.SingleRow = Montage.create(Component, { + slot: { + value: null + }, + id: { value: null }, -- cgit v1.2.3 From 9d85430967237bd01334212de6f04db3bd222148 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 11:21:21 -0700 Subject: adding more missing properties to the serialization Signed-off-by: Valerio Virgillito --- .../Materials/materials-popup.reel/materials-popup.js | 15 +++++++++++++++ js/panels/css-panel/css-style.reel/css-style.js | 17 +++++++++++++++++ .../style-declaration.reel/style-declaration.js | 12 ++++++++++++ 3 files changed, 44 insertions(+) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index a4f758cf..0a32447e 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -12,6 +12,21 @@ var Montage = require("montage/core/core").Montage, //Exporting as MaterialsPopup exports.MaterialsPopup = Montage.create(Component, { //////////////////////////////////////////////////////////////////// + okButton: { + value: null, + serializable: true + }, + + cancelButton: { + value: null, + serializable: true + }, + + materialTitle: { + value: null, + serializable: true + }, + // Material Properties _materialName: { enumerable: true, diff --git a/js/panels/css-panel/css-style.reel/css-style.js b/js/panels/css-panel/css-style.reel/css-style.js index 29b3b34d..294d49a9 100644 --- a/js/panels/css-panel/css-style.reel/css-style.js +++ b/js/panels/css-panel/css-style.reel/css-style.js @@ -12,6 +12,23 @@ exports.CssStyle = Montage.create(Component, { value: null }, + addStyleButton: { + value: null, + serializable: true + }, + + propertyField: { + value: null + }, + + valueField: { + value: null + }, + + propertyNames: { + value: null + }, + delegate : { value: null }, disabledClass : { value: 'style-item-disabled' }, editingStyleClass : { value: 'edit-style-item' }, diff --git a/js/panels/css-panel/style-declaration.reel/style-declaration.js b/js/panels/css-panel/style-declaration.reel/style-declaration.js index 6187989b..b9205ba7 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.js +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.js @@ -9,6 +9,18 @@ var Montage = require("montage/core/core").Montage, ShorthandProps = require("js/panels/CSSPanel/css-shorthand-map"); exports.StyleDeclaration = Montage.create(Component, { + arrayController: { + value: null + }, + + styleComponent: { + value: null + }, + + repetition: { + value: null + }, + cssText : { value: null }, focusDelegate : { value: null }, needsSort : { value: null }, -- cgit v1.2.3 From 16d859a284805cd8bf14187fd421b6a14e6d8912 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 15:12:27 -0700 Subject: remove serializable from custom section Signed-off-by: Valerio Virgillito --- js/panels/Splitter.js | 3 +-- js/panels/properties.reel/section.reel/section.js | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 15865acc..c6d46911 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -27,8 +27,7 @@ exports.Splitter = Montage.create(Component, { }, set: function(value) { this._panel = value; - }, - serializable: true + } }, _resizeBar: { diff --git a/js/panels/properties.reel/section.reel/section.js b/js/panels/properties.reel/section.reel/section.js index 1873eb8c..310bc48f 100755 --- a/js/panels/properties.reel/section.reel/section.js +++ b/js/panels/properties.reel/section.reel/section.js @@ -10,18 +10,16 @@ var Component = require("montage/ui/component").Component; exports.Section = Montage.create(Component, { name: { - value: "Panel", - serializable: true + value: "Panel" + }, slot: { - value: null, - serializable: true + value: null }, content: { - value: null, - serializable: true + value: null }, prepareForDraw: { -- cgit v1.2.3 From 509092ff335f74517a413cfb2deeb9d2de20f8e3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 12 Jun 2012 15:13:09 -0700 Subject: Fixing properties panel to support px and % for body and other elements. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties.reel/properties.js | 70 +++++++++++++++++----- .../properties.reel/sections/custom.reel/custom.js | 6 ++ .../sections/position-size.reel/position-size.html | 16 ++++- .../sections/position-size.reel/position-size.js | 40 +++++++++---- 4 files changed, 103 insertions(+), 29 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index cc99ca6c..33e66515 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -143,6 +143,7 @@ exports.Properties = Montage.create(Component, { handleElementChange: { value: function(event) { + var l, t, h, w, lvu, tvu, hvu, wvu; // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update if(event.detail.source && event.detail.source !== "pi") { var el = this.application.ninja.currentDocument.model.documentRoot; @@ -151,10 +152,24 @@ exports.Properties = Montage.create(Component, { } // TODO - This should only update the properties that were changed. - this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); - this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); - this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); - this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); + l = ElementsMediator.getProperty(el, "left"); + t = ElementsMediator.getProperty(el, "top"); + lvu = document.application.njUtils.getValueAndUnits(l); + tvu = document.application.njUtils.getValueAndUnits(t); + this.positionSize.leftUnits = lvu[1]; + this.positionSize.leftPosition = lvu[0]; + this.positionSize.topUnits = tvu[1]; + this.positionSize.topPosition = tvu[0]; + + h = ElementsMediator.getProperty(el, "height"); + w = ElementsMediator.getProperty(el, "width"); + hvu = document.application.njUtils.getValueAndUnits(h); + wvu = document.application.njUtils.getValueAndUnits(w); + + this.positionSize.heightUnits = hvu[1] || "px"; // canvas (and shapes) don't have units. + this.positionSize.heightSize = hvu[0]; + this.positionSize.widthUnits = wvu[1] || "px"; + this.positionSize.widthSize = wvu[0]; if(this.threeD.inGlobalMode) { this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); @@ -209,7 +224,8 @@ exports.Properties = Montage.create(Component, { displayElementProperties: { value: function (el) { - var customPI, currentValue, isRoot = this.application.ninja.selectionController.isDocument; + var customPI, currentValue, isRoot = this.application.ninja.selectionController.isDocument, + l, t, h, w, lvu, tvu, hvu, wvu;