diff --git a/ZeroClipboard.js b/ZeroClipboard.js index e7c3e413..beeb428c 100644 --- a/ZeroClipboard.js +++ b/ZeroClipboard.js @@ -4,7 +4,7 @@ * Copyright 2012 Jon Rohan, James M. Greene, . * Released under the MIT license * http://jonrohan.github.com/ZeroClipboard/ - * v1.1.5 + * v1.1.6 */(function() { "use strict"; var ZeroClipboard = {}; @@ -116,7 +116,7 @@ ZeroClipboard.Client.prototype.setHandCursor = function(enabled) { if (this.ready()) this.flashBridge.setHandCursor(enabled); }; - ZeroClipboard.version = "1.1.5"; + ZeroClipboard.version = "1.1.6"; ZeroClipboard._moviePath = "ZeroClipboard.swf"; ZeroClipboard._client = null; ZeroClipboard.setMoviePath = function(path) { diff --git a/ZeroClipboard.min.js b/ZeroClipboard.min.js index e50d0ef7..ea452748 100644 --- a/ZeroClipboard.min.js +++ b/ZeroClipboard.min.js @@ -4,5 +4,5 @@ * Copyright 2012 Jon Rohan, James M. Greene, . * Released under the MIT license * http://jonrohan.github.com/ZeroClipboard/ - * v1.1.5 - */(function(){function b(a,b){var c=a.style[b];a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));if(c=="auto"&&b=="cursor"){var d=["a"];for(var e=0;e=0?"&":"?")+"nocache="+(new Date).getTime()}function c(){var b=[];return a._trustedDomain&&b.push("trustedDomain="+a._trustedDomain),b.join("&")}this.htmlBridge=a.$("#global-zeroclipboard-html-bridge");if(this.htmlBridge.length){this.htmlBridge=this.htmlBridge[0],this.flashBridge=document["global-zeroclipboard-flash-bridge"];return}var d=' ';this.htmlBridge=document.createElement("div"),this.htmlBridge.id="global-zeroclipboard-html-bridge",this.htmlBridge.setAttribute("class","global-zeroclipboard-container"),this.htmlBridge.setAttribute("data-clipboard-ready",!1),this.htmlBridge.style.position="absolute",this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.style.width="15px",this.htmlBridge.style.height="15px",this.htmlBridge.style.zIndex="9999",this.htmlBridge.innerHTML=d,document.body.appendChild(this.htmlBridge),this.flashBridge=document["global-zeroclipboard-flash-bridge"]},a.Client.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),a.currentElement.removeClass("zeroclipboard-is-active"),delete a.currentElement},a.Client.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return a==="true"||a===!0},a.Client.prototype.setCurrent=function(c){a.currentElement=c,this.reposition(),this.setText(this._text||c.getAttribute("data-clipboard-text")),c.getAttribute("title")&&this.setTitle(c.getAttribute("title")),b(c,"cursor")=="pointer"?this.setHandCursor(!0):this.setHandCursor(!1)},a.Client.prototype.reposition=function(){if(!a.currentElement)return!1;var b=d(a.currentElement);this.htmlBridge.style.top=b.top+"px",this.htmlBridge.style.left=b.left+"px",this.htmlBridge.style.width=b.width+"px",this.htmlBridge.style.height=b.height+"px",this.htmlBridge.style.zIndex=b.zIndex+1,this.setSize(b.width,b.height)},a.Client.prototype.setText=function(a){a&&a!==""&&(this._text=a,this.ready()&&this.flashBridge.setText(a))},a.Client.prototype.resetText=function(){this._text=null},a.Client.prototype.setTitle=function(a){a&&a!==""&&this.htmlBridge.setAttribute("title",a)},a.Client.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},a.Client.prototype.setHandCursor=function(a){this.ready()&&this.flashBridge.setHandCursor(a)},a.version="1.1.5",a._moviePath="ZeroClipboard.swf",a._client=null,a.setMoviePath=function(a){this._moviePath=a},a.setTrustedDomain=function(a){this._trustedDomain=a},a.destroy=function(){var b=a.$("#global-zeroclipboard-html-bridge");if(!b.length)return;delete a._client;var c=b[0];c.parentNode.removeChild(c)},a.detectFlashSupport=function(){var a=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a},a.dispatch=function(b,c){a._client.receiveEvent(b,c)},a.Client.prototype.on=function(b,c){var d=b.toString().split(/\s/g);for(var e=0;e=0?"&":"?")+"nocache="+(new Date).getTime()}function c(){var b=[];return a._trustedDomain&&b.push("trustedDomain="+a._trustedDomain),b.join("&")}this.htmlBridge=a.$("#global-zeroclipboard-html-bridge");if(this.htmlBridge.length){this.htmlBridge=this.htmlBridge[0],this.flashBridge=document["global-zeroclipboard-flash-bridge"];return}var d=' ';this.htmlBridge=document.createElement("div"),this.htmlBridge.id="global-zeroclipboard-html-bridge",this.htmlBridge.setAttribute("class","global-zeroclipboard-container"),this.htmlBridge.setAttribute("data-clipboard-ready",!1),this.htmlBridge.style.position="absolute",this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.style.width="15px",this.htmlBridge.style.height="15px",this.htmlBridge.style.zIndex="9999",this.htmlBridge.innerHTML=d,document.body.appendChild(this.htmlBridge),this.flashBridge=document["global-zeroclipboard-flash-bridge"]},a.Client.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),a.currentElement.removeClass("zeroclipboard-is-active"),delete a.currentElement},a.Client.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return a==="true"||a===!0},a.Client.prototype.setCurrent=function(c){a.currentElement=c,this.reposition(),this.setText(this._text||c.getAttribute("data-clipboard-text")),c.getAttribute("title")&&this.setTitle(c.getAttribute("title")),b(c,"cursor")=="pointer"?this.setHandCursor(!0):this.setHandCursor(!1)},a.Client.prototype.reposition=function(){if(!a.currentElement)return!1;var b=d(a.currentElement);this.htmlBridge.style.top=b.top+"px",this.htmlBridge.style.left=b.left+"px",this.htmlBridge.style.width=b.width+"px",this.htmlBridge.style.height=b.height+"px",this.htmlBridge.style.zIndex=b.zIndex+1,this.setSize(b.width,b.height)},a.Client.prototype.setText=function(a){a&&a!==""&&(this._text=a,this.ready()&&this.flashBridge.setText(a))},a.Client.prototype.resetText=function(){this._text=null},a.Client.prototype.setTitle=function(a){a&&a!==""&&this.htmlBridge.setAttribute("title",a)},a.Client.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},a.Client.prototype.setHandCursor=function(a){this.ready()&&this.flashBridge.setHandCursor(a)},a.version="1.1.6",a._moviePath="ZeroClipboard.swf",a._client=null,a.setMoviePath=function(a){this._moviePath=a},a.setTrustedDomain=function(a){this._trustedDomain=a},a.destroy=function(){var b=a.$("#global-zeroclipboard-html-bridge");if(!b.length)return;delete a._client;var c=b[0];c.parentNode.removeChild(c)},a.detectFlashSupport=function(){var a=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a},a.dispatch=function(b,c){a._client.receiveEvent(b,c)},a.Client.prototype.on=function(b,c){var d=b.toString().split(/\s/g);for(var e=0;e