Merge lp:~thumper/lazr-js/multi-line-edit-class into lp:lazr-js

Proposed by Tim Penhey
Status: Merged
Merged at revision: not available
Proposed branch: lp:~thumper/lazr-js/multi-line-edit-class
Merge into: lp:lazr-js
Diff against target: 140 lines
2 files modified
examples/inlineeditor/index.html (+2/-2)
src/inlineedit/assets/skins/sam/editor-skin.css (+16/-16)
To merge this branch: bzr merge lp:~thumper/lazr-js/multi-line-edit-class
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Francis J. Lacoste Pending
Review via email: mp+13753@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Make the styling of the multi-line editor not depend on the id of the div, but rather a class.

Example was updated to use the class. Old id kept there until LP migrates.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine.

review: Approve
Revision history for this message
Tim Penhey (thumper) wrote :

On Fri, 23 Oct 2009 15:33:10 Michael Hudson wrote:
> Review: Approve
> Looks fine.
>
  reviewer flacoste

Should we just replace the id based css rules?

I have another branch which adds the multiline editor to commit messages that
adds the lazr-multiline-editor class to the bugs page too.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

To me the ID rules shouldn't exist. This prevents the widget from being used more than once on the page. The widget ID should be controlled by the client, so it doesn't make sense to have any ID based rules in the lazr-js CSS.

123. By Tim Penhey

Remove the old id based css rules.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/inlineeditor/index.html'
--- examples/inlineeditor/index.html 2009-08-10 11:11:51 +0000
+++ examples/inlineeditor/index.html 2009-10-28 00:31:09 +0000
@@ -95,7 +95,7 @@
95 }, 'input[name=accept_empty]');95 }, 'input[name=accept_empty]');
9696
97 var multiline_text = new Y.EditableText({97 var multiline_text = new Y.EditableText({
98 contentBox: '#edit-description',98 contentBox: '#edit-test-description',
99 multiline: true,99 multiline: true,
100 buttons: 'top'100 buttons: 'top'
101 });101 });
@@ -141,7 +141,7 @@
141</div>141</div>
142142
143<h2>Multi-line</h2>143<h2>Multi-line</h2>
144<div id="edit-description">144<div id="edit-test-description" class="lazr-multiline-edit">
145 <div id="multi-text-editor">145 <div id="multi-text-editor">
146 <div class="clearfix">146 <div class="clearfix">
147 <div class="edit-controls">147 <div class="edit-controls">
148148
=== modified file 'src/inlineedit/assets/skins/sam/editor-skin.css'
--- src/inlineedit/assets/skins/sam/editor-skin.css 2009-08-10 18:06:51 +0000
+++ src/inlineedit/assets/skins/sam/editor-skin.css 2009-10-28 00:31:09 +0000
@@ -80,7 +80,7 @@
80}80}
8181
82/* Multi-line editor styles. */82/* Multi-line editor styles. */
83#edit-description {83.lazr-multiline-edit {
84 font-family: sans-serif;84 font-family: sans-serif;
85 font-size: 12px;85 font-size: 12px;
86 margin-bottom: 25px;86 margin-bottom: 25px;
@@ -88,7 +88,7 @@
88 width: 600px;88 width: 600px;
89}89}
9090
91#edit-description h2 {91.lazr-multiline-edit h2 {
92 font-family: sans-serif;92 font-family: sans-serif;
93 font-size: 12px;93 font-size: 12px;
94 font-weight: bold;94 font-weight: bold;
@@ -100,7 +100,7 @@
100 bottom: 5px;100 bottom: 5px;
101}101}
102102
103#edit-description .edit-controls {103.lazr-multiline-edit .edit-controls {
104 background-position: right top;104 background-position: right top;
105 background-image: url('label-top-white.png');105 background-image: url('label-top-white.png');
106 background-repeat: no-repeat;106 background-repeat: no-repeat;
@@ -116,29 +116,29 @@
116 z-index: 1;116 z-index: 1;
117}117}
118118
119#edit-description .edit-controls-hover,119.lazr-multiline-edit .edit-controls-hover,
120.yui-editable_text-edit_mode #edit-description .edit-controls {120.yui-editable_text-edit_mode .lazr-multiline-edit .edit-controls {
121 background-position: right top;121 background-position: right top;
122 background-image: url('label-top.png');122 background-image: url('label-top.png');
123 background-repeat: no-repeat;123 background-repeat: no-repeat;
124}124}
125125
126#edit-description .bg-top-label {126.lazr-multiline-edit .bg-top-label {
127 margin-right: -5px;127 margin-right: -5px;
128}128}
129129
130#edit-description .yui-editable_text-text {130.lazr-multiline-edit .yui-editable_text-text {
131 border-top: 1px solid #d6d6d6;131 border-top: 1px solid #d6d6d6;
132 padding:1px 20px 1px 20px;132 padding:1px 20px 1px 20px;
133}133}
134134
135#edit-description .yui-editable_text-text-hover {135.lazr-multiline-edit .yui-editable_text-text-hover {
136 padding:1px 19px 0 19px;136 padding:1px 19px 0 19px;
137 background-color: #fafafa !important;137 background-color: #fafafa !important;
138 border: 1px solid #d6d6d6;138 border: 1px solid #d6d6d6;
139}139}
140140
141#edit-description .yui-ieditor-input {141.lazr-multiline-edit .yui-ieditor-input {
142 padding:11px 3px 10px 18px;142 padding:11px 3px 10px 18px;
143 border:0;143 border:0;
144 border: 1px solid #d6d6d6;144 border: 1px solid #d6d6d6;
@@ -150,28 +150,28 @@
150 top: -6px;150 top: -6px;
151}151}
152152
153.yui-editable_text-edit_mode #edit-description .yui-ieditor-input {153.yui-editable_text-edit_mode .lazr-multiline-edit .yui-ieditor-input {
154 background-color: #fafafa;154 background-color: #fafafa;
155}155}
156156
157#edit-description .yui-ieditor-multiline {157.lazr-multiline-edit .yui-ieditor-multiline {
158 border-top: 1px solid #d6d6d6;158 border-top: 1px solid #d6d6d6;
159}159}
160160
161#edit-description .yui-ieditor-content {161.lazr-multiline-edit .yui-ieditor-content {
162 top: -29px;162 top: -29px;
163 left: -5px;163 left: -5px;
164 width:600px;164 width:600px;
165}165}
166166
167#edit-description .yui-ieditor-submit_button {167.lazr-multiline-edit .yui-ieditor-submit_button {
168 position: relative;168 position: relative;
169 top: 1px;169 top: 1px;
170 left: -7px;170 left: -7px;
171 z-index: 2;171 z-index: 2;
172}172}
173173
174#edit-description .yui-ieditor-cancel_button {174.lazr-multiline-edit .yui-ieditor-cancel_button {
175 position: relative;175 position: relative;
176 top: 1px;176 top: 1px;
177 left: 16px;177 left: 16px;
@@ -179,7 +179,7 @@
179 z-index: 2;179 z-index: 2;
180}180}
181181
182#edit-description .loading {182.lazr-multiline-edit .loading {
183 position: relative;183 position: relative;
184 top: 4px;184 top: 4px;
185 left: -8px;185 left: -8px;
@@ -188,7 +188,7 @@
188 z-index: 2;188 z-index: 2;
189}189}
190190
191#edit-description .edit {191.lazr-multiline-edit .edit {
192 position: relative;192 position: relative;
193 top: 2px;193 top: 2px;
194 background: url('edit.png') top left no-repeat;194 background: url('edit.png') top left no-repeat;

Subscribers

People subscribed via source and target branches