aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanya Sen2012-06-26 16:07:00 -0700
committerAnanya Sen2012-06-26 16:07:00 -0700
commit1d5372534d11c9c1b818ba5e7d67498c731e9ac6 (patch)
treebc09c9f08ac2faa955995a91a78337276a81eb77
parent3391a8e6fd5df0d464edaffd98c2b3fde23acf5a (diff)
parent46174eb0ce93d660c8d2e9276fbdc4f9a03f056a (diff)
downloadninja-1d5372534d11c9c1b818ba5e7d67498c731e9ac6.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into bugfix-master
Conflicts: js/ninja.reel/ninja.html Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
-rwxr-xr-xcss/ninja.css16
-rw-r--r--images/cursors/binding.pngbin0 -> 1359 bytes
-rw-r--r--images/panels/horizontal-resize.pngbin0 -> 1031 bytes
-rw-r--r--images/tools/binding.pngbin0 -> 1140 bytes
-rw-r--r--js/components/editable.reel/editable.js45
-rw-r--r--js/components/hintable.reel/hintable.js47
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html11
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.html12
-rw-r--r--js/components/toolbar.reel/toolbar.html3
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.css17
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.html35
-rwxr-xr-xjs/components/tools-properties/binding-properties.reel/binding-properties.js25
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.html9
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.js160
-rw-r--r--js/controllers/objects-controller.js246
-rw-r--r--js/data/panels-data.js38
-rwxr-xr-xjs/data/tools-data.js15
-rwxr-xr-xjs/document/document-html.js3
-rwxr-xr-xjs/document/models/base.js13
-rwxr-xr-xjs/document/models/html.js3
-rw-r--r--js/document/templates/app/main.js4
-rwxr-xr-xjs/document/views/design.js8
-rwxr-xr-xjs/ninja.reel/ninja.html9
-rwxr-xr-xjs/ninja.reel/ninja.js25
-rwxr-xr-xjs/panels/Panel.reel/Panel.js10
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html17
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js29
-rw-r--r--js/panels/binding-panel.reel/binding-panel.css27
-rw-r--r--js/panels/binding-panel.reel/binding-panel.html80
-rw-r--r--js/panels/binding-panel.reel/binding-panel.js126
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.css80
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.html101
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.js118
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.css128
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.html192
-rw-r--r--js/panels/binding/edit-binding-view.reel/edit-binding-view.js359
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js36
-rw-r--r--js/panels/objects/object.reel/object.css59
-rw-r--r--js/panels/objects/object.reel/object.html44
-rw-r--r--js/panels/objects/object.reel/object.js115
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.css20
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.html58
-rw-r--r--js/panels/objects/objects-panel.reel/objects-panel.js38
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.css5
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.html39
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js57
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css104
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.html78
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js314
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.css38
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html74
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js440
-rw-r--r--js/stage/objects-tray.reel/objects-tray.css41
-rw-r--r--js/stage/objects-tray.reel/objects-tray.html66
-rw-r--r--js/stage/objects-tray.reel/objects-tray.js140
-rwxr-xr-xjs/stage/stage.reel/stage.css13
-rwxr-xr-xjs/stage/stage.reel/stage.html12
-rwxr-xr-xjs/stage/stage.reel/stage.js12
-rwxr-xr-xjs/tools/TextTool.js48
-rw-r--r--js/tools/bindingTool.js102
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.css112
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.html27
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.js1716
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-resizer.js349
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-sanitizer.js132
-rw-r--r--node_modules/labs/rich-text-editor.reel/shortcut-manager.js237
-rwxr-xr-xnode_modules/tools/template/template-creator.js2
-rwxr-xr-xscss/imports/scss/_MainWindow.scss4
-rwxr-xr-xscss/imports/scss/_PanelUI.scss4
-rwxr-xr-xscss/imports/scss/_Workspace.scss25
-rwxr-xr-xscss/imports/scss/_toolbar.scss3
-rwxr-xr-xscss/ninja.scss1
72 files changed, 3798 insertions, 2778 deletions
diff --git a/css/ninja.css b/css/ninja.css
index d98aa513..b71ab79c 100755
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -118,9 +118,9 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co
118 118
119#sceneBar { height: 70px; background-color: #474747; } 119#sceneBar { height: 70px; background-color: #474747; }
120 120
121#mainContainer .rulerTop { display: none; background: gray url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; border-right: 11px solid black; } 121#mainContainer .rulerTop { display: none; background: gray url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; }
122 122
123.rulerLeft { display: none; background: gray url("../images/temp/ruler-left.png"); width: 16px; border-bottom: 11px solid black; } 123.rulerLeft { display: none; background: gray url("../images/temp/ruler-left.png"); width: 16px; }
124 124
125#stateBar { height: 20px; background-color: #282828; margin-bottom: 0px; } 125#stateBar { height: 20px; background-color: #282828; margin-bottom: 0px; }
126 126
@@ -600,7 +600,7 @@ button.panel-button { -webkit-appearance: none; font-size: 9px; color: white; ba
600 600
601.panels .panel { min-height: 25px; -webkit-box-flex: 0; display: -webkit-box; -webkit-box-orient: vertical; background: #282828; height: 200px; padding: 0px 2px; -webkit-box-sizing: border-box; } 601.panels .panel { min-height: 25px; -webkit-box-flex: 0; display: -webkit-box; -webkit-box-orient: vertical; background: #282828; height: 200px; padding: 0px 2px; -webkit-box-sizing: border-box; }
602 602
603.panels .panel .panelBody { -webkit-box-flex: 1; -webkit-box-sizing: border-box; -webkit-box-orient: vertical; -webkit-box-align: stretch; position: relative; overflow: auto; height: 200px; } 603.panels .panel .panelBody { -webkit-box-flex: 1; -webkit-box-sizing: border-box; -webkit-box-orient: vertical; -webkit-box-align: stretch; position: relative; }
604 604
605.panel .panelBodyContent { -webkit-box-sizing: border-box; -webkit-box-align: stretch; position: absolute; height: 100%; width: 100%; } 605.panel .panelBodyContent { -webkit-box-sizing: border-box; -webkit-box-align: stretch; position: absolute; height: 100%; width: 100%; }
606 606
@@ -871,6 +871,8 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
871 871
872.InkBottleTool { background-image: url("../images/tools/Tool-FillColor.png"); } 872.InkBottleTool { background-image: url("../images/tools/Tool-FillColor.png"); }
873 873
874.bindingTool { background-image: url("../images/tools/binding.png"); }
875
874.blueDiv { background: blue; opacity: 0.2; } 876.blueDiv { background: blue; opacity: 0.2; }
875 877
876::-webkit-scrollbar { width: 11px; height: 11px; } 878::-webkit-scrollbar { width: 11px; height: 11px; }
@@ -933,4 +935,12 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
933 935
934.montage-invisible { display: none; } 936.montage-invisible { display: none; }
935 937
938.panels .panel { display: none; }
939
940.panels .panel.ws-binding { display: none; -webkit-box-flex-group: 2; }
941
942body.ws-binding .panel.ws-binding { display: -webkit-box; }
943
944body.ws-default .panel.default { display: -webkit-box; -webkit-box-flex-group: 1; }
945
936/*77*/ 946/*77*/
diff --git a/images/cursors/binding.png b/images/cursors/binding.png
new file mode 100644
index 00000000..16e84574
--- /dev/null
+++ b/images/cursors/binding.png
Binary files differ
diff --git a/images/panels/horizontal-resize.png b/images/panels/horizontal-resize.png
new file mode 100644
index 00000000..7b2cf8a5
--- /dev/null
+++ b/images/panels/horizontal-resize.png
Binary files differ
diff --git a/images/tools/binding.png b/images/tools/binding.png
new file mode 100644
index 00000000..33545ee1
--- /dev/null
+++ b/images/tools/binding.png
Binary files differ
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index 103e418f..88b93b2c 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -93,12 +93,43 @@ exports.Editable = Montage.create(Component, {
93 } 93 }
94 } 94 }
95 }, 95 },
96
97 _value : { value: null },
96 value : { 98 value : {
97 get: function() { 99 get : function() { return this._value; },
98 return this._element.textContent; 100 set : function(value) {
99 }, 101 if(value === this._value) { return; }
100 set: function(str) { 102
101 this._element.textContent = str; 103 var node = this._getFirstTextNode();
104 node.textContent = value;
105
106 this._value = value;
107 }
108 },
109 _getFirstTextNode : {
110 value : function(el) {
111 ///// optional el argument specified container element
112 var e = el || this._element,
113 nodes = e.childNodes, node;
114
115 if(nodes.length) {
116 for(var i=0; i<nodes.length; i++) {
117 if(nodes[i].nodeType === 3) {
118 ///// found the first text node
119 node = nodes[i];
120 break;
121 }
122 }
123 }
124
125 ///// Text node not found
126 if(!node) {
127 node = document.createTextNode('');
128 e.appendChild(node);
129 }
130
131
132<