Changeset 26900
- Timestamp:
- 01/04/2014 01:27:59 AM (11 years ago)
- Location:
- trunk/src/wp-includes/js/tinymce/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js
r26899 r26900 9 9 */ 10 10 tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) { 11 if ( this.wp ) { 12 return this; 13 } 11 14 15 this.wp = {}; 12 16 this.parent = editor.windowManager; 13 17 this.editor = editor; … … 16 20 17 21 this.open = function( args, params ) { 18 var self = this, $element; 22 var $element, 23 self = this, 24 wp = this.wp; 19 25 20 26 if ( ! args.wpDialog ) { 21 return this.parent.open ( args, params );27 return this.parent.open.apply( this, arguments ); 22 28 } else if ( ! args.id ) { 23 29 return; 24 30 } 25 31 26 self.element = $element = jQuery( '#' + args.id );32 wp.$element = $element = jQuery( '#' + args.id ); 27 33 28 34 if ( ! $element.length ) { … … 34 40 } 35 41 36 self.features = args; 37 self.params = params; 38 self.windows.push( $element ); 42 wp.features = args; 43 wp.params = params; 39 44 40 45 // Store selection. Takes a snapshot in the FocusManager of the selection before focus is moved to the dialog. … … 56 61 57 62 $element.on( 'wpdialogclose', function() { 58 var i = self.windows.length; 59 60 while ( i-- && i > -1 ) { 61 if ( self.windows[i] === self.element ) { 62 self.windows.splice( i, 1 ); 63 } 63 if ( self.wp.$element ) { 64 self.wp = {}; 64 65 } 65 66 }); … … 67 68 68 69 this.close = function() { 69 if ( ! this. features.wpDialog ) {70 if ( ! this.wp.features || ! this.wp.features.wpDialog ) { 70 71 return this.parent.close.apply( this, arguments ); 71 72 } 72 73 73 this. element.wpdialog('close');74 this.wp.$element.wpdialog('close'); 74 75 }; 75 } 76 }; 76 77 77 78 tinymce.PluginManager.add( 'wpdialogs', function( editor ) { -
trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
r26882 r26900 58 58 59 59 if ( out && out[1] ) { 60 return '<p>' + out[1] + '</p>' 60 return '<p>' + out[1] + '</p>'; 61 61 } 62 62
Note: See TracChangeset
for help on using the changeset viewer.