From 4900f2e6e346df18b1b5a2ac89da5019644ac98a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 9 Apr 2012 16:47:35 -0700 Subject: adding a history panel Signed-off-by: Valerio Virgillito --- js/panels/Panel.reel/Panel.js | 5 +- js/panels/PanelContainer.reel/PanelContainer.html | 11 ++- .../history-item.reel/history-item.css | 0 .../history-item.reel/history-item.html | 29 ++++++ .../history-item.reel/history-item.js | 32 +++++++ js/panels/history-panel/history.reel/history.css | 34 +++++++ js/panels/history-panel/history.reel/history.html | 106 +++++++++++++++++++++ js/panels/history-panel/history.reel/history.js | 26 +++++ 8 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 js/panels/history-panel/history-item.reel/history-item.css create mode 100644 js/panels/history-panel/history-item.reel/history-item.html create mode 100644 js/panels/history-panel/history-item.reel/history-item.js create mode 100644 js/panels/history-panel/history.reel/history.css create mode 100644 js/panels/history-panel/history.reel/history.html create mode 100644 js/panels/history-panel/history.reel/history.js (limited to 'js/panels') diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 33f9b3a7..613bef4b 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -125,7 +125,10 @@ exports.Panel = Montage.create(Component, { require.async(this.modulePath) .then(function(panelContent) { var componentRequire = panelContent[that.moduleName]; - that.panelContent.content = componentRequire.create(); + var componentInstance = componentRequire.create(); + + componentInstance.ownerComponent = that.ownerComponent; + that.panelContent.content = componentInstance; }) .end(); } diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index 251e86e4..d3673105 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html @@ -62,6 +62,13 @@ } }, + "panel_6": { + "prototype": "js/panels/Panel.reel", + "properties": { + "element": {"#": "panel_6"} + } + }, + "owner": { "module": "js/panels/PanelContainer.reel", "name": "PanelContainer", @@ -74,7 +81,8 @@ "panel_2": {"@": "panel_2"}, "panel_3": {"@": "panel_3"}, "panel_4": {"@": "panel_4"}, - "panel_5": {"@": "panel_5"} + "panel_5": {"@": "panel_5"}, + "panel_6": {"@": "panel_6"} }, "listeners": [ { @@ -104,6 +112,7 @@
+
diff --git a/js/panels/history-panel/history-item.reel/history-item.css b/js/panels/history-panel/history-item.reel/history-item.css new file mode 100644 index 00000000..e69de29b diff --git a/js/panels/history-panel/history-item.reel/history-item.html b/js/panels/history-panel/history-item.reel/history-item.html new file mode 100644 index 00000000..2db27846 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + +
  • + + + \ No newline at end of file diff --git a/js/panels/history-panel/history-item.reel/history-item.js b/js/panels/history-panel/history-item.reel/history-item.js new file mode 100644 index 00000000..8a6e7654 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.js @@ -0,0 +1,32 @@ +/* +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; + +exports.HistoryItem = Montage.create(Component, { + _title: { + value: null + }, + + title: { + get: function() { + return this._title; + }, + set: function(value) { + if(value !== this._title) { + this._title = value; + this.needsDraw = true; + } + } + }, + + draw: { + value: function() { + this.element.innerHTML = this.title; + } + } +}); \ No newline at end of file diff --git a/js/panels/history-panel/history.reel/history.css b/js/panels/history-panel/history.reel/history.css new file mode 100644 index 00000000..44c4c74b --- /dev/null +++ b/js/panels/history-panel/history.reel/history.css @@ -0,0 +1,34 @@ +.history_panel { + height: 100%; + overflow: hidden; +} + +.scroller { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.history_panel ul { + padding: 0; + margin: 0; +} + +.history_panel li { + padding: 10px 15px; + list-style: none; +} + +.undo_list li { + background-color: hsl(0, 0%, 94%); + border-top: 1px solid hsl(0, 0%, 100%); + border-bottom: 1px solid hsl(0, 0%, 85%); +} + +.redo_list li { + background-color: hsl(199, 71%, 79%); + border-top: 1px solid hsl(0, 0%, 100%); + border-bottom: 1px solid hsl(0, 0%, 85%); +} \ No newline at end of file diff --git a/js/panels/history-panel/history.reel/history.html b/js/panels/history-panel/history.reel/history.html new file mode 100644 index 00000000..f2e3c6ae --- /dev/null +++ b/js/panels/history-panel/history.reel/history.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + +
    +
    +
      +
    • +
    +
      +
    • +
    +
    +
    + + + \ No newline at end of file diff --git a/js/panels/history-panel/history.reel/history.js b/js/panels/history-panel/history.reel/history.js new file mode 100644 index 00000000..241286fb --- /dev/null +++ b/js/panels/history-panel/history.reel/history.js @@ -0,0 +1,26 @@ +/* +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; + +exports.History = Montage.create(Component, { + historyList: { + value: null + }, + + didCreate: { + value: function() { + } + }, + + templateDidLoad: { + value: function() { + } + } + + +}); \ No newline at end of file -- cgit v1.2.3 From 45ae62302b175774c1e1af82ff144ecb2fe770d7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 9 Apr 2012 22:58:10 -0700 Subject: setAttribute added to the undo/redo Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 625e3eb6..d9dca538 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -113,13 +113,14 @@ exports.Properties = Montage.create(Component, { } if(this.application.ninja.selectedElements.length) { - ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); +// ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); + ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi"); } else { ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); } } else if(event.target.id === "elementClass") { if(this.application.ninja.selectedElements.length) { - ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); + ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); } else { ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); } -- cgit v1.2.3 From e8b4eebc94db3d2dbddb3e493025c426eaeb63e4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 13 Apr 2012 14:22:53 -0700 Subject: collapsing the history panel by default and commenting out the undo for the 3d properties Signed-off-by: Valerio Virgillito --- js/panels/PanelContainer.reel/PanelContainer.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/panels') diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index c40bbc21..8d1d6a5e 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -45,6 +45,7 @@ exports.PanelContainer = Montage.create(Component, { this['panel_'+i].minHeight= p.minHeight; this['panel_'+i].maxHeight = p.maxHeight; this['panel_'+i].flexible = p.flexible; + this['panel_'+i].collapsed = p.collapsed; this['panel_'+i].modulePath = p.modulePath; this['panel_'+i].moduleName = p.moduleName; this['panel_'+i].disabled = true; -- cgit v1.2.3 From 7372dd9aa32e404b971efb78c354a9cdfc86c212 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 16 Apr 2012 11:20:24 -0700 Subject: Drag and drop of images and components should not add 3d values by default. Signed-off-by: Nivesh Rajbhandari --- js/panels/components-panel.reel/components-panel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'js/panels') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index acbf702f..cfacd461 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -286,9 +286,7 @@ exports.ComponentsPanel = Montage.create(Component, { var styles = { 'position': 'absolute', 'left' : that.dragPosition[0] + 'px', - 'top' : that.dragPosition[1] + 'px', - '-webkit-transform-style' : 'preserve-3d', - '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' + 'top' : that.dragPosition[1] + 'px' }; var defaultStyles = component.defaultStyles; -- cgit v1.2.3 From 2e04af953463643791f6362bd8ef4c6ba190abfa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 13:48:51 -0700 Subject: Squashed commit of the following: commit 2054551bfb01a0f4ca2e138b9d724835462d45cd Merge: 765c2da 616a853 Author: Valerio Virgillito Date: Wed Apr 18 13:48:21 2012 -0700 Merge branch 'refs/heads/master' into integration commit 765c2da8e1aa03550caf42b2bd5f367555ad2843 Author: Valerio Virgillito Date: Tue Apr 17 15:29:41 2012 -0700 updating the picasa carousel Signed-off-by: Valerio Virgillito commit 9484f1c82b81e27edf2dc0a1bcc1fa3b12077406 Merge: d27f2df cacb4a2 Author: Valerio Virgillito Date: Tue Apr 17 15:03:50 2012 -0700 Merge branch 'refs/heads/master' into integration commit d27f2df4d846064444263d7832d213535962abe7 Author: Valerio Virgillito Date: Wed Apr 11 10:39:36 2012 -0700 integrating new picasa carousel component Signed-off-by: Valerio Virgillito commit 6f98384c9ecbc8abe55ccfe1fc25a0c7ce22c493 Author: Valerio Virgillito Date: Tue Apr 10 14:33:00 2012 -0700 fixed the text area case issue Text area was renamed from TextArea to Textarea Signed-off-by: Valerio Virgillito commit 1e83e26652266136802bc7af930379c1ecd631a6 Author: Valerio Virgillito Date: Mon Apr 9 22:10:45 2012 -0700 integrating montage v0.8 into ninja. Signed-off-by: Valerio Virgillito Signed-off-by: Valerio Virgillito --- js/panels/components-panel.reel/components-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index cfacd461..5d3c0a73 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -367,7 +367,7 @@ exports.ComponentsPanel = Montage.create(Component, { break; case "textarea": el = NJUtils.makeNJElement("textarea", "TextArea", "component"); - el.elementModel.pi = "TextAreaPi"; + el.elementModel.pi = "TextareaPi"; break; case "toggleButton": el = NJUtils.makeNJElement("button", "Toggle Button", "component"); -- cgit v1.2.3 From c58dc96130c7eb5d964af53e9ad6e80bba5e647f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 17:24:40 -0700 Subject: initial stage web template Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index d9dca538..7fab1eb0 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,6 +187,7 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { + /* var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From 03b8a87824550feff7835904b7c1b56f5c74cf04 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 19 Apr 2012 13:32:07 -0700 Subject: cleanup unused code. Signed-off-by: Valerio Virgillito --- js/panels/components-panel.reel/components-panel.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index 5d3c0a73..79eac37b 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -8,7 +8,6 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component, NJUtils = require("js/lib/NJUtils").NJUtils; -var treeControlModule = require("js/components/tree.reel"); var PIData = require("js/data/pi/pi-data").PiData; String.prototype.capitalizeFirstChar = function() { -- cgit v1.2.3 From c62273126004f057de40ce91ecda5606643f4c92 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:37:47 -0700 Subject: reverting old template to current working status. New template work. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 7fab1eb0..f57982b6 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,7 +187,7 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { - /* + var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From 3dfd75a1d7948ef369188e1ca23c0f044c0d17a1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:43:31 -0700 Subject: more backup fixes for the old stage Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index f57982b6..d9dca538 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -187,7 +187,6 @@ exports.Properties = Montage.create(Component, { displayStageProperties: { value: function() { - var stage = this.application.ninja.currentDocument.documentRoot; //this is test code please remove this.elementName.value = "Stage"; -- cgit v1.2.3 From 3f8f224170937d498d3a03c706494408a6b4bf1d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 23 Apr 2012 13:47:35 -0700 Subject: Temporary fix for the PI and Stage when opening the new template. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index d9dca538..b21014c1 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -73,8 +73,9 @@ exports.Properties = Montage.create(Component, { this.eventManager.addEventListener( "elementChange", this, false); - // For now always assume that the stage is selected by default - if(this.application.ninja.selectedElements.length === 0) { + // For now always assume that the stage is selected by default when opening the old template + // TODO: Remove marker for old template: NINJA-STAGE-REWORK + if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") { this.displayStageProperties(); } } -- cgit v1.2.3