[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

/wp-includes/js/tinymce/plugins/wpdialogs/js/ -> wpdialog.dev.js (source)

   1  (function($){
   2      $.ui.dialog.prototype.options.closeOnEscape = false;
   3      $.widget("wp.wpdialog", $.ui.dialog, {
   4          options: {
   5              closeOnEscape: false
   6          },
   7  
   8          open: function() {
   9              var ed;
  10  
  11              // Initialize tinyMCEPopup if it exists and is the editor is active.
  12              if ( tinyMCEPopup && typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) {
  13                  tinyMCEPopup.init();
  14              }
  15  
  16              // Add beforeOpen event.
  17              if ( this._isOpen || false === this._trigger('beforeOpen') ) {
  18                  return;
  19              }
  20  
  21              // Open the dialog.
  22              $.ui.dialog.prototype.open.apply( this, arguments );
  23              // WebKit leaves focus in the TinyMCE editor unless we shift focus.
  24              this.element.focus();
  25              this._trigger('refresh');
  26          }
  27      });
  28  })(jQuery);


Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting