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 )
|
||||
win = top;
|
||||
tinyMCE = win.tinyMCE;
|
||||
if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') )
|
||||
win.tinyMCE.execCommand('mceInsertContent', false, h);
|
||||
else
|
||||
if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) {
|
||||
tinyMCE.selectedInstance.getWin().focus();
|
||||
tinyMCE.execCommand('mceInsertContent', false, h);
|
||||
} else
|
||||
win.edInsertContent(win.edCanvas, h);
|
||||
if ( !this.ID )
|
||||
this.cancelView();
|
||||
@ -243,7 +244,7 @@ addLoadEvent( function() {
|
||||
},
|
||||
|
||||
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';
|
||||
$('upload-file').submit();
|
||||
return true;
|
||||
|
@ -30,7 +30,7 @@ class WP_Scripts {
|
||||
$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( '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