Opened 11 years ago

Closed 8 years ago

#7514 closed enhancement (fixed)

[patch][ccla]CheckBox: support intermediate state

Reported by: David Schwartz Owned by: Adam Peller
Priority: high Milestone: 1.8
Component: Dojox Version: 1.1.1
Keywords: ibm check-box state Cc:
Blocked By: Blocking:

Description

A check box should be able to reflect three different states when it represents a setting shared by more than one selected object:

The check box is marked if all of the selected objects have that setting turned on. For example, the map displays all Border and Label features (see image below).

The check box has an intermediate state if some, but not all, of the selected objects have that setting turned on. For example, the map displays only some Geographic Web features.

Display nothing in the box if none of the selected objects has that setting turned on. For example, the map displays no 3D building features.

Attachments (4)

checkbox02.jpg (23.3 KB) - added by David Schwartz 11 years ago.
TriStateCheckBox_v0.1_dojox.patch (19.0 KB) - added by Adam Peller 9 years ago.
implementation from Siqi Zhong (IBM, CCLA)
TriStateCheckBox_v0.1_dijit.patch (437 bytes) - added by Adam Peller 9 years ago.
dijit patch from Siqi Zhong (IBM, CCLA)
tristatecheckboxStates.png (1.4 KB) - added by Adam Peller 9 years ago.
image to be placed at dojox/form/resources/images (IBM, CCLA)

Download all attachments as: .zip

Change History (19)

Changed 11 years ago by David Schwartz

Attachment: checkbox02.jpg added

comment:1 Changed 11 years ago by bill

Owner: set to Douglas Hays
Summary: Check box actually has three statesCheckBox: support intermediate state

Obviously this wouldn't work for form submission but could be used outside of forms.

Not sure what the API should be though as "checked" attribute is boolean. I.e, it's a special boolean attribute in browsers,for example:

<input type=checkbox checked>

comment:2 Changed 11 years ago by bill

Component: Dijit - LnFDijit
Milestone: tbd1.4
Type: defectenhancement

comment:3 Changed 11 years ago by bill

Milestone: 1.41.5

bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4

comment:4 Changed 10 years ago by David Schwartz

FWIW, depending on the nature of the form, this third state could be relevant. Consider a form in which the user sets the properties of a number of end-user objects where the value for a specific boolean property for some objects is true while it's false for others. You'd use this third state to indicate this condition for such properties and that, unless changed in the form, this condition will remain unchanged upon form submission.

comment:5 Changed 10 years ago by Douglas Hays

Milestone: 1.5future

comment:6 Changed 9 years ago by Adam Peller

Component: DijitDojox
Milestone: future1.7
Owner: changed from Douglas Hays to Adam Peller

comment:7 Changed 9 years ago by Adam Peller

Summary: CheckBox: support intermediate state[patch][ccla]CheckBox: support intermediate state

Changed 9 years ago by Adam Peller

implementation from Siqi Zhong (IBM, CCLA)

Changed 9 years ago by Adam Peller

dijit patch from Siqi Zhong (IBM, CCLA)

Changed 9 years ago by Adam Peller

Attachment: tristatecheckboxStates.png added

image to be placed at dojox/form/resources/images (IBM, CCLA)

comment:8 Changed 9 years ago by bill

(In [24656]) Support for this.checked == Mixed, refs #7514 !strict

comment:9 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [24657]) TriStateCheckbox? impl from Siqi Zhong (IBM, CCLA) Fixes #7514

comment:10 Changed 9 years ago by bill

Hi, there's no test file in the check in, was it left off by mistake?

comment:11 Changed 9 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

Yes, and it has regressed. Reopening bug. Thanks, Bill.

comment:12 Changed 9 years ago by Adam Peller

(In [25406]) Missing test case from [24657], refs #7514

comment:13 Changed 9 years ago by Adam Peller

(In [25458]) Updates from Siqi for icon class, remove dojo.cache. Refs #7514

comment:14 Changed 8 years ago by bill

This still needs work? (The ticket is still open.)

comment:15 Changed 8 years ago by Adam Peller

Resolution: fixed
Status: reopenedclosed

looks ok now. Closing.

Note: See TracTickets for help on using tickets.