Ticket #3058 (closed enhancement: fixed)

Opened 14 months ago

Last modified 10 months ago

Make passing of HTML elements into template more elegant

Reported by: peller Owned by: peller
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc:

Description

For example, templates must have name=${name} to carry over the name attribute from the original DOM node into the template, and a bogus default value must be supplied. For the textbox widgets, we have stuff like maxLength="999999". If maxLength isn't specified, it would be simpler not to define it.

Bill says we ought to be able to programmatically, in postCreate() just copy attributes to the focusNode instead of putting them in the template.

Attachments

3058.patch (26.3 kB) - added by peller 12 months ago.
still needs more testing
3058.2.patch (26.9 kB) - added by peller 12 months ago.
combine style and class attributes; remove special cases from _Templated to do this. still needs more testing

Change History

Changed 12 months ago by peller

  • status changed from new to assigned

Changed 12 months ago by peller

still needs more testing

Changed 12 months ago by peller

combine style and class attributes; remove special cases from _Templated to do this. still needs more testing

Changed 12 months ago by peller

  • priority changed from normal to high
  • milestone changed from 0.9 to 1.0

Checked in changes to dijit/branches/attributemap. Deferring checkin until after 0.9 release.

Changed 10 months ago by peller

(In [10468]) Deal with IE quirks for style, class. Refs #3058

Changed 10 months ago by peller

(In [10469]) Deal with IE quirks for style, class. Refs #3058

Changed 10 months ago by peller

(In [10476]) Rename styleNode to stateNode, put style mapping for textarea in genericMap Refs #3058

Changed 10 months ago by peller

(In [10477]) raise attributemap branch from [10455] to [10476]. Refs #3058

Changed 10 months ago by peller

(In [10485]) rename genericMap to attributeMap. Refs #3058

Changed 10 months ago by peller

(In [10525]) raise attributemap branch revs from [10478] to [10524]. Refs #3058

Changed 10 months ago by peller

(In [10527]) Merge attributemap branch. Still need to move style/class quirks from _Widget to parser, fix Slider,TextArea?,ComboBox?,FilteringSelect? widgets. Refs #3058

Changed 10 months ago by peller

(In [10529]) TextArea?->Textarea, handle null values from parser. Refs #3058

Changed 10 months ago by peller

(In [10530]) Handle "class" and "style" attributes according to IE quirks. Refs #3058

Changed 10 months ago by peller

(In [10531]) fix typo, update attributeMap comment. Refs #3058

Changed 10 months ago by peller

(In [10532]) rename node to mapNode, fix cssText access. Refs #3058

Changed 10 months ago by bill

(In [10534]) Remove some unnecessary code that messing up diji.place()'s detection of the size of the dropdown (messing up Combobox drop down sizing). Refs #3058.

Changed 10 months ago by bill

(In [10541]) Simplify attributeMap code and remove disabling for everything except Textarea (which causes an exception on Safari). Refs #3058.

Changed 10 months ago by bill

(In [10543]) When the number of elements in the drop down list changes, height wasn't being adjusted. Need to set drop down list to it's natural height so that dijit.popup can suggest a proper height setting. Fixes #4482, refs #3058.

Changed 10 months ago by peller

(In [10550]) Copy over native HTML FORM attributes. Refs #3058. Fixes #4392

Changed 10 months ago by peller

(In [10552]) Tweak the class/style attribute handling to avoid setting cssText with += when it's null. Also, use dojo.addClass to avoid dups. Refs #3058

Changed 10 months ago by peller

(In [10553]) remove redundant attribute settings in template. Refs #3058

Changed 10 months ago by peller

  • status changed from assigned to closed
  • resolution set to fixed

#4519 remains, everything else seems ok.

Changed 10 months ago by peller

(In [10568]) Don't copy over values with type of Date with attributeMap. Strings are most predictable, but let's stick to primitive types. Fixes #4497, refs #3058.

Note: See TracTickets for help on using tickets.