Opened 14 years ago
Last modified 13 years ago
#8331 confirmed New Feature
Ability to ignore "Confirm Cancel"-warning on dialogs
| Reported by: | Henrik Helmø Larsen | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | |
| Keywords: | HasPatch | Cc: | chris.ingham@… |
Description
If changes have been made to a dialog and the cancel button is pressed an annoying "Confirm Cancel" warning is displayed. It would be nice to toggle weather you want this warning or not.
The new "on cancel event" on the dialog will look like:
this.on( 'cancel', function( evt ) {
if (!editor.config.ignoreConfirmCancel)
iterContents( function( item ) {
if ( item.isChanged() ) {
if ( !confirm( editor.lang.common.confirmCancel ) )
evt.data.hide = false;
return true;
}
});
}, this, null, 0 );
The only line added is:
if (!editor.config.ignoreConfirmCancel)
which is in line 323 of the plugin.js in the dialog folder. This is just before the iterContents( function( item )... is called - thus ignoring this check if the ignoreConfirmCancel is set in the editors config.
In order to toggle the warning add the following line to the editors config:
config.ignoreConfirmCancel = true;
Change History (3)
comment:1 Changed 14 years ago by
| Type: | Bug → New Feature |
|---|
comment:2 Changed 14 years ago by
| Keywords: | HasPatch added |
|---|---|
| Status: | new → confirmed |
comment:3 Changed 13 years ago by
| Cc: | chris.ingham@… added |
|---|
Add to Cc: inghamc

IMO it can be annoying after some time of working with dialogs, so the option to choose whether you want these confirmations or not is a very good idea (at least for me).