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

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 17 20:44:18 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 MikeHansenMe):

 Instead of using show / hide maybe we should use disabled so the button
 appears but is disabled until there is a file.[[BR]]

 {{{
 $( '#upload' ).change( function() {
                 if( '' === $( '#upload' ).val() ){
                         $( '#upload-form #submit' ).attr( 'disabled',
 'disabled' );
                 }else{
                         $( '#upload-form #submit' ).removeAttr( 'disabled'
 );
                 }
         })
 }}}

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


More information about the wp-trac mailing list