Upload JS fixes from mdawaffe. fixes #3378

git-svn-id: http://svn.automattic.com/wordpress/trunk@4510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-11-21 20:10:01 +00:00
parent 68b74ef3b9
commit 102885ebbc
2 changed files with 6 additions and 5 deletions

View File

@ -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;

View File

@ -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'), '####' );
}
}