aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcss/ninja.css2
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.css9
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.js24
-rwxr-xr-xscss/imports/scss/_toolbar.scss1
4 files changed, 33 insertions, 3 deletions
diff --git a/css/ninja.css b/css/ninja.css
index 8e1666c2..82cda121 100755
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -845,7 +845,7 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
845 845
846.toolsList hr { border: 0px; border-top: 1px solid #232323; border-bottom: 1px solid #3A3A3A; margin: 2px; width: 100%; } 846.toolsList hr { border: 0px; border-top: 1px solid #232323; border-bottom: 1px solid #3A3A3A; margin: 2px; width: 100%; }
847 847
848.toolbutton { width: 29px; height: 29px; background-position: center center; background-repeat: no-repeat; border-radius: 3px; opacity: 1; margin-bottom: 2px; -webkit-transform: scale(0.8); -webkit-transition: 0.15s all cubic-bezier(0.44, 0.19, 0, 0.99); } 848.toolbutton { width: 29px; height: 29px; background-position: center center; background-repeat: no-repeat; border-radius: 3px; opacity: 1; margin-bottom: 2px; -webkit-transform: scale(0.8); }
849 849
850.toolbutton:hover, .toolbutton.active { box-shadow: 0px 0px 2px 2px #999; -webkit-transform: scale(1); opacity: 1; } 850.toolbutton:hover, .toolbutton.active { box-shadow: 0px 0px 2px 2px #999; -webkit-transform: scale(1); opacity: 1; }
851 851
diff --git a/js/panels/css-panel/css-style.reel/css-style.css b/js/panels/css-panel/css-style.reel/css-style.css
index d6ca76d1..928c2a33 100644
--- a/js/panels/css-panel/css-style.reel/css-style.css
+++ b/js/panels/css-panel/css-style.reel/css-style.css
@@ -138,6 +138,15 @@ POSSIBILITY OF SUCH DAMAGE.
138.style-item .hintable-hint { 138.style-item .hintable-hint {
139 color: #bdbdbd; 139 color: #bdbdbd;
140} 140}
141.edit-value {
142 white-space: normal;
143}
144.edit-value dt {
145 margin-right: -7px;
146}
147.edit-value dd {
148 margin-left: 7px;
149}
141 150
142/* ------------------------ 151/* ------------------------
143 Empty Style (Add Style) 152 Empty Style (Add Style)
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 dee94e75..e0055dc6 100644
--- a/js/panels/css-panel/css-style.reel/css-style.js
+++ b/js/panels/css-panel/css-style.reel/css-style.js
@@ -57,6 +57,7 @@ exports.CssStyle = Montage.create(Component, {
57 delegate : { value: null }, 57 delegate : { value: null },
58 disabledClass : { value: 'style-item-disabled' }, 58 disabledClass : { value: 'style-item-disabled' },
59 editingStyleClass : { value: 'edit-style-item' }, 59 editingStyleClass : { value: 'edit-style-item' },
60 editingValueClass : { value: 'edit-value' },
60 editNewEmptyClass : { value: 'edit-empty-style' }, 61 editNewEmptyClass : { value: 'edit-empty-style' },
61 invalidStyleClass : { value: "style-item-invalid" }, 62 invalidStyleClass : { value: "style-item-invalid" },
62 emptyStyleClass : { value: "empty-css-style" }, 63 emptyStyleClass : { value: "empty-css-style" },
@@ -181,6 +182,18 @@ exports.CssStyle = Montage.create(Component, {
181 } 182 }
182 }, 183 },
183 184
185 _editingValue : { value: null },
186 editingValue : {
187 get : function() { return this._editingValue; },
188 set : function(value) {
189 if(value === this._editingValue) { return; }
190
191 this._editingValue = value;
192
193 this.needsDraw = true;
194 }
195 },
196
184 remove : { 197 remove : {
185 value: function() { 198 value: function() {
186 var branchController = this.parentComponent.parentComponent.contentController; 199 var branchController = this.parentComponent.parentComponent.contentController;
@@ -257,6 +270,9 @@ exports.CssStyle = Montage.create(Component, {
257 if(this.empty) { 270 if(this.empty) {
258 this.editingNewStyle = true; 271 this.editingNewStyle = true;
259 } 272 }
273
274 this.editingValue = (this.valueField.element === e._currentTarget.element);
275
260 } 276 }
261 }, 277 },
262 278
@@ -300,7 +316,7 @@ exports.CssStyle = Montage.create(Component, {
300 return false; 316 return false;
301 } 317 }
302 318
303 this.editing = false; 319 this.editing = this.editingValue = false;
304 320
305 if(this.empty && !this.dirty && !fieldsClicked.bind(this)()) { 321 if(this.empty && !this.dirty && !fieldsClicked.bind(this)()) {
306 ///// Show add button 322 ///// Show add button
@@ -457,6 +473,12 @@ exports.CssStyle = Montage.create(Component, {
457 } else { 473 } else {
458 this._element.classList.remove(this.editingStyleClass); 474 this._element.classList.remove(this.editingStyleClass);
459 } 475 }
476
477 if(this.editingValue) {
478 this._element.classList.add(this.editingValueClass);
479 } else {
480 this._element.classList.remove(this.editingValueClass);
481 }
460 } 482 }
461 } 483 }
462}); 484});
diff --git a/scss/imports/scss/_toolbar.scss b/scss/imports/scss/_toolbar.scss
index 98b43535..54ea2aee 100755
--- a/scss/imports/scss/_toolbar.scss
+++ b/scss/imports/scss/_toolbar.scss
@@ -65,7 +65,6 @@
65 opacity: 1; 65 opacity: 1;
66 margin-bottom: 2px; 66 margin-bottom: 2px;
67 -webkit-transform: scale(0.8); 67 -webkit-transform: scale(0.8);
68 -webkit-transition: 0.15s all cubic-bezier(.44,.19,0,.99);
69} 68}
70 69
71.toolbutton:hover, .toolbutton.active { 70.toolbutton:hover, .toolbutton.active {