~ubuntu-branches/debian/jessie/wordpress/jessie

« back to all changes in this revision

Viewing changes to wp-includes/js/wpdialog.js

  • Committer: Package Import Robot
  • Author(s): Craig Small
  • Date: 2014-04-17 20:56:19 UTC
  • mfrom: (1.2.35)
  • Revision ID: package-import@ubuntu.com-20140417205619-nurbet6eho4yvwfv
Tags: 3.9+dfsg-1
* New upstream release
* 3.9 seems to handle different locations for plugins so the
  plugin directory handling patches have been cut back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
( function($) {
 
2
        $.widget('wp.wpdialog', $.ui.dialog, {
 
3
                open: function() {
 
4
                        // Add beforeOpen event.
 
5
                        if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
 
6
                                return;
 
7
                        }
 
8
 
 
9
                        // Open the dialog.
 
10
                        this._super();
 
11
                        // WebKit leaves focus in the TinyMCE editor unless we shift focus.
 
12
                        this.element.focus();
 
13
                        this._trigger('refresh');
 
14
                }
 
15
        });
 
16
 
 
17
        $.wp.wpdialog.prototype.options.closeOnEscape = false;
 
18
 
 
19
})(jQuery);