From c066fb41ebee85bacf9b2155366b16831af41d76 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Tue, 7 Feb 2012 13:46:05 -0800
Subject: Tree Components - Added copyright comments
---
js/components/treeview/branch.reel/branch.css | 6 ++++++
js/components/treeview/branch.reel/branch.html | 5 +++++
js/components/treeview/leaf.reel/leaf.css | 6 ++++++
js/components/treeview/leaf.reel/leaf.html | 5 +++++
js/components/treeview/ninja-branch.reel/ninja-branch.css | 6 ++++++
js/components/treeview/ninja-branch.reel/ninja-branch.html | 5 +++++
js/components/treeview/ninja-leaf.reel/ninja-leaf.css | 6 ++++++
js/components/treeview/ninja-leaf.reel/ninja-leaf.html | 5 +++++
js/components/treeview/treeview.reel/treeview.css | 8 +++++---
js/components/treeview/treeview.reel/treeview.html | 5 +++++
10 files changed, 54 insertions(+), 3 deletions(-)
(limited to 'js')
diff --git a/js/components/treeview/branch.reel/branch.css b/js/components/treeview/branch.reel/branch.css
index 5998e0f0..0f4e4a87 100644
--- a/js/components/treeview/branch.reel/branch.css
+++ b/js/components/treeview/branch.reel/branch.css
@@ -1,3 +1,9 @@
+/*
+ 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.
+ */
+
.treeRoot > .branch > ul {
margin-top: 0;
}
diff --git a/js/components/treeview/branch.reel/branch.html b/js/components/treeview/branch.reel/branch.html
index 31a4cf18..b44a54c5 100644
--- a/js/components/treeview/branch.reel/branch.html
+++ b/js/components/treeview/branch.reel/branch.html
@@ -1,4 +1,9 @@
+
diff --git a/js/components/treeview/leaf.reel/leaf.css b/js/components/treeview/leaf.reel/leaf.css
index fea5a2c4..41fb02ff 100644
--- a/js/components/treeview/leaf.reel/leaf.css
+++ b/js/components/treeview/leaf.reel/leaf.css
@@ -1,3 +1,9 @@
+/*
+ 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.
+ */
+
.leaf > .leaf-label {
opacity: 0.8;
cursor: pointer;
diff --git a/js/components/treeview/leaf.reel/leaf.html b/js/components/treeview/leaf.reel/leaf.html
index 991a4323..cf0b4e40 100644
--- a/js/components/treeview/leaf.reel/leaf.html
+++ b/js/components/treeview/leaf.reel/leaf.html
@@ -1,4 +1,9 @@
+
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.css b/js/components/treeview/ninja-branch.reel/ninja-branch.css
index 698fcd21..6a458cc7 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.css
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.css
@@ -1,3 +1,9 @@
+/*
+ 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.
+ */
+
.treeRoot > .branch > ul {
margin-top: 0;
}
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.html b/js/components/treeview/ninja-branch.reel/ninja-branch.html
index 6e239855..4d557a94 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.html
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.html
@@ -1,4 +1,9 @@
+
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
index 0ad10c4c..b2f427b5 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
@@ -1,3 +1,9 @@
+/*
+ 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.
+ */
+
.treeRoot .leaf-label {
background-image: url(data:image/png;base64,iVBORw0K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DEzQzExRTFBQzQwREE3MzUxRUQxRDEwIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2BUcaK3QAAANFJREFUeNqMULEOREAQdYjvuE%2FYWlSUQqKQ7A%2FsD6n0SoVCFHpRa0SllvgFlpvzZO9OcfGSnbx9M%2FNmMpp2Dw96VVX9L%2FJ93wRrmkZJIKrZcRyK%2Bs25p5%2BU8pK4KCakMAzxL4oCJIqivu8Nw0DDu25ZFtW3ritIkiS0tGVZtm1%2F6rZtu4yr67osSyJBEJx3ybKsbVukOecU4zh2XRfKMAzTNJmYpWxgPM%2BzEIIxRrzrOs%2FzdMyVvyAxTdPxAJFzv%2BeBbz8cfN93kDzPb55ZewkwAF0Ddf6ATSsHAAAAAElFTkSuQmCC);
background-position: 3px center;
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.html b/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
index 0a8fdac0..bd8e8acd 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
@@ -1,4 +1,9 @@
+
diff --git a/js/components/treeview/treeview.reel/treeview.css b/js/components/treeview/treeview.reel/treeview.css
index 1e3965ef..018448f1 100644
--- a/js/components/treeview/treeview.reel/treeview.css
+++ b/js/components/treeview/treeview.reel/treeview.css
@@ -1,3 +1,5 @@
-
-
-{}
+/*
+ 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.
+ */
diff --git a/js/components/treeview/treeview.reel/treeview.html b/js/components/treeview/treeview.reel/treeview.html
index 3d5d75c4..d70b016c 100644
--- a/js/components/treeview/treeview.reel/treeview.html
+++ b/js/components/treeview/treeview.reel/treeview.html
@@ -1,4 +1,9 @@
+
--
cgit v1.2.3
From 65145cebdf4cde2767cbd0489ddcea5863c2ca9e Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Tue, 7 Feb 2012 14:53:46 -0800
Subject: IKNINJA-964 - Fixed inconsistent element name in PI/CSS panel.
Signed-off-by: Valerio Virgillito
---
js/tools/TagTool.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'js')
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index c527edf3..73a0ae5c 100644
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -158,15 +158,15 @@ exports.TagTool = Montage.create(DrawingTool, {
selectedTag = this.options.selectedElement;
if(selectedTag === "divTool") {
- newTag = NJUtils.makeNJElement("div", "Div", "block");
+ newTag = NJUtils.makeNJElement("div", "div", "block");
} else if(selectedTag === "imageTool") {
- newTag = NJUtils.makeNJElement("image", "Image", "image");
+ newTag = NJUtils.makeNJElement("image", "image", "image");
} else if(selectedTag === "videoTool") {
- newTag = NJUtils.makeNJElement("video", "Video", "video", {
+ newTag = NJUtils.makeNJElement("video", "video", "video", {
innerHTML: "Your browser does not support the VIDEO element."
});
} else if(selectedTag === "canvasTool") {
- newTag = NJUtils.makeNJElement("canvas", "Canvas", "canvas");
+ newTag = NJUtils.makeNJElement("canvas", "canvas", "canvas");
} else if(selectedTag === "customTool") {
newTag = document.createElement(this.options.customName.value);
newTag.Ninja = {};
--
cgit v1.2.3
From 329a859e2666716c3a1d99c6bd2679e10c81fc8d Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Tue, 7 Feb 2012 15:25:11 -0800
Subject: Added ability to toggle combobox's visibility so we can show/hide
materials comboboxes in the tool options.
Signed-off-by: Nivesh Rajbhandari
---
js/components/combobox.reel/combobox.js | 28 ++++++++++++++
.../shape-properties.reel/shape-properties.js | 43 ++++++++++++----------
2 files changed, 51 insertions(+), 20 deletions(-)
(limited to 'js')
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js
index 3200b01c..bc433f52 100644
--- a/js/components/combobox.reel/combobox.js
+++ b/js/components/combobox.reel/combobox.js
@@ -104,6 +104,26 @@ exports.Combobox = Montage.create(Component, {
}
},
+ _visible: {
+ enumerable: false,
+ value: true
+ },
+
+ visible: {
+ enumerable: true,
+ serializable: true,
+ get: function() {
+ return this._visible;
+ },
+ set: function(value) {
+ if(value !== this._visible)
+ {
+ this._visible = value;
+ this.needsDraw = true;
+ }
+ }
+ },
+
handleChange:
{
value:function(event)
@@ -158,6 +178,14 @@ exports.Combobox = Montage.create(Component, {
this.element.appendChild(optionItem);
}
this.element.disabled = !this._enabled;
+ if(this._visible)
+ {
+ this.element.style.visibility = "visible";
+ }
+ else
+ {
+ this.element.style.visibility = "hidden";
+ }
}
}
},
diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.js b/js/components/tools-properties/shape-properties.reel/shape-properties.js
index 345e361c..79567453 100644
--- a/js/components/tools-properties/shape-properties.reel/shape-properties.js
+++ b/js/components/tools-properties/shape-properties.reel/shape-properties.js
@@ -45,13 +45,16 @@ exports.ShapeProperties = Montage.create(ToolProperties, {
this._selectedSubTool = value;
this[this._selectedSubTool.properties].visible = true;
-// if(this._selectedSubTool.id === "LineTool") {
-// this._fillIcon.style["display"] = "none";
-// this._fillMaterial.style["display"] = "none";
-// } else {
-// this._fillIcon.style["display"] = "";
-// this._fillMaterial.style["display"] = "";
-// }
+ if(this._useWebGL.checked)
+ {
+ if(this._selectedSubTool.id === "LineTool") {
+ this._fillIcon.style["display"] = "none";
+ this._fillMaterial.visible = false;
+ } else {
+ this._fillIcon.style["display"] = "";
+ this._fillMaterial.visible = true;
+ }
+ }
}
}
@@ -62,23 +65,23 @@ exports.ShapeProperties = Montage.create(ToolProperties, {
if(this._useWebGL.checked)
{
this._use3D = true;
-// this._materialLabel.style["display"] = "";
-// this._strokeIcon.style["display"] = "";
-// this._strokeMaterial.style["display"] = "";
-// if(this.selectedSubTool.id !== "LineTool")
-// {
-// this._fillIcon.style["display"] = "";
-// this._fillMaterial.style["display"] = "";
-// }
+ this._materialLabel.style["display"] = "";
+ this._strokeIcon.style["display"] = "";
+ this._strokeMaterial.visible = true;
+ if(this.selectedSubTool.id !== "LineTool")
+ {
+ this._fillIcon.style["display"] = "";
+ this._fillMaterial.visible = true;
+ }
}
else
{
this._use3D = false;
-// this._materialLabel.style["display"] = "none";
-// this._strokeIcon.style["display"] = "none";
-// this._strokeMaterial.style["display"] = "none";
-// this._fillIcon.style["display"] = "none";
-// this._fillMaterial.style["display"] = "none";
+ this._materialLabel.style["display"] = "none";
+ this._strokeIcon.style["display"] = "none";
+ this._strokeMaterial.visible = false;
+ this._fillIcon.style["display"] = "none";
+ this._fillMaterial.visible = false;
}
}
}
--
cgit v1.2.3
From a930295dfebd7fe7b4db5324b2048e6e7366c6d8 Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Tue, 7 Feb 2012 16:12:23 -0800
Subject: IKNINJA-616 - Drag and drop images fix for the PI and source
Signed-off-by: Valerio Virgillito
---
js/mediators/drag-drop-mediator.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'js')
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js
index aacb228c..ede71383 100644
--- a/js/mediators/drag-drop-mediator.js
+++ b/js/mediators/drag-drop-mediator.js
@@ -122,7 +122,7 @@ exports.DragDropMediator = Montage.create(Component, {
NJUtils.makeElementModel(domElem, "SVG", "block");
} else { // treat as a regular image
- domElem = NJUtils.makeNJElement("image", "Image", "block");
+ domElem = NJUtils.makeNJElement("image", "image", "image");
domElem.src = evt2.currentTarget.result;
}
--
cgit v1.2.3
From 9a404b8a717d0aac0eabb828a4d3cdc8c9c3eed8 Mon Sep 17 00:00:00 2001
From: Valerio Virgillito
Date: Tue, 7 Feb 2012 17:42:04 -0800
Subject: IKNINJA - 1084: Fixing the custom tag.
Signed-off-by: Valerio Virgillito
---
.../tools-properties/tag-properties.reel/tag-properties.html | 6 +++---
js/tools/TagTool.js | 4 +---
2 files changed, 4 insertions(+), 6 deletions(-)
(limited to 'js')
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html
index c7588b9e..2b81bb71 100644
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.html
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html
@@ -56,9 +56,9 @@
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index 73a0ae5c..e3f49bbe 100644
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -168,9 +168,7 @@ exports.TagTool = Montage.create(DrawingTool, {
} else if(selectedTag === "canvasTool") {
newTag = NJUtils.makeNJElement("canvas", "canvas", "canvas");
} else if(selectedTag === "customTool") {
- newTag = document.createElement(this.options.customName.value);
- newTag.Ninja = {};
- newTag.Ninja.selectionType = this.options.customName.value;
+ newTag = NJUtils.makeNJElement(this.options.customName.value, this.options.customName.value, "block");
}
/* SWF Tag tool - Not used for now. Will revisit this at a later time.
else if(selectedTag === "flashTool") {
--
cgit v1.2.3
From 9154cff2ce10aae54d9a7bd37a9d8b5578b0e297 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Wed, 8 Feb 2012 10:39:17 -0800
Subject: Styles Controller - Added array of dirty stylesheets and event
dispatch when a sheet is dirtied.
---
js/controllers/styles-controller.js | 73 ++++++++++++++++++++++++++++++++++---
1 file changed, 67 insertions(+), 6 deletions(-)
(limited to 'js')
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 21024125..011caec5 100644
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -175,6 +175,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
}
stylesheet.insertRule(ruleText, index);
+
+ this.styleSheetModified(stylesheet);
rule = stylesheet.rules[index];
@@ -283,6 +285,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
sheet.deleteRule(index);
}
+ this.styleSheetModified(sheet);
+
return index;
}
},
@@ -531,6 +535,9 @@ var stylesController = exports.StylesController = Montage.create(Component, {
value : function(rule, selector) {
rule.selectorText = selector;
rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(selector);
+
+ this.styleSheetModified(rule.parentStyleSheet);
+
return rule;
}
},
@@ -780,6 +787,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
///// method to apply/test the new value
dec.setProperty(property, value, priority);
+ this.styleSheetModified(rule.parentStyleSheet);
+
///// Return browser value for value we just set
return dec.getPropertyValue(property);
}
@@ -838,7 +847,10 @@ var stylesController = exports.StylesController = Montage.create(Component, {
deleteStyle : {
value : function(rule, property) {
+ this.styleSheetModified(rule.parentStyleSheet);
+
rule.style.removeProperty(property);
+
return rule;
}
},
@@ -1070,9 +1082,10 @@ var stylesController = exports.StylesController = Montage.create(Component, {
createStylesheet : {
value: function(id, document) {
- var doc = document || this._activeDocument;
+ var doc = document || this._activeDocument._document,
+ sheetElement, sheet;
- sheet = nj.make('style', {
+ sheetElement = nj.make('style', {
type : 'text/css',
rel : 'stylesheet',
id : id || "",
@@ -1080,9 +1093,12 @@ var stylesController = exports.StylesController = Montage.create(Component, {
title : 'Temp'
});
- doc.head.appendChild(sheet);
-
- return this.getSheetFromElement(sheet, doc);
+ doc.head.appendChild(sheetElement);
+ sheet = this.getSheetFromElement(sheetElement, doc);
+
+ this.styleSheetModified(sheet);
+
+ return sheet;
}
},
@@ -1103,7 +1119,52 @@ var stylesController = exports.StylesController = Montage.create(Component, {
}
},
-
+
+ ///// Style Sheet Modified
+ ///// Method to call whenever a stylesheet change is made
+ ///// Dispatches an event, and keeps list of dirty style sheets
+
+ styleSheetModified : {
+ value: function(sheet, eventData) {
+ var sheetSearch = this.dirtyStyleSheets.filter(function(sheetObj) {
+ return sheetObj.stylesheet === sheet;
+ });
+
+ ///// If the sheet doesn't already exist in the list of modified
+ ///// sheets, dispatch dirty event and add the sheet to the list
+ if(sheetSearch.length === 0) {
+ NJevent('styleSheetDirty', eventData);
+ this.dirtyStyleSheets.push({
+ document : sheet.ownerNode.ownerDocument,
+ stylesheet : sheet
+ });
+ }
+ }
+ },
+
+ ///// Dirty Style Sheets
+ ///// List of modified style sheets
+
+ dirtyStyleSheets : {
+ value : []
+ },
+
+ ///// Clear Dirty Style Sheets
+ ///// Refreshes the list of dirty style sheets
+ ///// If optional document object is supplied, only the styles sheets
+ ///// of a particular document are cleared
+ ///// Useful to call after a "Save" or "Save All" event
+
+ clearDirtyStyleSheets : {
+ value: function(doc) {
+ if(!doc) {
+ this.dirtyStyleSheets = null;
+ this.dirtyStyleSheets = [];
+ }
+
+ }
+ },
+
/* ----------------- Utils ------------------- */
_generateRandomAlphaNumeric : {
--
cgit v1.2.3