Upload JS fixes from mdawaffe. fixes #3378
git-svn-id: https://develop.svn.wordpress.org/trunk@4510 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
64262206e2
commit
6def40697c
@ -233,9 +233,10 @@ addLoadEvent( function() {
|
|||||||
if ( !win )
|
if ( !win )
|
||||||
win = top;
|
win = top;
|
||||||
tinyMCE = win.tinyMCE;
|
tinyMCE = win.tinyMCE;
|
||||||
if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') )
|
if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) {
|
||||||
win.tinyMCE.execCommand('mceInsertContent', false, h);
|
tinyMCE.selectedInstance.getWin().focus();
|
||||||
else
|
tinyMCE.execCommand('mceInsertContent', false, h);
|
||||||
|
} else
|
||||||
win.edInsertContent(win.edCanvas, h);
|
win.edInsertContent(win.edCanvas, h);
|
||||||
if ( !this.ID )
|
if ( !this.ID )
|
||||||
this.cancelView();
|
this.cancelView();
|
||||||
@ -243,7 +244,7 @@ addLoadEvent( function() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
deleteFile: function(id) {
|
deleteFile: function(id) {
|
||||||
if ( confirm("<?php printf(addslashes(__("Are you sure you want to delete the file %s?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") {
|
if ( confirm("<?php printf(js_escape(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") ) {
|
||||||
$('action-value').value = 'delete';
|
$('action-value').value = 'delete';
|
||||||
$('upload-file').submit();
|
$('upload-file').submit();
|
||||||
return true;
|
return true;
|
||||||
|
@ -30,7 +30,7 @@ class WP_Scripts {
|
|||||||
$this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' );
|
$this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' );
|
||||||
$this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '3684' );
|
$this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '3684' );
|
||||||
$this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
|
$this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
|
||||||
$this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4466' );
|
$this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '####' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user