Permalink
Browse files

Working version (mostly).

  • Loading branch information...
bennadel committed Aug 30, 2012
1 parent 6489539 commit 65046b6b715c39d31f37bf7a149d2e5e1d51e605
Showing with 498 additions and 41 deletions.
  1. +31 −4 Application.cfc
  2. +22 −6 assets/css/demo.css
  3. +7 −3 assets/main.js
  4. +373 −16 assets/views/uploader.js
  5. +21 −12 index.htm
  6. +35 −0 upload_files.cfm
  7. +9 −0 uploads/.gitignore
View
@@ -1,4 +1,5 @@
<cfscript>
+
component
output = "false"
hint = "I define the application settings and event handlers."
@@ -10,12 +11,38 @@ component
this.applicationTimeout = createTimeSpan( 0, 0, 10, 0 );
this.sessionManagement = false;
- // Define the root directory so we can set up mappings off of it.
- this.rootDirectory = getDirectoryFromPath( getCurrentTemplatePath() );
- // Set up the uploads directory.
- this.uploadsDirectory = (this.rootDirectory & "uploads/");
+ // I initialize the application.
+ function onApplicationStart(){
+
+ // Get the root directory of the demo.
+ var rootDirectory = getDirectoryFromPath( getCurrentTemplatePath() );
+
+ // Set up the uploads directory.
+ application.uploadsDirectory = (rootDirectory & "uploads/");
+
+ // Return true so the application can load.
+ return( true );
+
+ }
+
+
+ // I initialize the request.
+ function onRequestStart(){
+
+ // Check to see if we need to manually reset the application.
+ if (structKeyExists( url, "init" )){
+
+ this.onApplicationStart();
+
+ }
+
+ // Return true so the page can load.
+ return( true );
+
+ }
}
+
</cfscript>
View
@@ -1,28 +1,44 @@
-div.uploader {}
+div.uploader {
+ position: relative ;
+ }
-div.uploader div.dropzone {
+div.uploader a.dropzone {
background-color: #F0F0F0 ;
border: 2px solid #CCCCCC ;
border-radius: 3px 3px 3px 3px ;
+ cursor: pointer ;
+ display: block ;
height: 100px ;
margin: 20px 0px 20px 0px ;
+ position: relative ;
width: 400px ;
}
-div.uploader div.dropzone div.instructions {
+div.uploader a.dropzone span.instructions {
color: #999999 ;
+ display: block ;
font-size: 24px ;
- line-height: 35px ;
+ line-height: 34px ;
padding-top: 33px ;
text-align: center ;
}
-div.uploader div.html5Dropzone div.flashInstructions,
-div.uploader div.flashDropzone div.html5Instructions {
+div.uploader a.html5Dropzone span.flashInstructions,
+div.uploader a.flashDropzone span.html5Instructions {
display: none ;
}
+div.uploader a.hotDropzone {
+ background-color: #DBEEFF ;
+ border-color: #3399FF ;
+ border-style: dashed ;
+ }
+
+div.uploader a.hotDropzone span.instructions {
+ color: #3399FF ;
+ }
+
div.uploader div.queue {}
div.uploader div.activeQueue div.noFiles,
View
@@ -11,13 +11,17 @@ require.config({
}
},
- // Set up the paths to our various modules.
+ // Set up the paths to our various modules. Be sure to include the
+ // "full" plupload file - otherwise, you'll get a -500 Init Error.
paths: {
domReady: "require/domReady",
jquery: "jquery/jquery-1.8.0.min",
- plupload: "plupload/js/plupload",
+ plupload: "plupload/js/plupload.full",
views: "views"
- }
+ },
+
+ // To help prevent JS caching while we're developing.
+ urlArgs: ("v=" + (new Date()).getTime())
});
Oops, something went wrong.

0 comments on commit 65046b6

Please sign in to comment.