Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#2496 closed enhancement (wontfix)

slight bulletproofing of dojo button disable/enable code

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

I would like to suggest a small bulletproofing of the code to enable/disable the button widget. Both references are to Button.js, version 0.4.1, in the routine _sizeMyselfHelper:

1) Line 107:

Replace:

				dojo.html.prependClass(this.domNode, "dojoButtonDisabled");

With:

				if (!dojo.html.hasClass(this.domNode, "dojoButtonDisabled")) {
					dojo.html.prependClass(this.domNode, "dojoButtonDisabled");
				}

2) Line 111: Replace:

				dojo.html.removeClass(this.domNode, "dojoButtonDisabled");

With:

				if (dojo.html.hasClass(this.domNode, "dojoButtonDisabled")) {
					dojo.html.removeClass(this.domNode, "dojoButtonDisabled");
				}

Should the above be incorporated, I authorize anyone to do anything they wish with this enhancement, under the auspices of the dojo license. If I need to have a signed CLA, please let me know how to obtain one.

Thanks very much for the consideration,

Dave B.

Change History (5)

comment:1 Changed 12 years ago by guest

I forgot to do this again (see 2399). My full name is Dave Barndt, and my e-mail address is: webservant@… . Thanks!

comment:2 Changed 12 years ago by guest

FYI, a signed CLA is now on file with the Dojo Foundation and I predated it with a date from before I submitted this suggestion.

comment:3 Changed 12 years ago by bill

Component: WidgetsDijit
Milestone: 0.9
Owner: changed from bill to Douglas Hays

comment:4 Changed 12 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

The Button widget was rewritten for 0.9 and the referenced code no longer exists. The change will not be backported to 0.4.x.

comment:5 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.