Currently if no file or more than 1 file is selected the error "Please select a file" is given. This is confusing especially if more than 1 file is selected.

This is done on line 526 of imce.js

Why not replace line 526 and 527 with:

    if (imce.validateSelCount(1,1)) {
      imce.send(imce.vars.prvfid);
    }

This utilises the neat validateSelCount function already available and improves feedback given to users about their actions. It also lays the foundation for a possible patch to be able to insert more than 1 image at a time from the IMCE File Browser.

I apologize for the way I suggest a code change, I'm not familiar with creating patches yet.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kingdutch’s picture

Issue summary: View changes

Code formatting

thalles’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community

Works fine to me!

thalles’s picture

Follow a patch

  • thalles committed 4120fad on 7.x-1.x
    Issue #1594434 by thalles, Kingdutch: Improve file select feedback
    
thalles’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.