Make WordPress Core

Changeset 4510


Ignore:
Timestamp:
11/21/2006 08:10:01 PM (18 years ago)
Author:
ryan
Message:

Upload JS fixes from mdawaffe. fixes #3378

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload-js.php

    r4506 r4510  
    234234                win = top;
    235235            tinyMCE = win.tinyMCE;
    236             if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') )
    237                 win.tinyMCE.execCommand('mceInsertContent', false, h);
    238             else
     236            if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) {
     237                tinyMCE.selectedInstance.getWin().focus();
     238                tinyMCE.execCommand('mceInsertContent', false, h);
     239            } else
    239240                win.edInsertContent(win.edCanvas, h);
    240241            if ( !this.ID )
     
    244245
    245246        deleteFile: function(id) {
    246             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 + "'); ?>") {
     247            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 + "'); ?>") ) {
    247248                $('action-value').value = 'delete';
    248249                $('upload-file').submit();
  • trunk/wp-includes/script-loader.php

    r4508 r4510  
    3131            $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '3684' );
    3232            $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
    33             $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4466' );
     33            $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '####' );
    3434        }
    3535    }
Note: See TracChangeset for help on using the changeset viewer.