Uploader code question

Eli Cochran eli at media.berkeley.edu
Tue Jul 29 15:17:32 UTC 2008


Well... essentially I'm using CSS to embody state, which is a little  
wanky. In this case, I'm testing whether the Upload button is enabled  
by testing whether or not the cursor is a "pointer". There are other  
things that I could, and should test for, but at the time that I wrote  
the code, it seemed expedient.

I'm sure that I will refactor that out as I rewrite the Uploader for  
that-ism.

- Eli


On Jul 29, 2008, at 7:35 AM, Anastasia Cheetham wrote:

>
> I'm trying to document how the Uploader works (for a tutorial), and
> I've come across something I don't understand. I'm hoping someone can
> help clarify.
>
> In the bindEvents() function, the upload and result functionality are
> both bound to the relevant button click handler thus:
>
>   $(button).click(function() {
>     if ($(uploader.fragmentSelectors.upload,
> uploaderContainer).css('cursor') === 'pointer') {
>       uploader.actions.beginUpload();
>     }
>   });
>
> I'm not understanding why the 'cursor' css property is being checked?
>
> -- 
> Anastasia Cheetham                   a.cheetham at utoronto.ca
> Software Designer, Fluid Project    http://fluidproject.org
> Adaptive Technology Resource Centre / University of Toronto
>
> _______________________________________________
> fluid-work mailing list
> fluid-work at fluidproject.org
> http://fluidproject.org/mailman/listinfo/fluid-work

. . . . . . . . . . .  .  .   .    .      .         .              .                     .

Eli Cochran
user interaction developer
ETS, UC Berkeley





More information about the fluid-work mailing list