Opened 11 years ago

Closed 11 years ago

#1218 closed task (no action needed)

OnChange Event

Reported by: guest Owned by: gogo
Priority: normal Milestone: 0.96
Component: Xinha Core Version: trunk
Severity: normal Keywords: onchange
Cc:

Description

Is there a way to add on on change event to Xinha?

I want to add this event to set a flag modified=true;

This way I can tell if screen was modified. And I can warn users t save screen before exiting.

Change History (3)

comment:1 follow-up: Changed 11 years ago by douglas

The UnsavedChanges? plugin( Ticket #1213 ) already provides this warning. If this is the only reason for this ticket, than there is no need to keep this ticket open. Especially since using an onchange wouldn't successfully handle the case where a user makes a change, and then undoes the change...

comment:2 in reply to: ↑ 1 ; follow-up: Changed 11 years ago by guest

Replying to douglas:

The UnsavedChanges? plugin( Ticket #1213 ) already provides this warning. If this is the only reason for this ticket, than there is no need to keep this ticket open. Especially since using an onchange wouldn't successfully handle the case where a user makes a change, and then undoes the change...

Different guest here, but I'm writing a report designer right now and I'd like to use Xinha to replace Dojo's sad rich text editor in a property editing pane. I need an onChange event (or, ideally, something like the Dijit editor's onNormalizedChange event) to notify me when the document has changed so I can copy the HTML into some other object.

comment:3 in reply to: ↑ 2 Changed 11 years ago by gogo

  • Resolution set to no action needed
  • Status changed from new to closed

Replying to guest:

Different guest here, but I'm writing a report designer right now and I'd like to use Xinha to replace Dojo's sad rich text editor in a property editing pane. I need an onChange event (or, ideally, something like the Dijit editor's onNormalizedChange event) to notify me when the document has changed so I can copy the HTML into some other object.

The easiest way to do this would be to have a plugin which listens to onUpdateToolbar() and figures out if any changes have been made (or rather, if it's worth notifying about them) and, ahh, does something.

I have a feeling that it could be a quite performance draining (basically you would have to getHTML and compare to really know if anything is different) so not really something for the core.

Note: See TracTickets for help on using tickets.