Opened 11 years ago

Closed 11 years ago

#5603 closed enhancement (fixed)

[patch][cla] add an .instantiate method to NodeList

Reported by: dante Owned by: dante
Priority: high Milestone: 1.2
Component: Core Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by dante)

it would be cool to do bulk-widget creation programatically.

dojo.require('dijit.form.Button');
dojo.addOnLoad(function(){
    dojo.query(".buttons").instantiate(dijit.form.Button,{});
});

the idea is to assist in creating semantic/degradable dojo-sites. this would make it easier to manipulate nodes or groups of nodes, and create widgets out of them.

Attachments (1)

nodelist.test.patch (714 bytes) - added by dante 11 years ago.
updated patch

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by dante

Attachment: nodelist.test.patch added

updated patch

comment:1 Changed 11 years ago by dante

Milestone: 1.11.2

comment:2 Changed 11 years ago by alex

Milestone: 1.21.1
Owner: changed from dante to alex
Status: newassigned

comment:3 Changed 11 years ago by dante

severity: normalmajor

you told me to remind you ...

comment:4 Changed 11 years ago by dylan

Summary: add an .instantiate method to NodeList[patch][cla] add an .instantiate method to NodeList

comment:5 Changed 11 years ago by alex

(In [12487]) merging instantiate() patch. Refs #5603. Needs tests.

comment:6 Changed 11 years ago by dante

(In [12488]) refs #5603 - first test case of instantiate NodeList? function. much potential. simple test.

comment:7 Changed 11 years ago by dylan

Owner: changed from alex to dante
Status: assignednew

Reassigning to Peter to write more testcases.

comment:8 Changed 11 years ago by dante

Milestone: 1.11.2

expanded test - refs #5990 - will expand test and hopefully make small query() demo

comment:9 Changed 11 years ago by dante

(In [13420]) refs #5603 - just another random .instantiate() example

comment:10 Changed 11 years ago by dante

(In [13421]) refs #5603 again - all the fisheye's can be made with .instantiate in this example.

comment:11 Changed 11 years ago by dante

Description: modified (diff)
Resolution: fixed
Status: newclosed

this probably has enough tests now, scattered throughout and it's own dijit test case. Will open another ticket should I (or others) find it necessary to sniff .startup() or otherwise return something other than a NodeList from the method.

Note: See TracTickets for help on using tickets.