Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2315 closed defect (bug) (fixed)

Inline Uploading of MP3 - Using Icon option not working

Reported by: RyanScheuermann Owned by: skeltoac
Priority: normal Milestone:
Component: General Version: 2.0
Severity: normal Keywords: bg|has-patch bg|commit
Cc:

Description

I'm using WinXP, FF 1.5 - I've download the latest nightly build as of Jan 20th.

When uploading an MP3 or any other "non-image" file using the inline uploading feature, I am given the option for "Using Title/Using Filename/Using Icon". Obviously, the Using Icon option only appears if the MIME type icon is available with that theme. No matter what option I choose, pressing "Send To Editor" always sends the same thing - it uses the Title.

The problem is in this JS function in inline-uploading.php (lines 373-391):

function toggleOtherIcon(n) {
   od = document.getElementById('div'+n);
   o = document.getElementById('p'+n);
   oi = document.getElementById('I'+n);
   if ( oi.innerHTML == htmldecode(usingtitle) ) {
       o.innerHTML = filename[n];
       oi.innerHTML = usingfilename;
   } else if ( oi.innerHTML == htmldecode(usingfilename) && icon[n] != '' ) {
       o.innerHTML = icon[n];
       oi.innerHTML = usingicon;
   } else {
       o.innerHTML = title[n];
       oi.innerHTML = usingtitle;
   }
   if ( oi.innerHTML == usingicon )
       od.className = 'otherwrap usingicon';
   else
       od.className = 'otherwrap usingtext';
} 

It fails to update the innerHTML for the DIV. The infrastructure for getting this to work is all in place, but it's missing that final piece. There needs to be some sort of updateOtherIcon function similar to the updateImage function to correctly update the DIV's innerHTML.

Attachments (1)

inline-uploading.php.diff (3.1 KB) - added by skeltoac 7 years ago.

Download all attachments as: .zip

Change History (6)

  • Owner changed from anonymous to skeltoac
  • Status changed from new to assigned

Thanks for the report! Diff attached.

  • Keywords bg|has-patch bg|commit added; upload, mp3, icons, mime type icons removed

comment:4   ryan7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3469]) updateOtherIcon. fixes #2315

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.