Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1383 closed defect (fixed)

[patch] Checkbox.html not valid markup

Reported by: guest Owned by: Becky Gibson
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Hi there,

I'm using Dojo with Zope3 and all .html files get served up as Zope Page Templates, which enforces HTML rules. I'm getting an error with the Checkbox.html template because of the ${this.disabledStr} in the first element. Is it possible to modify the widget so that the template contains valid markup ? Thanks.

Cheers, Andrew.

Attachments (1)

1383_1586.patch (6.0 KB) - added by Becky Gibson 13 years ago.
fix for 1383 and 1586

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Adam Peller

Owner: changed from anonymous to Adam Peller

doughays@IBM says:

fixed by adding: disabledStr: "", after the line: disabled: "enabled", in file: src/widget/CheckBox.js

comment:2 Changed 13 years ago by dylan

Milestone: 0.4

Changed 13 years ago by Becky Gibson

Attachment: 1383_1586.patch added

fix for 1383 and 1586

comment:4 Changed 13 years ago by Becky Gibson

the solution is to set the checked and disabled attributes via scripting rather than in the template. This required a change to widget.Parser.parseProperties because all of the browsers seem to treat checked and disabled differently. IE sets boolean values, opera sets string values, and any value of disabled set in FF equates to disabled == true. Made other changes to checkbox.js to change disabled and checked properties to boolean and to set them via scripting. Updated test_checkbox.html submit function to display the values of checked and disabled as well. Updated the templates (checkbox.html and checkboxA11y.html to remove ${this.checked} and ${this.disabled}. This fix also fixes issue 1586 (disabled not working in Opera).

comment:5 Changed 13 years ago by Becky Gibson

Summary: Checkbox.html not valid markup[patch] Checkbox.html not valid markup

comment:6 Changed 13 years ago by bill

Owner: changed from Adam Peller to Becky Gibson

comment:7 Changed 13 years ago by Becky Gibson

Resolution: fixed
Status: newclosed

This particular issue was fixed with issue 1583. There is no gaurantee that all Dojo templates will validate - checked by itself is a valid HTML 4.01 attribute. But, due to the different way that browsers handled checked and disabled, other code changes were made and this particular issue is fixed - checkedstr and disabledstr have been removed from the checkbox templates and are set via scripting.

comment:8 Changed 13 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.