relsi

Uploadify web2py script

Jul 4th, 2012
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.06 KB | None | 0 0
  1. jQuery('document').ready(function() {
  2.     var datatosend = {};
  3.     jQuery('#photo_picture').uploadify({
  4.     'uploader' : '{{=URL(r=request,c="static",f="uploadify/uploadify.swf")}}',
  5.     'script' : '{{=URL(r=request,c="admin",f="add_photo")}}',
  6.     'scriptData' : datatosend,
  7.     'cancelImg' : '{{=URL(r=request,c="static",f="uploadify/cancel.png")}}',
  8.     'folder' : '/uploads/photos',
  9.     'expressInstall' : '{{=URL(r=request,c="static",f="uploadify/expressInstall.swf")}}',
  10.             'auto' : false,
  11.             'wmode' : 'transparent',
  12.             'height' : 36,
  13.             'queueID' : 'queue',
  14.             'multi': true,
  15.             'buttonText':'Select Photos',
  16.                     'onAllComplete' : function(event,data) {
  17.                         jQuery('html, body').animate({
  18.                                 scrollTop: 0
  19.                             }, 'fast');
  20.             }, 
  21.             'onSelect' : function(event,ID,fileObj) {
  22.                         jQuery('#queue').show();
  23.                     },
  24.                     'onCancel' : function(event,ID,fileObj,data) {
  25.                 if (data.fileCount <=0){
  26.                                 jQuery('#queue').hide();
  27.                 }
  28.             }  
  29.         });    
  30.     });
Advertisement
Add Comment
Please, Sign In to add comment