#9521 closed defect (fixed)
[PATCH][CCLA]FontChoice plugin should include the label and button node in a <span> with a stype of whiteSpace: nowrap
Reported by: | Jared Jurkiewicz | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Editor | Version: | 1.3.1 |
Keywords: | Cc: | bill, liucougar | |
Blocked By: | Blocking: |
Description (last modified by )
FontChoice? plugin should include the label and button node in a <span> with a style of whiteSpace: nowrap
This is so that when the page/toolbar is reduced, the label goes along with the dropdown. It looks much nicer that way. Breaking between the label and the dropdown looks ugly.
Attachments (3)
Change History (12)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
Changed 12 years ago by
Attachment: | FontChoice.patch added |
---|
comment:2 Changed 12 years ago by
Summary: | FontChoice plugin should include the label and button node in a <span> with a stype of whiteSpace: nowrap → [PATCH][CCLA]FontChoice plugin should include the label and button node in a <span> with a stype of whiteSpace: nowrap |
---|
comment:3 Changed 12 years ago by
Cc: | liucougar added |
---|
Changed 12 years ago by
Attachment: | WithFix.jpg added |
---|
Same page, with fix applied. Note that the label follows the box on splitting.
comment:4 Changed 12 years ago by
Milestone: | tbd → 1.4 |
---|
comment:5 Changed 12 years ago by
Component: | General → Editor |
---|
Looks good to me. I was going to mention that this should be done for all the editor plugins w/labels, but apparently all the curent plugins w/labels are handled by that FontChoice.js.
One nitpicky thing is that you could use a single call to dojo.create() rather than calling dojo.doc.createElement(), dojo.style(), and dojo.place(). IIRC this should work (and save a few bytes in the code size):
dojo.create("span", {style: {whiteSpace: "noWrap"}}, this.button.domNode, "before");
Actually it's probably better to refactor that code to work off a template, does this work?
var span = dojo.place( "<span style='whiteSpace: nowrap'><label for="+this.button.id+">"+strings[this.command]+"</label></span>", this.button.domNode, "before"); span.appendChild(this.button.domNode);
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [18746]) Fixing minor issue with the FontChoice? plugin. Does not wrap very well. fixes #9521
FontChoice? update to keep labels with the dropdown.