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
1=== modified file 'examples/inlineeditor/index.html'
2--- examples/inlineeditor/index.html 2009-08-10 11:11:51 +0000
3+++ examples/inlineeditor/index.html 2009-10-28 00:31:09 +0000
4@@ -95,7 +95,7 @@
5 }, 'input[name=accept_empty]');
6
7 var multiline_text = new Y.EditableText({
8- contentBox: '#edit-description',
9+ contentBox: '#edit-test-description',
10 multiline: true,
11 buttons: 'top'
12 });
13@@ -141,7 +141,7 @@
14 </div>
15
16 <h2>Multi-line</h2>
17-<div id="edit-description">
18+<div id="edit-test-description" class="lazr-multiline-edit">
19 <div id="multi-text-editor">
20 <div class="clearfix">
21 <div class="edit-controls">
22
23=== modified file 'src/inlineedit/assets/skins/sam/editor-skin.css'
24--- src/inlineedit/assets/skins/sam/editor-skin.css 2009-08-10 18:06:51 +0000
25+++ src/inlineedit/assets/skins/sam/editor-skin.css 2009-10-28 00:31:09 +0000
26@@ -80,7 +80,7 @@
27 }
28
29 /* Multi-line editor styles. */
30-#edit-description {
31+.lazr-multiline-edit {
32 font-family: sans-serif;
33 font-size: 12px;
34 margin-bottom: 25px;
35@@ -88,7 +88,7 @@
36 width: 600px;
37 }
38
39-#edit-description h2 {
40+.lazr-multiline-edit h2 {
41 font-family: sans-serif;
42 font-size: 12px;
43 font-weight: bold;
44@@ -100,7 +100,7 @@
45 bottom: 5px;
46 }
47
48-#edit-description .edit-controls {
49+.lazr-multiline-edit .edit-controls {
50 background-position: right top;
51 background-image: url('label-top-white.png');
52 background-repeat: no-repeat;
53@@ -116,29 +116,29 @@
54 z-index: 1;
55 }
56
57-#edit-description .edit-controls-hover,
58-.yui-editable_text-edit_mode #edit-description .edit-controls {
59+.lazr-multiline-edit .edit-controls-hover,
60+.yui-editable_text-edit_mode .lazr-multiline-edit .edit-controls {
61 background-position: right top;
62 background-image: url('label-top.png');
63 background-repeat: no-repeat;
64 }
65
66-#edit-description .bg-top-label {
67+.lazr-multiline-edit .bg-top-label {
68 margin-right: -5px;
69 }
70
71-#edit-description .yui-editable_text-text {
72+.lazr-multiline-edit .yui-editable_text-text {
73 border-top: 1px solid #d6d6d6;
74 padding:1px 20px 1px 20px;
75 }
76
77-#edit-description .yui-editable_text-text-hover {
78+.lazr-multiline-edit .yui-editable_text-text-hover {
79 padding:1px 19px 0 19px;
80 background-color: #fafafa !important;
81 border: 1px solid #d6d6d6;
82 }
83
84-#edit-description .yui-ieditor-input {
85+.lazr-multiline-edit .yui-ieditor-input {
86 padding:11px 3px 10px 18px;
87 border:0;
88 border: 1px solid #d6d6d6;
89@@ -150,28 +150,28 @@
90 top: -6px;
91 }
92
93-.yui-editable_text-edit_mode #edit-description .yui-ieditor-input {
94+.yui-editable_text-edit_mode .lazr-multiline-edit .yui-ieditor-input {
95 background-color: #fafafa;
96 }
97
98-#edit-description .yui-ieditor-multiline {
99+.lazr-multiline-edit .yui-ieditor-multiline {
100 border-top: 1px solid #d6d6d6;
101 }
102
103-#edit-description .yui-ieditor-content {
104+.lazr-multiline-edit .yui-ieditor-content {
105 top: -29px;
106 left: -5px;
107 width:600px;
108 }
109
110-#edit-description .yui-ieditor-submit_button {
111+.lazr-multiline-edit .yui-ieditor-submit_button {
112 position: relative;
113 top: 1px;
114 left: -7px;
115 z-index: 2;
116 }
117
118-#edit-description .yui-ieditor-cancel_button {
119+.lazr-multiline-edit .yui-ieditor-cancel_button {
120 position: relative;
121 top: 1px;
122 left: 16px;
123@@ -179,7 +179,7 @@
124 z-index: 2;
125 }
126
127-#edit-description .loading {
128+.lazr-multiline-edit .loading {
129 position: relative;
130 top: 4px;
131 left: -8px;
132@@ -188,7 +188,7 @@
133 z-index: 2;
134 }
135
136-#edit-description .edit {
137+.lazr-multiline-edit .edit {
138 position: relative;
139 top: 2px;
140 background: url('edit.png') top left no-repeat;

Subscribers

People subscribed via source and target branches