plupload-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/Rakefile +1 -0
  4. data/lib/plupload/rails/engine.rb +7 -0
  5. data/lib/plupload/rails/version.rb +7 -0
  6. data/lib/plupload/rails.rb +3 -0
  7. data/lib/plupload-rails.rb +2 -0
  8. data/plupload-rails.gemspec +24 -0
  9. data/vendor/assets/images/jquery.plupload.queue/backgrounds.gif +0 -0
  10. data/vendor/assets/images/jquery.plupload.queue/buttons-disabled.png +0 -0
  11. data/vendor/assets/images/jquery.plupload.queue/buttons.png +0 -0
  12. data/vendor/assets/images/jquery.plupload.queue/delete.gif +0 -0
  13. data/vendor/assets/images/jquery.plupload.queue/done.gif +0 -0
  14. data/vendor/assets/images/jquery.plupload.queue/error.gif +0 -0
  15. data/vendor/assets/images/jquery.plupload.queue/throbber.gif +0 -0
  16. data/vendor/assets/images/jquery.plupload.queue/transp50.png +0 -0
  17. data/vendor/assets/images/jquery.ui.plupload/plupload-bw.png +0 -0
  18. data/vendor/assets/images/jquery.ui.plupload/plupload.png +0 -0
  19. data/vendor/assets/javascripts/jquery.plupload.queue.js +1 -0
  20. data/vendor/assets/javascripts/jquery.ui.plupload.js +1 -0
  21. data/vendor/assets/javascripts/plupload/i18n/cs.js +14 -0
  22. data/vendor/assets/javascripts/plupload/i18n/da.js +12 -0
  23. data/vendor/assets/javascripts/plupload/i18n/de.js +25 -0
  24. data/vendor/assets/javascripts/plupload/i18n/es.js +25 -0
  25. data/vendor/assets/javascripts/plupload/i18n/fi.js +33 -0
  26. data/vendor/assets/javascripts/plupload/i18n/fr.js +25 -0
  27. data/vendor/assets/javascripts/plupload/i18n/it.js +21 -0
  28. data/vendor/assets/javascripts/plupload/i18n/ja.js +37 -0
  29. data/vendor/assets/javascripts/plupload/i18n/lv.js +33 -0
  30. data/vendor/assets/javascripts/plupload/i18n/nl.js +21 -0
  31. data/vendor/assets/javascripts/plupload/i18n/pt-br.js +35 -0
  32. data/vendor/assets/javascripts/plupload/i18n/ru.js +21 -0
  33. data/vendor/assets/javascripts/plupload/i18n/sv.js +12 -0
  34. data/vendor/assets/javascripts/plupload.browserplus.js +1 -0
  35. data/vendor/assets/javascripts/plupload.flash.js +1 -0
  36. data/vendor/assets/javascripts/plupload.full.js +2 -0
  37. data/vendor/assets/javascripts/plupload.gears.js +1 -0
  38. data/vendor/assets/javascripts/plupload.html4.js +1 -0
  39. data/vendor/assets/javascripts/plupload.html5.js +1 -0
  40. data/vendor/assets/javascripts/plupload.js +2 -0
  41. data/vendor/assets/javascripts/plupload.silverlight.js +1 -0
  42. data/vendor/assets/misc/plupload.flash.swf +0 -0
  43. data/vendor/assets/misc/plupload.silverlight.xap +0 -0
  44. data/vendor/assets/stylesheets/jquery.plupload.queue.scss +177 -0
  45. data/vendor/assets/stylesheets/jquery.ui.plupload.csss +147 -0
  46. metadata +101 -0
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in plupload-rails.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,7 @@
1
+ module Plupload
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
7
+
@@ -0,0 +1,7 @@
1
+ module Plupload
2
+ VERSION = "1.5.1.1"
3
+ module Rails
4
+ VERSION = "1.0.0"
5
+ end
6
+ end
7
+
@@ -0,0 +1,3 @@
1
+ require 'plupload/rails/version'
2
+ require 'plupload/rails/engine'
3
+
@@ -0,0 +1,2 @@
1
+ require "plupload/rails"
2
+
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "plupload/rails/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "plupload-rails"
7
+ s.version = Plupload::Rails::VERSION
8
+ s.authors = ["Corin Langosch"]
9
+ s.email = ["info@corinlangosch.com"]
10
+ s.homepage = "https://github.com/gucki/plupload-rails"
11
+ s.summary = %q{Integration of Plupload with the Rails 3.1 asset pipeline}
12
+ s.description = %q{This gem integrates Plupload with the Rails 3.1 asset pipeline.}
13
+
14
+ s.rubyforge_project = "plupload-rails"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "rails", "~>3.1.0"
24
+ end
@@ -0,0 +1 @@
1
+ (function(c){var d={};function a(e){return plupload.translate(e)||e}function b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="'+f+'_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+a("Select files")+'</div><div class="plupload_header_text">'+a("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">'+a("Filename")+'</div><div class="plupload_file_action">&nbsp;</div><div class="plupload_file_status"><span>'+a("Status")+'</span></div><div class="plupload_file_size">'+a("Size")+'</div><div class="plupload_clearer">&nbsp;</div></div><ul id="'+f+'_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">'+a("Add files")+'</a><a href="#" class="plupload_button plupload_start">'+a("Start upload")+'</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer">&nbsp;</div></div></div></div></div><input type="hidden" id="'+f+'_count" name="'+f+'_count" value="0" /></div>')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));d[k]=j;function h(l){var n;if(l.status==plupload.DONE){n="plupload_done"}if(l.status==plupload.FAILED){n="plupload_failed"}if(l.status==plupload.QUEUED){n="plupload_delete"}if(l.status==plupload.UPLOADING){n="plupload_uploading"}var m=c("#"+l.id).attr("class",n).find("a").css("display","block");if(l.hint){m.attr("title",l.hint)}}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).text(a("Uploaded %d/%d files").replace(/%d\/%d/,j.total.uploaded+"/"+j.files.length))}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+='<input type="hidden" name="'+k+"_"+n+'_tmpname" value="'+plupload.xmlEncode(o.target_name)+'" />'}l+='<input type="hidden" name="'+k+"_"+n+'_name" value="'+plupload.xmlEncode(o.name)+'" />';l+='<input type="hidden" name="'+k+"_"+n+'_status" value="'+(o.status==plupload.DONE?"done":"failed")+'" />';n++;c("#"+k+"_count").val(n)}m.append('<li id="'+o.id+'"><div class="plupload_file_name"><span>'+o.name+'</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">'+o.percent+'%</div><div class="plupload_file_size">'+plupload.formatSize(o.size)+'</div><div class="plupload_clearer">&nbsp;</div>'+l+"</li>");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).text(a("Add files."))}else{c("span.plupload_add_text",i).text(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length==(j.total.uploaded+j.total.failed));m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){c("#"+k+"_filelist div.plupload_file_name span",i).live("click",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('<input type="text" />');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(u.keyCode==13){u.preventDefault();o.name=t.val()+p;q.text(o.name);t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){n.preventDefault();j.stop()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}if(o.code==plupload.FILE_SIZE_ERROR){alert(a("Error: File too large: ")+m.name)}if(o.code==plupload.FILE_EXTENSION_ERROR){alert(a("Error: Invalid file extension: ")+m.name)}m.hint=n;c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).text("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(e.multiple_queues){c("span.plupload_total_status,span.plupload_total_file_size",i).show()}}else{g();c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f();if(e.multiple_queues&&j.total.uploaded+j.total.failed==j.files.length){c(".plupload_buttons,.plupload_upload_status",i).css("display","inline");c(".plupload_start",i).addClass("plupload_disabled");c("span.plupload_total_status,span.plupload_total_file_size",i).hide()}});if(e.setup){e.setup(j)}});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery);
@@ -0,0 +1 @@
1
+ (function(f,a,c,g,e){var h={};function b(i){return c.translate(i)||i}function d(i){i.html('<div class="plupload_wrapper"><div class="ui-widget-content plupload_container"><div class="plupload"><div class="ui-state-default ui-widget-header plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+b("Select files")+'</div><div class="plupload_header_text">'+b("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><table class="plupload_filelist"><tr class="ui-widget-header plupload_filelist_header"><td class="plupload_cell plupload_file_name">'+b("Filename")+'</td><td class="plupload_cell plupload_file_status">'+b("Status")+'</td><td class="plupload_cell plupload_file_size">'+b("Size")+'</td><td class="plupload_cell plupload_file_action">&nbsp;</td></tr></table><div class="plupload_scroll"><table class="plupload_filelist_content"></table></div><table class="plupload_filelist"><tr class="ui-widget-header ui-widget-content plupload_filelist_footer"><td class="plupload_cell plupload_file_name"><div class="plupload_buttons"><!-- Visible --><a class="plupload_button plupload_add">'+b("Add Files")+'</a>&nbsp;<a class="plupload_button plupload_start">'+b("Start Upload")+'</a>&nbsp;<a class="plupload_button plupload_stop plupload_hidden">'+b("Stop Upload")+'</a>&nbsp;</div><div class="plupload_started plupload_hidden"><!-- Hidden --><div class="plupload_progress plupload_right"><div class="plupload_progress_container"></div></div><div class="plupload_cell plupload_upload_status"></div><div class="plupload_clearer">&nbsp;</div></div></td><td class="plupload_file_status"><span class="plupload_total_status">0%</span></td><td class="plupload_file_size"><span class="plupload_total_file_size">0 kb</span></td><td class="plupload_file_action"></td></tr></table></div></div></div><input class="plupload_count" value="0" type="hidden"></div>')}g.widget("ui.plupload",{contents_bak:"",runtime:null,options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",dragdrop:true,multiple_queues:true,buttons:{browse:true,start:true,stop:true},autostart:false,sortable:false,rename:false,max_file_count:0},FILE_COUNT_ERROR:-9001,_create:function(){var i=this,k,j;k=this.element.attr("id");if(!k){k=c.guid();this.element.attr("id",k)}this.id=k;this.contents_bak=this.element.html();d(this.element);this.container=g(".plupload_container",this.element).attr("id",k+"_container");this.filelist=g(".plupload_filelist_content",this.container).attr({id:k+"_filelist",unselectable:"on"});this.browse_button=g(".plupload_add",this.container).attr("id",k+"_browse");this.start_button=g(".plupload_start",this.container).attr("id",k+"_start");this.stop_button=g(".plupload_stop",this.container).attr("id",k+"_stop");if(g.ui.button){this.browse_button.button({icons:{primary:"ui-icon-circle-plus"}});this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:true});this.stop_button.button({icons:{primary:"ui-icon-circle-close"}})}if(!this.options.buttons.browse){this.browse_button.button("disable").hide();g("#"+k+i.runtime+"_container").hide()}if(!this.options.buttons.start){this.start_button.button("disable").hide()}if(!this.options.buttons.stop){this.stop_button.button("disable").hide()}this.progressbar=g(".plupload_progress_container",this.container);if(g.ui.progressbar){this.progressbar.progressbar()}this.counter=g(".plupload_count",this.element).attr({id:k+"_count",name:k+"_count"});j=this.uploader=h[k]=new c.Uploader(g.extend({container:k,browse_button:k+"_browse"},this.options));j.bind("Init",function(l,m){if(!i.options.unique_names&&i.options.rename){i._enableRenaming()}if(j.features.dragdrop&&i.options.dragdrop){i._enableDragAndDrop()}i.container.attr("title",b("Using runtime: ")+(i.runtime=m.runtime));i.start_button.click(function(n){if(!g(this).button("option","disabled")){i.start()}n.preventDefault()});i.stop_button.click(function(n){j.stop();n.preventDefault()})});if(i.options.max_file_count){j.bind("FilesAdded",function(l,n){var o=[],m=n.length;var p=l.files.length+m-i.options.max_file_count;if(p>0){o=n.splice(m-p,p);l.trigger("Error",{code:i.FILE_COUNT_ERROR,message:b("File count error."),file:o})}})}j.init();j.bind("FilesAdded",function(l,m){i._trigger("selected",null,{up:l,files:m});if(i.options.autostart){i.start()}});j.bind("FilesRemoved",function(l,m){i._trigger("removed",null,{up:l,files:m})});j.bind("QueueChanged",function(){i._updateFileList()});j.bind("StateChanged",function(){i._handleState()});j.bind("UploadFile",function(l,m){i._handleFileStatus(m)});j.bind("FileUploaded",function(l,m){i._handleFileStatus(m);i._trigger("uploaded",null,{up:l,file:m})});j.bind("UploadProgress",function(l,m){g("#"+m.id+" .plupload_file_status",i.element).html(m.percent+"%");i._handleFileStatus(m);i._updateTotalProgress();i._trigger("progress",null,{up:l,file:m})});j.bind("UploadComplete",function(l,m){i._trigger("complete",null,{up:l,files:m})});j.bind("Error",function(l,p){var n=p.file,o,m;if(n){o="<strong>"+p.message+"</strong>";m=p.details;if(m){o+=" <br /><i>"+p.details+"</i>"}else{switch(p.code){case c.FILE_EXTENSION_ERROR:m=b("File: %s").replace("%s",n.name);break;case c.FILE_SIZE_ERROR:m=b("File: %f, size: %s, max file size: %m").replace(/%([fsm])/g,function(r,q){switch(q){case"f":return n.name;case"s":return n.size;case"m":return c.parseSize(i.options.max_file_size)}});break;case i.FILE_COUNT_ERROR:m=b("Upload element accepts only %d file(s) at a time. Extra files were stripped.").replace("%d",i.options.max_file_count);break;case c.IMAGE_FORMAT_ERROR:m=c.translate("Image format either wrong or not supported.");break;case c.IMAGE_MEMORY_ERROR:m=c.translate("Runtime ran out of available memory.");break;case c.IMAGE_DIMENSIONS_ERROR:m=c.translate("Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.").replace(/%([swh])/g,function(r,q){switch(q){case"s":return l.runtime;case"w":return l.features.maxWidth;case"h":return l.features.maxHeight}});break;case c.HTTP_ERROR:m=b("Upload URL might be wrong or doesn't exist");break}o+=" <br /><i>"+m+"</i>"}i.notify("error",o);i._trigger("error",null,{up:l,file:n,error:o})}})},_setOption:function(j,k){var i=this;if(j=="buttons"&&typeof(k)=="object"){k=g.extend(i.options.buttons,k);if(!k.browse){i.browse_button.button("disable").hide();g("#"+i.id+i.runtime+"_container").hide()}else{i.browse_button.button("enable").show();g("#"+i.id+i.runtime+"_container").show()}if(!k.start){i.start_button.button("disable").hide()}else{i.start_button.button("enable").show()}if(!k.stop){i.stop_button.button("disable").hide()}else{i.start_button.button("enable").show()}}i.uploader.settings[j]=k},start:function(){this.uploader.start();this._trigger("start",null)},stop:function(){this.uploader.stop();this._trigger("stop",null)},getFile:function(j){var i;if(typeof j==="number"){i=this.uploader.files[j]}else{i=this.uploader.getFile(j)}return i},removeFile:function(j){var i=this.getFile(j);if(i){this.uploader.removeFile(i)}},clearQueue:function(){this.uploader.splice()},getUploader:function(){return this.uploader},refresh:function(){this.uploader.refresh()},_handleState:function(){var i=this,j=this.uploader;if(j.state===c.STARTED){g(i.start_button).button("disable");g([]).add(i.stop_button).add(".plupload_started").removeClass("plupload_hidden");g(".plupload_upload_status",i.element).text(b("Uploaded %d/%d files").replace("%d/%d",j.total.uploaded+"/"+j.files.length));g(".plupload_header_content",i.element).addClass("plupload_header_content_bw")}else{g([]).add(i.stop_button).add(".plupload_started").addClass("plupload_hidden");if(i.options.multiple_queues){g(i.start_button).button("enable");g(".plupload_header_content",i.element).removeClass("plupload_header_content_bw")}i._updateFileList()}},_handleFileStatus:function(l){var n,j;switch(l.status){case c.DONE:n="plupload_done";j="ui-icon ui-icon-circle-check";break;case c.FAILED:n="ui-state-error plupload_failed";j="ui-icon ui-icon-alert";break;case c.QUEUED:n="plupload_delete";j="ui-icon ui-icon-circle-minus";break;case c.UPLOADING:n="ui-state-highlight plupload_uploading";j="ui-icon ui-icon-circle-arrow-w";var i=g(".plupload_scroll",this.container),m=i.scrollTop(),o=i.height(),k=g("#"+l.id).position().top+g("#"+l.id).height();if(o<k){i.scrollTop(m+k-o)}break}n+=" ui-state-default plupload_file";g("#"+l.id).attr("class",n).find(".ui-icon").attr("class",j)},_updateTotalProgress:function(){var i=this.uploader;this.progressbar.progressbar("value",i.total.percent);g(".plupload_total_status",this.element).html(i.total.percent+"%");g(".plupload_upload_status",this.element).text(b("Uploaded %d/%d files").replace("%d/%d",i.total.uploaded+"/"+i.files.length))},_updateFileList:function(){var j=this,n=this.uploader,l=this.filelist,k=0,o,m=this.id+"_",i;if(g.ui.sortable&&this.options.sortable){g("tbody",l).sortable("destroy")}l.empty();g.each(n.files,function(q,p){i="";o=m+k;if(p.status===c.DONE){if(p.target_name){i+='<input type="hidden" name="'+o+'_tmpname" value="'+c.xmlEncode(p.target_name)+'" />'}i+='<input type="hidden" name="'+o+'_name" value="'+c.xmlEncode(p.name)+'" />';i+='<input type="hidden" name="'+o+'_status" value="'+(p.status===c.DONE?"done":"failed")+'" />';k++;j.counter.val(k)}l.append('<tr class="ui-state-default plupload_file" id="'+p.id+'"><td class="plupload_cell plupload_file_name"><span>'+p.name+'</span></td><td class="plupload_cell plupload_file_status">'+p.percent+'%</td><td class="plupload_cell plupload_file_size">'+c.formatSize(p.size)+'</td><td class="plupload_cell plupload_file_action"><div class="ui-icon"></div>'+i+"</td></tr>");j._handleFileStatus(p);g("#"+p.id+".plupload_delete .ui-icon, #"+p.id+".plupload_done .ui-icon").click(function(r){g("#"+p.id).remove();n.removeFile(p);r.preventDefault()});j._trigger("updatelist",null,l)});g(".plupload_total_file_size",j.element).html(c.formatSize(n.total.size));if(n.total.queued===0){g(".ui-button-text",j.browse_button).text(b("Add Files"))}else{g(".ui-button-text",j.browse_button).text(b("%d files queued").replace("%d",n.total.queued))}if(n.files.length===(n.total.uploaded+n.total.failed)){j.start_button.button("disable")}else{j.start_button.button("enable")}l[0].scrollTop=l[0].scrollHeight;j._updateTotalProgress();if(!n.files.length&&n.features.dragdrop&&n.settings.dragdrop){g("#"+o+"_filelist").append('<tr><td class="plupload_droptext">'+b("Drag files here.")+"</td></tr>")}else{if(j.options.sortable&&g.ui.sortable){j._enableSortingList()}}},_enableRenaming:function(){var i=this;g(".plupload_file_name span",this.filelist).live("click",function(o){var m=g(o.target),k,n,j,l="";k=i.uploader.getFile(m.parents("tr")[0].id);j=k.name;n=/^(.+)(\.[^.]+)$/.exec(j);if(n){j=n[1];l=n[2]}m.hide().after('<input class="plupload_file_rename" type="text" />');m.next().val(j).focus().blur(function(){m.show().next().remove()}).keydown(function(q){var p=g(this);if(g.inArray(q.keyCode,[13,27])!==-1){q.preventDefault();if(q.keyCode===13){k.name=p.val()+l;m.text(k.name)}p.blur()}})})},_enableDragAndDrop:function(){this.filelist.append('<tr><td class="plupload_droptext">'+b("Drag files here.")+"</td></tr>");this.filelist.parent().attr("id",this.id+"_dropbox");this.uploader.settings.drop_element=this.options.drop_element=this.id+"_dropbox"},_enableSortingList:function(){var j,i=this;if(g("tbody tr",this.filelist).length<2){return}g("tbody",this.filelist).sortable({containment:"parent",items:".plupload_delete",helper:function(l,k){return k.clone(true).find("td:not(.plupload_file_name)").remove().end().css("width","100%")},stop:function(p,o){var l,n,k,m=[];g.each(g(this).sortable("toArray"),function(q,r){m[m.length]=i.uploader.getFile(r)});m.unshift(m.length);m.unshift(0);Array.prototype.splice.apply(i.uploader.files,m)}})},notify:function(j,k){var i=g('<div class="plupload_message"><span class="plupload_message_close ui-icon ui-icon-circle-close" title="'+b("Close")+'"></span><p><span class="ui-icon"></span>'+k+"</p></div>");i.addClass("ui-state-"+(j==="error"?"error":"highlight")).find("p .ui-icon").addClass("ui-icon-"+(j==="error"?"alert":"info")).end().find(".plupload_message_close").click(function(){i.remove()}).end();g(".plupload_header_content",this.container).append(i)},destroy:function(){g(".plupload_button",this.element).unbind();if(g.ui.button){g(".plupload_add, .plupload_start, .plupload_stop",this.container).button("destroy")}if(g.ui.progressbar){this.progressbar.progressbar("destroy")}if(g.ui.sortable&&this.options.sortable){g("tbody",this.filelist).sortable("destroy")}this.uploader.destroy();this.element.empty().html(this.contents_bak);this.contents_bak="";g.Widget.prototype.destroy.apply(this)}})}(window,document,plupload,jQuery));
@@ -0,0 +1,14 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Vyberte soubory',
4
+ 'Add files to the upload queue and click the start button.' : 'Přidejte soubory do fronty a pak spusťte nahrávání.',
5
+ 'Filename' : 'Název souboru',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Velikost',
8
+ 'Add Files' : 'Přidat soubory',
9
+ 'Stop current upload' : 'Zastavit nahrávání',
10
+ 'Start uploading queue' : 'Spustit frontu nahrávání',
11
+ 'Drag files here.' : 'Sem přetáhněte soubory.',
12
+ 'Start Upload': 'Spustit nahrávání',
13
+ 'Uploaded %d/%d files': 'Nahráno %d/%d souborů'
14
+ });
@@ -0,0 +1,12 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Vælg filer',
4
+ 'Add files to the upload queue and click the start button.' : 'Tilføj filer til køen, og tryk på start.',
5
+ 'Filename' : 'Filnavn',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Størrelse',
8
+ 'Add files' : 'Tilføj filer',
9
+ 'Stop current upload' : 'Stop upload',
10
+ 'Start uploading queue' : 'Start upload',
11
+ 'Drag files here.' : 'Træk filer her.'
12
+ });
@@ -0,0 +1,25 @@
1
+ // German
2
+ plupload.addI18n({
3
+ 'Select files' : 'W&auml;hlen Sie die Dateien:',
4
+ 'Add files to the upload queue and click the start button.' : 'Dateien hinzuf&uuml;gen und danach auf \'Starten des Uploads\' klicken und die Datei hochzuladen.',
5
+ 'Filename' : 'Dateiname',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Gr&ouml;&szlig;e',
8
+ 'Add files' : 'Hinzuf&uuml;gen von Dateien',
9
+ 'Stop current upload' : 'Stop aktuellen Upload',
10
+ 'Start uploading queue' : 'Starte Upload',
11
+ 'Uploaded %d/%d files': '%d/%d Dateien sind Hochgeladen',
12
+ 'N/A' : 'Nicht verf&uuml;gbar',
13
+ 'Drag files here.' : 'Ziehen Sie die Dateien hier hin',
14
+ 'File extension error.': 'Dateiendungs Fehler.',
15
+ 'File size error.': 'Dateigr&ouml;ßen Fehler.',
16
+ 'Init error.': 'Initialisierungs Fehler.',
17
+ 'HTTP Error.': 'HTTP Fehler.',
18
+ 'Security error.': 'Sicherheits Fehler.',
19
+ 'Generic error.': 'Generic Fehler.',
20
+ 'IO error.': 'Ein/Ausgabe Fehler.',
21
+ 'Stop Upload': 'Stoppen des Uploads.',
22
+ 'Add Files': 'Dateien hinzuf&uuml;gen',
23
+ 'Start Upload': 'Starten des Uploads.',
24
+ '%d files queued': '%d Dateien in der Warteschlange.'
25
+ });
@@ -0,0 +1,25 @@
1
+ // Spanish
2
+ plupload.addI18n({
3
+ 'Select files' : 'Elija archivos:',
4
+ 'Add files to the upload queue and click the start button.' : 'Agregue archivos a la cola de subida y haga click en el boton de iniciar.',
5
+ 'Filename' : 'Nombre de archivo',
6
+ 'Status' : 'Estado',
7
+ 'Size' : 'Tama&ntilde;o',
8
+ 'Add files' : 'Agregue archivos',
9
+ 'Stop current upload' : 'Detener subida actual',
10
+ 'Start uploading queue' : 'Iniciar subida de cola',
11
+ 'Uploaded %d/%d files': 'Subidos %d/%d archivos',
12
+ 'N/A' : 'No disponible',
13
+ 'Drag files here.' : 'Arrastre archivos aqu&iacute;',
14
+ 'File extension error.': 'Error de extensi&oacute;n de archivo.',
15
+ 'File size error.': 'Error de tama&ntilde;o de archivo.',
16
+ 'Init error.': 'Error de inicializaci&oacute;n.',
17
+ 'HTTP Error.': 'Error de HTTP.',
18
+ 'Security error.': 'Error de seguridad.',
19
+ 'Generic error.': 'Error gen&eacute;rico.',
20
+ 'IO error.': 'Error de entrada/salida.',
21
+ 'Stop Upload': 'Detener Subida.',
22
+ 'Add Files': 'Agregar Archivos',
23
+ 'Start Upload': 'Comenzar Subida.',
24
+ '%d files queued': '%d archivos en cola.'
25
+ });
@@ -0,0 +1,33 @@
1
+ // .fi file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Valitse tiedostoja',
4
+ 'Add files to the upload queue and click the start button.' : 'Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.',
5
+ 'Filename' : 'Tiedostonimi',
6
+ 'Status' : 'Tila',
7
+ 'Size' : 'Koko',
8
+ 'Add files' : 'Lisää tiedostoja',
9
+ 'Stop current upload' : 'Pysäytä nykyinen lataus',
10
+ 'Start uploading queue' : 'Aloita jonon lataus',
11
+ 'Drag files here.' : 'Raahaa tiedostot tänne.',
12
+ 'Start upload' : 'Aloita lataus',
13
+ 'Uploaded %d/%d files': 'Ladattu %d/%d tiedostoa',
14
+ 'Stop upload': 'Pysäytä lataus',
15
+ 'Start upload': 'Aloita lataus',
16
+ '%d files queued': '%d tiedostoa jonossa',
17
+ 'File: %s': 'Tiedosto: %s',
18
+ 'Close': 'Sulje',
19
+ 'Using runtime: ': 'Käytetään ajonaikaista: ',
20
+ 'File: %f, size: %s, max file size: %m': 'Tiedosto: %f, koko: %s, maksimi tiedostokoko: %m',
21
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.',
22
+ 'Upload URL might be wrong or doesn\'t exist': 'Lataus URL saattaa olla väärin tai ei ole olemassa',
23
+ 'Error: File too large: ': 'Virhe: Tiedosto liian suuri: ',
24
+ 'Error: Invalid file extension: ': 'Virhe: Kelpaamaton tiedostopääte: ',
25
+ 'File extension error.': 'Tiedostopäätevirhe.',
26
+ 'File size error.': 'Tiedostokokovirhe.',
27
+ 'File count error.': 'Tiedostolaskentavirhe.',
28
+ 'Init error.': 'Init virhe.',
29
+ 'HTTP Error.': 'HTTP virhe.',
30
+ 'Security error.': 'Tietoturvavirhe.',
31
+ 'Generic error.': 'Yleinen virhe.',
32
+ 'IO error.': 'I/O virhe.'
33
+ });
@@ -0,0 +1,25 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Sélectionnez les fichiers',
4
+ 'Add files to the upload queue and click the start button.' : 'Ajoutez des fichiers à la file et appuyez sur le bouton démarrer.',
5
+ 'Filename' : 'Nom de fichier',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Taille',
8
+ 'Add files' : 'Ajouter Fichiers',
9
+ 'Stop current upload' : 'Arrêter l\'envoi en cours',
10
+ 'Start uploading queue' : 'Démarrer l\'envoi',
11
+ 'Uploaded %d/%d files': '%d/%d fichiers envoyés',
12
+ 'N/A' : 'Non applicable',
13
+ 'Drag files here.' : 'Déposer les fichiers ici.',
14
+ 'File extension error.': 'Erreur extension fichier',
15
+ 'File size error.': 'Erreur taille fichier.',
16
+ 'Init error.': 'Erreur d\'initialisation.',
17
+ 'HTTP Error.': 'Erreur HTTP.',
18
+ 'Security error.': 'Erreur de sécurité.',
19
+ 'Generic error.': 'Erreur générique.',
20
+ 'IO error.': 'Erreur E/S.',
21
+ 'Stop Upload': 'Arrêter les envois.',
22
+ 'Add Files': 'Ajouter des fichiers',
23
+ 'Start Upload': 'Démarrer les envois.',
24
+ '%d files queued': '%d fichiers en attente.'
25
+ });
@@ -0,0 +1,21 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Seleziona i files',
4
+ 'Add files to the upload queue and click the start button.' : 'Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.',
5
+ 'Filename' : 'Nome file',
6
+ 'Status' : 'Stato',
7
+ 'Size' : 'Dimensione',
8
+ 'Add files' : 'Aggiungi file',
9
+ 'Stop current upload' : 'Interrompi il caricamento',
10
+ 'Start uploading queue' : 'Avvia il caricamento',
11
+ 'Uploaded %d/%d files': 'Caricati %d/%d file',
12
+ 'N/A' : 'N/D',
13
+ 'Drag files here.' : 'Trascina i file qui.',
14
+ 'File extension error.': 'Errore estensione file.',
15
+ 'File size error.': 'Errore dimensione file.',
16
+ 'Init error.': 'Errore inizializzazione.',
17
+ 'HTTP Error.': 'Errore HTTP.',
18
+ 'Security error.': 'Errore sicurezza.',
19
+ 'Generic error.': 'Errore generico.',
20
+ 'IO error.': 'Errore IO.'
21
+ });
@@ -0,0 +1,37 @@
1
+ // Japanese
2
+ plupload.addI18n({
3
+ 'Select files' : 'ファイル選択',
4
+ 'Add files to the upload queue and click the start button.' : 'ファイルをアップロードキューに追加してスタートボタンをクリックしてください',
5
+ 'Filename' : 'ファイル名',
6
+ 'Status' : 'ステータス',
7
+ 'Size' : 'サイズ',
8
+ 'Add Files' : 'ファイルを追加',
9
+ 'Stop Upload' : 'アップロード停止',
10
+ 'Start Upload' : 'アップロード',
11
+ 'Add files' : 'ファイルを追加',
12
+ 'Add files.' : 'ファイルを追加',
13
+ 'Stop current upload' : '現在のアップロードを停止',
14
+ 'Start uploading queue' : 'アップロード',
15
+ 'Stop upload' : 'アップロード停止',
16
+ 'Start upload' : 'アップロード',
17
+ 'Uploaded %d/%d files': 'アップロード中 %d/%d ファイル',
18
+ 'N/A' : 'N/A',
19
+ 'Drag files here.' : 'ここにファイルをドラッグ',
20
+ 'File extension error.': 'ファイル拡張子エラー',
21
+ 'File size error.': 'ファイルサイズエラー',
22
+ 'File count error.': 'ファイル数エラー',
23
+ 'Init error.': 'イニシャライズエラー',
24
+ 'HTTP Error.': 'HTTP エラー',
25
+ 'Security error.': 'セキュリティエラー',
26
+ 'Generic error.': 'エラー',
27
+ 'IO error.': 'IO エラー',
28
+ 'File: %s': 'ファイル: %s',
29
+ 'Close': '閉じる',
30
+ '%d files queued': '%d ファイルが追加されました',
31
+ 'Using runtime: ': 'モード: ',
32
+ 'File: %f, size: %s, max file size: %m': 'ファイル: %f, サイズ: %s, 最大ファイルサイズ: %m',
33
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'アップロード可能なファイル数は %d です。余分なファイルは削除されました',
34
+ 'Upload URL might be wrong or doesn\'t exist': 'アップロード先の URL が存在しません',
35
+ 'Error: File too large: ': 'エラー: サイズが大きすぎます: ',
36
+ 'Error: Invalid file extension: ': 'エラー: 拡張子が許可されていません: '
37
+ });
@@ -0,0 +1,33 @@
1
+ // .lv file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Izvēlieties failus',
4
+ 'Add files to the upload queue and click the start button.' : 'Pieveinojiet failus rindai un klikšķiniet uz "Sākt augšupielādi" pogas.',
5
+ 'Filename' : 'Faila nosaukums',
6
+ 'Status' : 'Statuss',
7
+ 'Size' : 'Izmērs',
8
+ 'Add files' : 'Pievienot failus',
9
+ 'Stop current upload' : 'Apturēt pašreizējo augšupielādi',
10
+ 'Start uploading queue' : 'Sākt augšupielādi',
11
+ 'Drag files here.' : 'Ievelciet failus šeit',
12
+ 'Start upload' : 'Sākt augšupielādi',
13
+ 'Uploaded %d/%d files': 'Augšupielādēti %d/%d faili',
14
+ 'Stop upload': 'Pārtraukt augšupielādi',
15
+ 'Start upload': 'Sākt augšupielādi',
16
+ '%d files queued': '%d faili pievienoti rindai',
17
+ 'File: %s': 'Fails: %s',
18
+ 'Close': 'Aizvērt',
19
+ 'Using runtime: ': 'Lieto saskarni: ',
20
+ 'File: %f, size: %s, max file size: %m': 'Fails: %f, izmērs: %s, maksimālais faila izmērs: %m',
21
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Iespējams ielādēt tikai %d failus vienā reizē. Atlikušie faili netika pievienoti',
22
+ 'Upload URL might be wrong or doesn\'t exist': 'Augšupielādes URL varētu būt nepareizs vai neeksistē',
23
+ 'Error: File too large: ': 'Kļūda: Fails pārāk liels: ',
24
+ 'Error: Invalid file extension: ': 'Kļūda: Nekorekts faila paplašinājums:',
25
+ 'File extension error.': 'Faila paplašinājuma kļūda.',
26
+ 'File size error.': 'Faila izmēra kļūda.',
27
+ 'File count error.': 'Failu skaita kļūda',
28
+ 'Init error.': 'Inicializācijas kļūda.',
29
+ 'HTTP Error.': 'HTTP kļūda.',
30
+ 'Security error.': 'Drošības kļūda.',
31
+ 'Generic error.': 'Vispārēja rakstura kļūda.',
32
+ 'IO error.': 'Ievades/Izvades kļūda.'
33
+ });
@@ -0,0 +1,21 @@
1
+ // Dutch
2
+ plupload.addI18n({
3
+ 'Select files' : 'Selecteer bestand(en):',
4
+ 'Add files to the upload queue and click the start button.' : 'Voeg bestanden toe aan de wachtrij en druk op \'Start\'.',
5
+ 'Filename' : 'Bestandsnaam',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Grootte',
8
+ 'Add files' : 'Voeg bestanden toe',
9
+ 'Stop current upload' : 'Stop upload',
10
+ 'Start uploading queue' : 'Start upload',
11
+ 'Uploaded %d/%d files': '%d/%d bestanden ge-upload',
12
+ 'N/A' : 'Niet beschikbaar',
13
+ 'Drag files here.' : 'Sleep bestanden hierheen.',
14
+ 'File extension error.': 'Ongeldig bestandstype.',
15
+ 'File size error.': 'Bestandsgrootte Error.',
16
+ 'Init error.': 'Initialisatie error.',
17
+ 'HTTP Error.': 'HTTP Error.',
18
+ 'Security error.': 'Beveiliging error.',
19
+ 'Generic error.': 'Onbekende error.',
20
+ 'IO error.': 'IO error.'
21
+ });
@@ -0,0 +1,35 @@
1
+ // Brazilian Portuguese
2
+ plupload.addI18n({
3
+ 'Select files' : 'Escolha os arquivos',
4
+ 'Add files to the upload queue and click the start button.' : 'Adicione os arquivos abaixo e clique no botão "Iniciar o envio".',
5
+ 'Filename' : 'Nome do arquivo',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Tamanho',
8
+ 'Add Files' : 'Adicionar arquivo(s)',
9
+ 'Stop Upload' : 'Parar o envio',
10
+ 'Start Upload' : 'Iniciar o envio',
11
+ 'Add files' : 'Adicionar arquivo(s)',
12
+ 'Add files.' : 'Adicionar arquivo(s)',
13
+ 'Stop upload' : 'Parar o envio',
14
+ 'Start upload' : 'Iniciar o envio',
15
+ 'Uploaded %d/%d files': 'Enviado(s) %d/%d arquivo(s)',
16
+ 'N/A' : 'N/D',
17
+ 'Drag files here.' : 'Arraste os arquivos pra cá',
18
+ 'File extension error.': 'Tipo de arquivo não permitido.',
19
+ 'File size error.': 'Tamanho de arquivo não permitido.',
20
+ 'File count error.': 'Erro na contagem dos arquivos',
21
+ 'Init error.': 'Erro inicializando.',
22
+ 'HTTP Error.': 'Erro HTTP.',
23
+ 'Security error.': 'Erro de segurança.',
24
+ 'Generic error.': 'Erro genérico.',
25
+ 'IO error.': 'Erro de E/S.',
26
+ 'File: %s': 'Arquivo: %s',
27
+ 'Close': 'Fechar',
28
+ '%d files queued': '%d arquivo(s)',
29
+ 'Using runtime: ': 'Usando: ',
30
+ 'File: %f, size: %s, max file size: %m': 'Arquivo: %f, tamanho: %s, máximo: %m',
31
+ 'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'Só são aceitos %d arquivos por vez. O que passou disso foi descartado.',
32
+ 'Upload URL might be wrong or doesn\'t exist': 'URL de envio está errada ou não existe',
33
+ 'Error: File too large: ': 'Erro: Arquivo muito grande: ',
34
+ 'Error: Invalid file extension: ': 'Erro: Tipo de arquivo não permitido: '
35
+ });
@@ -0,0 +1,21 @@
1
+ // Russian
2
+ plupload.addI18n({
3
+ 'Select files' : 'Выберите файлы',
4
+ 'Add files to the upload queue and click the start button.' : 'Добавьте файлы в очередь и нажмите кнопку "Загрузить файлы".',
5
+ 'Filename' : 'Имя файла',
6
+ 'Status' : 'Статус',
7
+ 'Size' : 'Размер',
8
+ 'Add files' : 'Добавить файлы',
9
+ 'Stop current upload' : 'Остановить загрузку',
10
+ 'Start uploading queue' : 'Загрузить файлы',
11
+ 'Uploaded %d/%d files': 'Загружено %d из %d файлов',
12
+ 'N/A' : 'N/D',
13
+ 'Drag files here.' : 'Перетащите файлы сюда.',
14
+ 'File extension error.': 'Неправильное расширение файла.',
15
+ 'File size error.': 'Неправильный размер файла.',
16
+ 'Init error.': 'Ошибка инициализации.',
17
+ 'HTTP Error.': 'Ошибка HTTP.',
18
+ 'Security error.': 'Ошибка безопасности.',
19
+ 'Generic error.': 'Общая ошибка.',
20
+ 'IO error.': 'Ошибка ввода-вывода.'
21
+ });
@@ -0,0 +1,12 @@
1
+ // .po file like language pack
2
+ plupload.addI18n({
3
+ 'Select files' : 'Välj filer',
4
+ 'Add files to the upload queue and click the start button.' : 'Lägg till filer till kön och tryck på start.',
5
+ 'Filename' : 'Filnamn',
6
+ 'Status' : 'Status',
7
+ 'Size' : 'Storlek',
8
+ 'Add files' : 'Lägg till filer',
9
+ 'Stop current upload' : 'Stoppa uppladdningen',
10
+ 'Start uploading queue' : 'Starta uppladdningen',
11
+ 'Drag files here.' : 'Dra filer hit'
12
+ });
@@ -0,0 +1 @@
1
+ (function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();no_type_restriction:for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){if(s[q]==="*"){t=[];break no_type_restriction}t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(m,j){var l=h[j.id],r={},k=m.settings.chunk_size,n,o=[];function q(s,u){var t;if(j.status==a.FAILED){return}r.name=j.target_name||j.name;if(k){r.chunk=""+s;r.chunks=""+u}t=o.shift();e.Uploader.upload({url:m.settings.url,files:{file:t},cookies:document.cookies,postvars:a.extend(r,m.settings.multipart_params),progressCallback:function(x){var w,v=0;n[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<n.length;w++){v+=n[w]}j.loaded=v;m.trigger("UploadProgress",j)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(k){m.trigger("ChunkUploaded",j,{chunk:s,chunks:u,response:w.value.body,status:v})}if(o.length>0){q(++s,u)}else{j.status=a.DONE;m.trigger("FileUploaded",j,{response:w.value.body,status:v});if(v>=400){m.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:j,status:v})}}}else{m.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:j,details:w.error})}})}function p(s){j.size=s.size;if(k){e.FileAccess.chunk({file:s,chunkSize:k},function(v){if(v.success){var w=v.value,t=w.length;n=Array(t);for(var u=0;u<t;u++){n[u]=0;o.push(w[u])}q(0,t)}})}else{n=Array(1);o.push(s);q(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(j.name)){BrowserPlus.ImageAlter.transform({file:l,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){p(s.value.file)}})}else{p(l)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
@@ -0,0 +1 @@
1
+ (function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(j){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(i){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(j,h,i){setTimeout(function(){var m=a[j],l,k;if(m){m.trigger("Flash:"+h,i)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(m,o){var k,l,h=0,i=b.body;if(c()<10){o({success:false});return}g[m.id]=false;a[m.id]=m;k=b.getElementById(m.settings.browse_button);l=b.createElement("div");l.id=m.id+"_flash_container";d.extend(l.style,{position:"absolute",top:"0px",background:m.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});l.className="plupload flash";if(m.settings.container){i=b.getElementById(m.settings.container);if(d.getStyle(i,"position")==="static"){i.style.position="relative"}}i.appendChild(l);(function(){var p,q;p='<object id="'+m.id+'_flash" type="application/x-shockwave-flash" data="'+m.settings.flash_swf_url+'" ';if(d.ua.ie){p+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '}p+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+m.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(m.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';if(d.ua.ie){q=b.createElement("div");l.appendChild(q);q.outerHTML=p;q=null}else{l.innerHTML=p}}());function n(){return b.getElementById(m.id+"_flash")}function j(){if(h++>5000){o({success:false});return}if(!g[m.id]){setTimeout(j,1)}}j();k=l=null;m.bind("Flash:Init",function(){var q={},p;n().setFileFilters(m.settings.filters,m.settings.multi_selection);if(g[m.id]){return}g[m.id]=true;m.bind("UploadFile",function(r,t){var u=r.settings,s=m.settings.resize||{};n().uploadFile(q[t.id],u.url,{name:t.target_name||t.name,mime:d.mimeTypes[t.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:u.chunk_size,width:s.width,height:s.height,quality:s.quality,multipart:u.multipart,multipart_params:u.multipart_params||{},file_data_name:u.file_data_name,format:/\.(jpg|jpeg)$/i.test(t.name)?"jpg":"png",headers:u.headers,urlstream_upload:u.urlstream_upload})});m.bind("Flash:UploadProcess",function(s,r){var t=s.getFile(q[r.id]);if(t.status!=d.FAILED){t.loaded=r.loaded;t.size=r.size;s.trigger("UploadProgress",t)}});m.bind("Flash:UploadChunkComplete",function(r,t){var u,s=r.getFile(q[t.id]);u={chunk:t.chunk,chunks:t.chunks,response:t.text};r.trigger("ChunkUploaded",s,u);if(s.status!=d.FAILED){n().uploadNextChunk()}if(t.chunk==t.chunks-1){s.status=d.DONE;r.trigger("FileUploaded",s,{response:t.text})}});m.bind("Flash:SelectFiles",function(r,u){var t,s,v=[],w;for(s=0;s<u.length;s++){t=u[s];w=d.guid();q[w]=t.id;q[t.id]=w;v.push(new d.File(w,t.name,t.size))}if(v.length){m.trigger("FilesAdded",v)}});m.bind("Flash:SecurityError",function(r,s){m.trigger("Error",{code:d.SECURITY_ERROR,message:d.translate("Security error."),details:s.message,file:m.getFile(q[s.id])})});m.bind("Flash:GenericError",function(r,s){m.trigger("Error",{code:d.GENERIC_ERROR,message:d.translate("Generic error."),details:s.message,file:m.getFile(q[s.id])})});m.bind("Flash:IOError",function(r,s){m.trigger("Error",{code:d.IO_ERROR,message:d.translate("IO error."),details:s.message,file:m.getFile(q[s.id])})});m.bind("Flash:ImageError",function(r,s){m.trigger("Error",{code:parseInt(s.code,10),message:d.translate("Image error."),file:m.getFile(q[s.id])})});m.bind("Flash:StageEvent:rollOver",function(r){var s,t;s=b.getElementById(m.settings.browse_button);t=r.settings.browse_button_hover;if(s&&t){d.addClass(s,t)}});m.bind("Flash:StageEvent:rollOut",function(r){var s,t;s=b.getElementById(m.settings.browse_button);t=r.settings.browse_button_hover;if(s&&t){d.removeClass(s,t)}});m.bind("Flash:StageEvent:mouseDown",function(r){var s,t;s=b.getElementById(m.settings.browse_button);t=r.settings.browse_button_active;if(s&&t){d.addClass(s,t);d.addEvent(b.body,"mouseup",function(){d.removeClass(s,t)},r.id)}});m.bind("Flash:StageEvent:mouseUp",function(r){var s,t;s=b.getElementById(m.settings.browse_button);t=r.settings.browse_button_active;if(s&&t){d.removeClass(s,t)}});m.bind("Flash:ExifData",function(r,s){m.trigger("ExifData",m.getFile(q[s.id]),s.data)});m.bind("Flash:GpsData",function(r,s){m.trigger("GpsData",m.getFile(q[s.id]),s.data)});m.bind("QueueChanged",function(r){m.refresh()});m.bind("FilesRemoved",function(r,t){var s;for(s=0;s<t.length;s++){n().removeFile(q[t[s].id])}});m.bind("StateChanged",function(r){m.refresh()});m.bind("Refresh",function(r){var s,t,u;n().setFileFilters(m.settings.filters,m.settings.multi_selection);s=b.getElementById(r.settings.browse_button);if(s){t=d.getPos(s,b.getElementById(r.settings.container));u=d.getSize(s);d.extend(b.getElementById(r.id+"_flash_container").style,{top:t.y+"px",left:t.x+"px",width:u.w+"px",height:u.h+"px"})}});m.bind("Destroy",function(r){var s;d.removeAllEvents(b.body,r.id);delete g[r.id];delete a[r.id];s=b.getElementById(r.id+"_flash_container");if(s){i.removeChild(s)}});o({success:true})})}})})(window,document,plupload);