[wp-trac] [WordPress Trac] #20855: Don't show Upload button until file has been selected.

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 22 10:41:32 UTC 2012


#20855: Don't show Upload button until file has been selected.
----------------------------+------------------------
 Reporter:  jane            |       Owner:  kovshenin
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  3.5
Component:  UI              |     Version:  3.4
 Severity:  minor           |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------

Comment (by kovshenin):

 In [attachment:20855.diff]

 Using `hide-if-js` class to hide the submit button only if js is working.
 Moved action and nonce fields above the file field so that the file field
 and submit field are immediate siblings, and thus `jQuery.next()` can be
 used.

 I don't really like the way hide-if-js is added to the button, since that
 argument is actually a "type" and not "class". Maybe we should wrap the
 submit button in a span with a hide-if-js class (and another class to
 target in js) instead. Thoughts?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20855#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list