Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/10028' into major
  • Loading branch information
Reinmar committed Oct 4, 2013
2 parents 0a98f20 + 3421b69 commit 1828df8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,10 @@ CKEditor 4 Changelog

## CKEditor 4.3

New Features:

* [#10028](http://dev.ckeditor.com/ticket/10028): New option [`config.dialog_noConfirmCancel`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-dialog_noConfirmCancel).

Fixed Issues:

* [#10612](http://dev.ckeditor.com/ticket/10612): Internet Explorer 11 compatibility issues.
Expand Down
13 changes: 12 additions & 1 deletion plugins/dialog/plugin.js
Expand Up @@ -370,7 +370,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
this.on( 'cancel', function( evt ) {
iterContents( function( item ) {
if ( item.isChanged() ) {
if ( !confirm( editor.lang.common.confirmCancel ) )
if ( !editor.config.dialog_noConfirmCancel && !confirm( editor.lang.common.confirmCancel ) )
evt.data.hide = false;
return true;
}
Expand Down Expand Up @@ -3116,6 +3116,17 @@ CKEDITOR.plugins.add( 'dialog', {
* @member CKEDITOR.config
*/

/**
* Tells if user should not be asked to confirm close, if any dialog field was modified.
* By default it is set to `false` meaning that the confirmation dialog will be shown.
*
* config.dialog_noConfirmCancel = true;
*
* @since 4.3
* @cfg {Boolean} [dialog_noConfirmCancel=false]
* @member CKEDITOR.config
*/

/**
* Fired when a dialog definition is about to be used to create a dialog into
* an editor instance. This event makes it possible to customize the definition
Expand Down

0 comments on commit 1828df8

Please sign in to comment.