From 969137ba4520103348a496ac9b99063dc4ec8f96 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 5 Apr 2012 10:38:57 -0700 Subject: Timeline: Bug fix for IKNINJA-1086, "CSS Style Suggestion stops working" --- js/components/hintable.reel/hintable.js | 8 +++++ js/panels/Timeline/Layer.reel/css/Layer.css | 47 ++++++++++++++------------- js/panels/Timeline/Layer.reel/scss/Layer.scss | 3 +- 3 files changed, 34 insertions(+), 24 deletions(-) (limited to 'js') diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index cbfe2d9b..6e3b2aaf 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js @@ -157,6 +157,14 @@ exports.Hintable = Montage.create(Editable, { this._super(arguments); + /// Remove the phantom "
" element that is generated when + /// content editable element is empty + this._children(this._element, function(item) { + return item.nodeName === 'BR'; + }).forEach(function(item) { + this._element.removeChild(item); + }, this); + if(k === 39) { selection = window.getSelection(); text = selection.baseNode.textContent; diff --git a/js/panels/Timeline/Layer.reel/css/Layer.css b/js/panels/Timeline/Layer.reel/css/Layer.css index 1aae8d67..2ea1e0f6 100644 --- a/js/panels/Timeline/Layer.reel/css/Layer.css +++ b/js/panels/Timeline/Layer.reel/css/Layer.css @@ -139,12 +139,13 @@ font-size: 11px; } -/* line 132, ../scss/Layer.scss */ -.label-layer .collapsible-label br { +/* line 133, ../scss/Layer.scss */ +.label-layer .collapsible-label br, +.content-style .editable br { display: none; } -/* line 136, ../scss/Layer.scss */ +/* line 137, ../scss/Layer.scss */ .collapsible-clicker { position: absolute; width: 10px; @@ -157,23 +158,23 @@ background-repeat: no-repeat; } -/* line 147, ../scss/Layer.scss */ +/* line 148, ../scss/Layer.scss */ .collapsible-clicker.collapsible-collapsed { background-image: url(../images/icon-collapsed.png); } -/* line 150, ../scss/Layer.scss */ +/* line 151, ../scss/Layer.scss */ .collapsible-content .collapsible-clicker { left: 12px; } -/* line 153, ../scss/Layer.scss */ +/* line 154, ../scss/Layer.scss */ .container-layer .collapsible-content.collapsible-collapsed { height: 0px; overflow: hidden; } -/* line 159, ../scss/Layer.scss */ +/* line 160, ../scss/Layer.scss */ .label-layer .cssbutton, .label-style .cssbutton { width: 14px; @@ -183,21 +184,21 @@ background-repeat: no-repeat; } -/* line 166, ../scss/Layer.scss */ +/* line 167, ../scss/Layer.scss */ .label-layer .button-lock { background-image: url(../images/icon-lock.png); top: 3px; right: 27px; } -/* line 171, ../scss/Layer.scss */ +/* line 172, ../scss/Layer.scss */ .label-layer .button-visible { background-image: url(../images/icon-eye.png); top: 3px; right: 7px; } -/* line 176, ../scss/Layer.scss */ +/* line 177, ../scss/Layer.scss */ .label-style .button-add { background-image: url(../images/icon-plus.png); width: 15px; @@ -206,7 +207,7 @@ right: 11px; } -/* line 183, ../scss/Layer.scss */ +/* line 184, ../scss/Layer.scss */ .label-style .button-delete { background-image: url(../images/icon-minus.png); width: 15px; @@ -215,17 +216,17 @@ right: 31px; } -/* line 190, ../scss/Layer.scss */ +/* line 191, ../scss/Layer.scss */ .collapsible-content .layout-table { width: 99.9%; } -/* line 193, ../scss/Layer.scss */ +/* line 194, ../scss/Layer.scss */ .content-layer .collapsible-content { padding-left: 30px; } -/* line 196, ../scss/Layer.scss */ +/* line 197, ../scss/Layer.scss */ .collapsible-content .collapsible-content .layout-table .layout-row .layout-cell { width: 40%; height: 20px; @@ -234,24 +235,24 @@ text-align: left; } -/* line 203, ../scss/Layer.scss */ +/* line 204, ../scss/Layer.scss */ .collapsible-content .layout-table:first-child { border-top: 1px solid #505050; } -/* line 207, ../scss/Layer.scss */ +/* line 208, ../scss/Layer.scss */ .collapsible-content .hottextunit { width: auto; } -/* line 210, ../scss/Layer.scss */ +/* line 211, ../scss/Layer.scss */ .collapsible-transition { -webkit-transition-property: height; -webkit-transition-duration: 200ms; -webkit-transition-timing-function: ease-in; } -/* line 218, ../scss/Layer.scss */ +/* line 219, ../scss/Layer.scss */ .editable2 { height: 20px; background-color: #242424 !important; @@ -263,29 +264,29 @@ text-overflow: clip; } -/* line 228, ../scss/Layer.scss */ +/* line 229, ../scss/Layer.scss */ .editable2 br { display: inline; } -/* line 232, ../scss/Layer.scss */ +/* line 233, ../scss/Layer.scss */ .label-style .disabled { cursor: default; } /* styles elements */ -/* line 237, ../scss/Layer.scss */ +/* line 238, ../scss/Layer.scss */ .content-style .item-template { display: none; } -/* line 240, ../scss/Layer.scss */ +/* line 241, ../scss/Layer.scss */ .content-style .layout-row.selected .layout-cell { background-color: #b2b2b2; color: #242424; } -/* line 244, ../scss/Layer.scss */ +/* line 245, ../scss/Layer.scss */ .style-row { height: 20px; } diff --git a/js/panels/Timeline/Layer.reel/scss/Layer.scss b/js/panels/Timeline/Layer.reel/scss/Layer.scss index 80b88d4f..df3f93d5 100644 --- a/js/panels/Timeline/Layer.reel/scss/Layer.scss +++ b/js/panels/Timeline/Layer.reel/scss/Layer.scss @@ -129,7 +129,8 @@ -.label-layer .collapsible-label br { +.label-layer .collapsible-label br, +.content-style .editable br { display: none; } -- cgit v1.2.3