Uploader 2 tweaking from this afternoon

Colin Clark colin.clark at utoronto.ca
Sat Oct 25 19:15:06 UTC 2008


Hi Eli,

I'm doing a bit of work on Uploader 2 today. Here's a summary of what  
I've done so far:

* I tweaked numReadyFiles(), sizeOfUploadedFiles(), sizeOfReadyFiles()  
to use the constant SWFUpload provides:  
SWFUpload.FILE_STATUS.COMPLETE. It's probably better to use the  
constant rather than the actual value, since it's both easier to read  
and less risky in case of change. I also fixed a bug in those  
functions where it was referring to file.status when the SWFUpload  
documentation suggests that the status is stored in a variable called  
"filestatus." These functions also need tests. I've filed an issue to  
cover it: FLUID-1708

* In Uploader.js, I renamed "uploaderStateElm" to "stateDisplay"  
because the original name seemed a bit redundant. If it's a selector,  
it will always point to an element and since it lives in the  
Uploader.js file, it's clear that it is part of the Uploader. I'm not  
sure "stateDisplay" is perfectly descriptive, either. Ideas?

* I moved all the CSS class names in to options.styles. I tried to  
pick names that were very descriptive of function: queueEmptyState,  
queueLoadedState, and queueBrowsingState.

* I renamed updateState() to refreshView() and made it public, since  
it's clear that this function is the main means of synchronizing model  
state with view state. I expect that refreshView() may grow and need  
to be refactored again a bit as time goes on.

* I tweaked DemoUploadManagerTests to use queue.files instead of just  
files, since we both missed that one in our respective commits and the  
tests were failing. Oops.

* I de-linted all the Uploader-related files.

Next on my agenda is still to get Ray's server up and running and  
finish the implementation of SWFUploadManager. Hopefully this weekend.

Colin

---
Colin Clark
Technical Lead, Fluid Project
Adaptive Technology Resource Centre, University of Toronto
http://fluidproject.org




More information about the fluid-work mailing list