mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-10 08:32:46 +00:00
* This moves our "development" versions from .dev.js to .js (same for css). * The compressed version then moves from .js to .min.js (same for css). By switching to the standard .min convention, it sets expectations for developers, and works nicely with existing tools such as ack. fixes #21633. git-svn-id: https://develop.svn.wordpress.org/trunk@21592 602fd350-edb4-49c9-b593-d223f7449a82
29 lines
733 B
JavaScript
29 lines
733 B
JavaScript
(function($){
|
|
$.ui.dialog.prototype.options.closeOnEscape = false;
|
|
$.widget("wp.wpdialog", $.ui.dialog, {
|
|
options: {
|
|
closeOnEscape: false
|
|
},
|
|
|
|
open: function() {
|
|
var ed;
|
|
|
|
// Initialize tinyMCEPopup if it exists and is the editor is active.
|
|
if ( tinyMCEPopup && typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) {
|
|
tinyMCEPopup.init();
|
|
}
|
|
|
|
// Add beforeOpen event.
|
|
if ( this._isOpen || false === this._trigger('beforeOpen') ) {
|
|
return;
|
|
}
|
|
|
|
// Open the dialog.
|
|
$.ui.dialog.prototype.open.apply( this, arguments );
|
|
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
|
|
this.element.focus();
|
|
this._trigger('refresh');
|
|
}
|
|
});
|
|
})(jQuery);
|