Make WordPress Core


Ignore:
Timestamp:
10/04/2006 05:19:10 PM (20 years ago)
Author:
ryan
Message:

Uploader improvements from mdawaffe. fixes #3191

File:
1 edited

Legend:

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

    r4312 r4340  
    3030                        $$('a.file-link').each( function(i) {
    3131                                var id = i.id.split('-').pop();
    32                                 i.onclick = function(e) { theFileList.imageView(id, e); }
     32                                i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); }
    3333                        } );
    3434                },
    … …  
    118118                        var h = '';
    119119
    120                         h += "<form id='upload-file' method='post' action='upload.php?style=inline&amp;tab=upload&amp;post_id=" + this.postID + "'>";
     120                        var action = 'upload.php?style=' + this.style + '&amp;tab=upload';
     121                        if ( this.postID )
     122                                action += '&amp;post_id=' + this.postID;
     123                        h += "<form id='upload-file' method='post' action='" + action + "'>";
    121124                        h += "<div id='file-title'>"
    122125                        if ( !this.currentImage.thumb )
Note: See TracChangeset for help on using the changeset viewer.