#4098 closed defect (fixed)
InlineEditBox: change API to have one widget and defer creation of edit widget
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
InlineEditBox? currently works by specifying a nested edit widget:
<div dojoType=dijit.form.InlineEditBox> <input dojoType=dijit.form.ValidationTextBox value="3"> </div>
This has two disadvantages:
- Tedious to create such a widget in markup or programmatically (since there are two widgets involved)
- Performance issues since the editor widget is created on page load rather than on the fly (when you click to edit). This prevents InlineEditBox? from being used for table cells or tree cells (or any place there would be hundreds of said InlineEditBox? widgets).
Make this work like 0.4 where there's just a single widget:
<div dojoType=InlineEditBox> hello world </div>
and if you need a custom editor then specify it as a parameter
<div dojoType=InlineEditBox editor=dijit.form.NumberTextBox editorParams="{required: true}"> 3 </div>
Note that the developer is responsible for inserting the localized value into the markup (in the cases where the canonical value is different than the localized value), and then the edit widget needs an interface to be initialized from a localized value.
See related bug #4097. Fixing this will fix that bug too.
Change History (18)
comment:1 Changed 13 years ago by
Owner: | changed from haysmark to Douglas Hays |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Summary: | InlineEditBox: investigate changing API to have one widget and defer creation of edit widget → InlineEditBox: change API to have one widget and defer creation of edit widget |
comment:4 Changed 13 years ago by
Owner: | changed from Douglas Hays to bill |
---|
InlineEditBox? being redesigned by bill
comment:5 Changed 13 years ago by
(In [10631]) Start refactor of InlineEditBox? to keep original srcNode, and create edit widget on demand. Code not working (well) yet. Refs #4097, #4098.
comment:6 Changed 13 years ago by
(In [10824]) Continue InlineEditBox? work. Since we can't compute the width of a <span> on IE, since it's display:inline, I had to put a width="..." parameter for the widget. Refs #4097, #4098.
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
comment:9 Changed 13 years ago by
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:11 Changed 13 years ago by
comment:12 Changed 13 years ago by
comment:13 Changed 13 years ago by
comment:15 Changed 13 years ago by
(In [10969]) Deprecate dijit.form.InlineEditBox? and switch existing tests to use dijit.InlineEditBox?. Refs #4098
comment:16 Changed 13 years ago by
(In [11798]) Remove deprecated dijit.form.InlineEditBox? code (deprecated in 1.0 release, in favor of dijit.InlineEditBox?, for removal in 1.1.) Refs #4098.
(In [10354]) Better testcase for how I want InlineEditBox? to work.
you specify the width of an <input>... ie, a width that is unrelated to the width of the current value.
browser's builtin rules for <p>, <h3>, etc. (All such style info must appear in the non-editing version of the text and the edit version of the tet.)
unwanted line breaks (see #4098 for possible solution).
Refs #4097, #4098, #4167.