lib/har/viewer/scripts/downloadify/js/downloadify.min.js in har-0.0.9 vs lib/har/viewer/scripts/downloadify/js/downloadify.min.js in har-0.1.0

- old
+ new

@@ -1,6 +2 @@ -(function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(b){if(b=Downloadify.queue[b])return b.getData();return""},getFileNameForSave:function(b){if(b=Downloadify.queue[b])return b.getFilename();return""},saveComplete:function(b){(b=Downloadify.queue[b])&&b.complete();return true},saveCancel:function(b){(b=Downloadify.queue[b])&&b.cancel();return true},saveError:function(b){(b=Downloadify.queue[b])&&b.error();return true},addToQueue:function(b){Downloadify.queue[b.queue_name]= -b},getUID:function(b){if(b.id=="")b.id="downloadify_"+Downloadify.uid++;return b.id}};Downloadify.create=function(b,c){b=typeof b=="string"?document.getElementById(b):b;return new Downloadify.Container(b,c)};Downloadify.Container=function(b,c){function d(){a.options=c;if(!a.options.append)a.el.innerHTML="";a.flashContainer=document.createElement("span");a.el.appendChild(a.flashContainer);a.queue_name=Downloadify.getUID(a.flashContainer);if(typeof a.options.filename==="function")a.filenameCallback= -a.options.filename;else if(a.options.filename)a.filename=a.options.filename;if(typeof a.options.data==="function")a.dataCallback=a.options.data;else if(a.options.data)a.data=a.options.data;var e={queue_name:a.queue_name,width:a.options.width,height:a.options.height},f={allowScriptAccess:"always"},g={id:a.flashContainer.id,name:a.flashContainer.id};if(a.options.enabled===false)a.enabled=false;if(a.options.transparent===true)f.wmode="transparent";if(a.options.downloadImage)e.downloadImage=a.options.downloadImage; -swfobject.embedSWF(a.options.swf,a.flashContainer.id,a.options.width,a.options.height,"10",null,e,f,g);Downloadify.addToQueue(a)}var a=this;a.el=b;a.enabled=true;a.dataCallback=null;a.filenameCallback=null;a.data=null;a.filename=null;a.enable=function(){document.getElementById(a.flashContainer.id).setEnabled(true);a.enabled=true};a.disable=function(){document.getElementById(a.flashContainer.id).setEnabled(false);a.enabled=false};a.getData=function(){if(!a.enabled)return"";return a.dataCallback?a.dataCallback(): -a.data?a.data:""};a.getFilename=function(){return a.filenameCallback?a.filenameCallback():a.filename?a.filename:""};a.complete=function(){typeof a.options.onComplete==="function"&&a.options.onComplete()};a.cancel=function(){typeof a.options.onCancel==="function"&&a.options.onCancel()};a.error=function(){typeof a.options.onError==="function"&&a.options.onError()};d()};Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:true,append:false}})(); -typeof jQuery!="undefined"&&function(b){b.fn.downloadify=function(c){return this.each(function(){c=b.extend({},Downloadify.defaultOptions,c);var d=Downloadify.create(this,c);b(this).data("Downloadify",d)})}}(jQuery); +(function(){Downloadify=window.Downloadify={queue:{},uid:(new Date).getTime(),getTextForSave:function(a){if(a=Downloadify.queue[a])return a.getData();return""},getFileNameForSave:function(a){if(a=Downloadify.queue[a])return a.getFilename();return""},saveComplete:function(a){(a=Downloadify.queue[a])&&a.complete();return!0},saveCancel:function(a){(a=Downloadify.queue[a])&&a.cancel();return!0},saveError:function(a){(a=Downloadify.queue[a])&&a.error();return!0},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){a.id==""&&(a.id="downloadify_"+Downloadify.uid++);return a.id}},Downloadify.create=function(a,b){a=typeof a=="string"?document.getElementById(a):a;return new Downloadify.Container(a,b)},Downloadify.Container=function(a,b){function d(){c.options=b,c.options.append||(c.el.innerHTML=""),c.flashContainer=document.createElement("span"),c.el.appendChild(c.flashContainer),c.queue_name=Downloadify.getUID(c.flashContainer),typeof c.options.filename==="function"?c.filenameCallback=c.options.filename:c.options.filename&&(c.filename=c.options.filename),typeof c.options.data==="function"?c.dataCallback=c.options.data:c.options.data&&(c.data=c.options.data);var a={queue_name:c.queue_name,width:c.options.width,height:c.options.height},d={allowScriptAccess:"always"},e={id:c.flashContainer.id,name:c.flashContainer.id};c.options.enabled===!1&&(c.enabled=!1),c.options.transparent===!0&&(d.wmode="transparent"),c.options.downloadImage&&(a.downloadImage=c.options.downloadImage),swfobject.embedSWF(c.options.swf,c.flashContainer.id,c.options.width,c.options.height,"10",null,a,d,e),Downloadify.addToQueue(c)}var c=this;c.el=a,c.enabled=!0,c.dataCallback=null,c.filenameCallback=null,c.data=null,c.filename=null,c.enable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!0),c.enabled=!0},c.disable=function(){var a=document.getElementById(c.flashContainer.id);a.setEnabled(!1),c.enabled=!1},c.getData=function(){if(!c.enabled)return"";return c.dataCallback?c.dataCallback():c.data?c.data:""},c.getFilename=function(){return c.filenameCallback?c.filenameCallback():c.filename?c.filename:""},c.complete=function(){typeof c.options.onComplete==="function"&&c.options.onComplete()},c.cancel=function(){typeof c.options.onCancel==="function"&&c.options.onCancel()},c.error=function(){typeof c.options.onError==="function"&&c.options.onError()},d()},Downloadify.defaultOptions={swf:"media/downloadify.swf",downloadImage:"images/download.png",width:100,height:30,transparent:!0,append:!1}})(),typeof jQuery!="undefined"&&function(a){a.fn.downloadify=function(c){return this.each(function(){c=a.extend({},Downloadify.defaultOptions,c);var d=Downloadify.create(this,c);a(this).data("Downloadify",d)})}}(jQuery) \ No newline at end of file