Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   processSelectedFiles: function(files) {
  2.     for (var file in files) {
  3.       if (YAHOO.lang.hasOwnProperty(files, file)) {
  4.         file = files[file];
  5.       }
  6.  
  7.       if (file.size > this.uploadLimit()) {
  8.  
  9.         if (this.size > 123456) {
  10.             var largeUpload = window.confirm("This is a large file, are you sure you still want to upload?");
  11.             if (!largeUpload) {
  12.                 this.cancelledFiles.push(file);
  13.                 return false;
  14.             }
  15.         }
  16.  
  17.         if (this.simple || file.size > this.uploadFileLimit()) {
  18.           this.cancelledFiles.push(file);
  19.           return false;
  20.         }
  21.         else {
  22.           this.forcedFileUpload = true;
  23.         }
  24.       }
  25.  
  26.       $("queue").show();
  27.  
  28.       file.size = (file.size / 1000).toFixed(0) + " KB";
  29.  
  30.       var html = "<tr id='#{id}' class='queued'><td class='name'>#{name}<span class='progress'><img class='filler' style='width:0px;' src='/sitecore/shell/Themes/Standard/Images/Progress/filler_media.png' alt='' /></span></td><td class='size'>#{size}</td><td class='alt'><input class='scFont alt' type='text' id='#{id}_alt' /></td></tr>".interpolate(file);
  31.  
  32.       $$("#queue tbody")[0].insert({ bottom: html });
  33.       if (!this.simple) {
  34.         $("UploadButton").show();
  35.       }
  36.  
  37.       this.queue.push(file);
  38.     }
  39.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement