2018-06-28 04:30:15 +02:00
|
|
|
/**
|
|
|
|
* @output wp-includes/js/wpdialog.js
|
|
|
|
*/
|
|
|
|
|
2018-05-03 17:27:21 +02:00
|
|
|
/*
|
|
|
|
* Wrap the jQuery UI Dialog open function remove focus from tinyMCE.
|
|
|
|
*/
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-29 00:53:15 +01:00
|
|
|
( function($) {
|
|
|
|
$.widget('wp.wpdialog', $.ui.dialog, {
|
|
|
|
open: function() {
|
|
|
|
// Add beforeOpen event.
|
|
|
|
if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Open the dialog.
|
|
|
|
this._super();
|
2018-05-03 17:27:21 +02:00
|
|
|
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-29 00:53:15 +01:00
|
|
|
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
|
|
|
|
this.element.focus();
|
|
|
|
this._trigger('refresh');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$.wp.wpdialog.prototype.options.closeOnEscape = false;
|
|
|
|
|
|
|
|
})(jQuery);
|