aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-09 17:11:38 -0800
committerArmen Kesablyan2012-02-09 17:11:38 -0800
commitce963d45cdf2703d2d4eedfa94394b178f86e0f1 (patch)
tree13bc9d7acdac3777c48fce1de2ad4b8957d0886c
parent10f0ad4c15f090b2d0d50d11e4c7aaf291e9eb0e (diff)
downloadninja-ce963d45cdf2703d2d4eedfa94394b178f86e0f1.tar.gz
More Text Tool Updates
-rw-r--r--_scss/imports/scss/_Base.scss2
-rwxr-xr-x_scss/ninja.scss1
-rw-r--r--css/ninja.css6
-rw-r--r--js/components/button.reel/button.js2
-rw-r--r--js/components/tools-properties/text-properties.reel/text-properties.css28
-rw-r--r--js/components/tools-properties/text-properties.reel/text-properties.html204
-rw-r--r--js/components/tools-properties/text-properties.reel/text-properties.js162
-rw-r--r--js/tools/TextTool.js2
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.js166
9 files changed, 358 insertions, 215 deletions
diff --git a/_scss/imports/scss/_Base.scss b/_scss/imports/scss/_Base.scss
index 8a743174..a800610d 100644
--- a/_scss/imports/scss/_Base.scss
+++ b/_scss/imports/scss/_Base.scss
@@ -134,7 +134,7 @@ button.nj-skinned {
134 cursor: pointer; 134 cursor: pointer;
135 text-shadow: 1px 1px 1px $color-app-shadow 135 text-shadow: 1px 1px 1px $color-app-shadow
136} 136}
137button.nj-skinned:active { 137button.nj-skinned:active, button.nj-skinned.active {
138 background-image: -webkit-linear-gradient(top, $color-formgrad-bottom 0%, $color-formgrad-top 100%); 138 background-image: -webkit-linear-gradient(top, $color-formgrad-bottom 0%, $color-formgrad-top 100%);
139} 139}
140button.nj-skinned:hover { 140button.nj-skinned:hover {
diff --git a/_scss/ninja.scss b/_scss/ninja.scss
index 11c04afb..4cc7301f 100755
--- a/_scss/ninja.scss
+++ b/_scss/ninja.scss
@@ -36,6 +36,7 @@ body {
36 36
37} 37}
38 38
39
39// Codemirror 40// Codemirror
40//@import "imports/codemirror/_codemirror"; 41//@import "imports/codemirror/_codemirror";
41//@import "imports/codemirror/_javascript"; 42//@import "imports/codemirror/_javascript";
diff --git a/css/ninja.css b/css/ninja.css
index 8ce60a10..3776b1d5 100644
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -36,7 +36,7 @@ input[type="search"].nj-skinned::-webkit-search-cancel-button:after { content: "
36 36
37button.nj-skinned { font-size: 9px; cursor: pointer; display: block; border: 0px; margin: 0px; padding: 4px; border: 1px #313131 solid; background-color: #474747; background-image: -webkit-linear-gradient(top, #505050 0%, #3c3c3c 100%); border-radius: 4px; color: white; text-transform: uppercase; cursor: pointer; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); } 37button.nj-skinned { font-size: 9px; cursor: pointer; display: block; border: 0px; margin: 0px; padding: 4px; border: 1px #313131 solid; background-color: #474747; background-image: -webkit-linear-gradient(top, #505050 0%, #3c3c3c 100%); border-radius: 4px; color: white; text-transform: uppercase; cursor: pointer; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); }
38 38
39button.nj-skinned:active { background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); } 39button.nj-skinned:active, button.nj-skinned.active { background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); }
40 40
41button.nj-skinned:hover { -webkit-box-shadow: 0px 0px 3px #b4b4b4; } 41button.nj-skinned:hover { -webkit-box-shadow: 0px 0px 3px #b4b4b4; }
42 42
@@ -212,6 +212,10 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co
212 212
213#mainContent .CodeMirror-scroll { height: 100%; overflow: scroll; overflow-x: auto; overflow-y: auto; } 213#mainContent .CodeMirror-scroll { height: 100%; overflow: scroll; overflow-x: auto; overflow-y: auto; }
214 214
215.montage-editor-frame { position: absolute; z-index: 7; top: 0; left: 0; display: none; -webkit-user-select: initial; }
216
217.montage-editor { padding: 0px; word-wrap: normal; }
218
215.panelContainer { margin: 0px; padding: 0px 0px; position: relative; overflow: auto; } 219.panelContainer { margin: 0px; padding: 0px 0px; position: relative; overflow: auto; }
216 220
217.panelDisclosureIcon { background-image: url("../images/panels/panelDisclosureIcon.png"); background-repeat: no-repeat; width: 16px; height: 16px; float: left; -webkit-transition-property: rotate; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: linear; padding-right: 2px; } 221.panelDisclosureIcon { background-image: url("../images/panels/panelDisclosureIcon.png"); background-repeat: no-repeat; width: 16px; height: 16px; float: left; -webkit-transition-property: rotate; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: linear; padding-right: 2px; }
diff --git a/js/components/button.reel/button.js b/js/components/button.reel/button.js
index ce5ac1af..2d26c8b4 100644
--- a/js/components/button.reel/button.js
+++ b/js/components/button.reel/button.js
@@ -179,7 +179,7 @@ var Button = exports.Button = Montage.create(Component, {
179 value: function() { 179 value: function() {
180 if(this.isToggleButton) 180 if(this.isToggleButton)
181 { 181 {
182 if(this._value) 182 if(this._value === true)
183 { 183 {
184 this.element.classList.remove(this.offState); 184 this.element.classList.remove(this.offState);
185 this.element.classList.add(this.onState); 185 this.element.classList.add(this.onState);
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.css b/js/components/tools-properties/text-properties.reel/text-properties.css
index 2eb608d3..6aa61812 100644
--- a/js/components/tools-properties/text-properties.reel/text-properties.css
+++ b/js/components/tools-properties/text-properties.reel/text-properties.css
@@ -5,31 +5,33 @@
5 </copyright> */ 5 </copyright> */
6 6
7.optionsTextTool { 7.optionsTextTool {
8 display: -webkit-box; 8 padding: 6px;
9 -webkit-box-orient:horizontal;
10 -webkit-box-align: stretch;
11 padding: 5px;
12} 9}
13 10
14 11.optionsTextTool .btnGroup {
15.optionsTextTool > * { 12 padding: 0px 8px;
16 -webkit-box-flex:0;
17} 13}
18 14
19.optionsTextTool .button { 15.optionsTextTool > *, .optionsTextTool .btnGroup > * {
20 width: auto; 16 float:left;
21
22} 17}
23 18
24.optionsTextTool .hottextunit { 19.optionsTextTool button {
25 padding-top:5px; 20 width: auto;
21 padding: 4px 8px !important;
22 margin-left:4px;
26} 23}
27 24
28.optionsTextTool .label, .optionsTextTool .hottextunit { 25.optionsTextTool .label, .optionsTextTool .hottextunit {
29 float:none;
30 font-size:11px; 26 font-size:11px;
31} 27}
32 28
33.optionsTextTool .fontSelection { 29.optionsTextTool .fontSelection {
34 width:100px; 30 width:100px;
31}
32
33.optionsTextTool .fontColor {
34 width: 20px;
35 height: 18px;
36 margin: 2px 6px;
35} \ No newline at end of file 37} \ No newline at end of file
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.html b/js/components/tools-properties/text-properties.reel/text-properties.html
index 14123b12..7ded1236 100644
--- a/js/components/tools-properties/text-properties.reel/text-properties.html
+++ b/js/components/tools-properties/text-properties.reel/text-properties.html
@@ -77,41 +77,30 @@
77 }, 77 },
78 78
79 "fontSize": { 79 "fontSize": {
80 "module": "js/components/hottextunit.reel", 80 "module": "js/components/combobox.reel",
81 "name": "HotTextUnit", 81 "name": "Combobox",
82 "properties": { 82 "properties": {
83 "element": {"#": "fontSize"}, 83 "element": {"#": "fontSize"},
84 "value": 12,
85 "identifier": "fontSize" 84 "identifier": "fontSize"
86 }, 85 },
87 "listeners": [ 86 "listeners": [
88 { 87 {
89 "type": "change", 88 "type": "change",
90 "listener": {"@": "owner"} 89 "listener": {"@": "owner"}
91 },
92 {
93 "type": "changing",
94 "listener": {"@": "owner"}
95 } 90 }
96 ] 91 ]
97 92
98 }, 93 },
99 94
100 "fontColor": {
101 "module" : "js/components/ui/color-chip.reel",
102 "name" : "ColorChip",
103 "properties" : {
104 "element" : {"#": "fontColor"},
105 "mode": "chip"
106 }
107 },
108 "btnBold": { 95 "btnBold": {
109 "module": "js/components/button.reel", 96 "module": "montage/ui/toggle-button.reel",
110 "name": "Button", 97 "name": "ToggleButton",
111 "properties": { 98 "properties": {
112 "element": {"#": "btnBold"}, 99 "element": {"#": "btnBold"},
113 "_isToggleButton": true, 100 "pressedClass": "active",
114 "identifier": "btnBold" 101 "preventFocus": true,
102 "identifier": "btnBold",
103 "label": "B"
115 }, 104 },
116 "listeners": [ 105 "listeners": [
117 { 106 {
@@ -121,12 +110,14 @@
121 ] 110 ]
122 }, 111 },
123 "btnItalic": { 112 "btnItalic": {
124 "module": "js/components/button.reel", 113 "module": "montage/ui/toggle-button.reel",
125 "name": "Button", 114 "name": "ToggleButton",
126 "properties": { 115 "properties": {
127 "element": {"#": "btnItalic"}, 116 "element": {"#": "btnItalic"},
128 "_isToggleButton": true, 117 "pressedClass": "active",
129 "identifier": "btnItalic" 118 "preventFocus": true,
119 "identifier": "btnItalic",
120 "label": "I"