Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2012
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. // Configure our RequireJS paths.
  2. require.config({
  3.  
  4. // Since Plupload doesn't support AMD loading, we can use the shim
  5. // configuration to define a just-in-time module that exports the
  6. // Plupload library as the named-module, "plupload".
  7. shim: {
  8. plupload: {
  9. exports: "plupload"
  10. }
  11. },
  12.  
  13. // Set up the paths to our various modules. Be sure to include the
  14. // "full" plupload file - otherwise, you'll get a -500 Init Error.
  15. paths: {
  16. domReady: "require/domReady",
  17. jquery: "jquery/jquery-1.8.0.min",
  18. plupload: "plupload/js/plupload.full",
  19. views: "views"
  20. },
  21.  
  22. // To help prevent JS caching while we're developing.
  23. urlArgs: ("v=" + (new Date()).getTime())
  24.  
  25. });
  26.  
  27.  
  28. // Run our boostrap file once the DOM-Ready event has fired. Notice
  29. // that I am running domReady as a plugin (ie. ends with "!").
  30. require(
  31. [
  32. "jquery",
  33. "views/uploader",
  34. "domReady!"
  35. ],
  36. function( $, Uploader ){
  37.  
  38.  
  39. // Create an instance of our upload view giving it the root
  40. // module node and the server-side end-point for the uploads.
  41. // Since we want to use the Flash runtime, we have to give
  42. // it the URL to the Flash engine SWF file to fallback to if
  43. // the user's browser doesn't support the HTML5 file API.
  44. var uploader = new Uploader(
  45. $( "div.uploader" ),
  46. "upload_files.cfm",
  47. "assets/plupload/js/plupload.flash.swf"
  48. );
  49.  
  50.  
  51. }
  52. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement