Opened 14 years ago
Closed 13 years ago
#2559 closed enhancement (fixed)
InlineEditBox onUndo callback never called
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
As per the documentation and comments in the code, when the cancel button is clicked the onUndo() callback should be called but it is not ever. Looking at the code onUndo() is only called through undo(), and undo is never called. QED.
Attachments (1)
Change History (12)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
If you want to know if the cancel button is pushed, use cancelEdit()
Changed 14 years ago by
Attachment: | inlineEditCallback.diff added |
---|
patch, changes test, and fixes all callbacks...
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
applied in [7547]. Thanks for the quick turnaround on the patch.
comment:4 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
A few key things: I think "name" should be passed to each callback, not just onSave... Now that onCancel actually exists and is called (where before it wasn't), this needs to be done to be consistent. OnChange? is now called even if no change by the user is made... I suggest this is unneccesary. My suggestion is to simplify this interface while keeping maximal flexibility by replacing the now 3 callback functions into just 1 callback as follows:
onCompletion( whichButtonPressed, newValue, oldValue, name ) { whichButtonPressed will be true for 'save' or false for 'cancel' user can compare old & new values to see if anything changed and 'name' is the context the user provides or null otherwise }
of course for backwards compatiblity you leave onSave() as is, though deprecate it
comment:5 Changed 14 years ago by
Milestone: | 0.4.2 → 0.4.3 |
---|
moving to 0.4.3 for further discussion. The patches applied to date made it into 0.4.2.
comment:6 Changed 14 years ago by
Milestone: | 0.4.4 → 0.9 |
---|---|
Owner: | changed from bill to Douglas Hays |
Status: | reopened → new |
comment:7 Changed 14 years ago by
Component: | Widgets → Dijit |
---|
comment:8 Changed 14 years ago by
Milestone: | 0.9 → 1.0 |
---|---|
Priority: | high → normal |
Type: | defect → enhancement |
There is no Undo function (separate from Cancel) in the 0.9 InlineEditBox?. Changing this to enhancement until its decided if there should be that function. onValueChanged() will be called when the value changes. onClick will be called when editing begins.
comment:9 Changed 13 years ago by
Owner: | changed from Douglas Hays to bill |
---|
InlineEditBox? being redesigned by bill
comment:10 Changed 13 years ago by
Milestone: | 1.0 → 1.1 |
---|
comment:11 Changed 13 years ago by
Milestone: | 1.1 → 1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
OK, in the new dijit.InlineEditBox? there's a cancel() method that you can connect to (<script type="dojo/connect">) to find out when the user cancels.
If you need more info about this bug report please contact jeffg at inventivity.com