diff --git a/dest/ng-clip.min.js b/dest/ng-clip.min.js index 72711a0..e682487 100644 --- a/dest/ng-clip.min.js +++ b/dest/ng-clip.min.js @@ -1,2 +1,2 @@ /*! ngClip 23-06-2014 */ -"use strict";angular.module("ngClipboard",[]).provider("ngClip",function(){var a=this;return this.path="//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.1/ZeroClipboard.swf",{setPath:function(b){a.path=b},$get:function(){return{path:a.path}}}}).run(["ngClip",function(a){ZeroClipboard.config({moviePath:a.path,trustedDomains:["*"],allowScriptAccess:"always",forceHandCursor:!0})}]).directive("clipCopy",["ngClip",function(){return{scope:{clipCopy:"&",clipClick:"&"},restrict:"A",link:function(a,b,c){var d=new ZeroClipboard(b);""===c.clipCopy&&(a.clipCopy=function(){return b[0].previousElementSibling.innerText}),d.on("ready",function(){d.on("copy",function(b){var c=b.clipboardData;c.setData("text/plain",a.$eval(a.clipCopy))}),d.on("aftercopy",function(){angular.isDefined(c.clipClick)&&a.$apply(a.clipClick)}),a.$on("$destroy",function(){d.destroy()})})}}}]); \ No newline at end of file +"use strict";angular.module("ngClipboard",[]).provider("ngClip",function(){var a=this;return this.path="//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.1/ZeroClipboard.swf",{setPath:function(b){a.path=b},$get:function(){return{path:a.path}}}}).run(["ngClip",function(a){ZeroClipboard.config({swfPath:a.path,trustedDomains:["*"],allowScriptAccess:"always",forceHandCursor:!0})}]).directive("clipCopy",["ngClip",function(){return{scope:{clipCopy:"&",clipClick:"&"},restrict:"A",link:function(a,b,c){var d=new ZeroClipboard(b);""===c.clipCopy&&(a.clipCopy=function(){return b[0].previousElementSibling.innerText}),d.on("ready",function(){d.on("copy",function(b){var c=b.clipboardData;c.setData("text/plain",a.$eval(a.clipCopy))}),d.on("aftercopy",function(){angular.isDefined(c.clipClick)&&a.$apply(a.clipClick)}),a.$on("$destroy",function(){d.destroy()})})}}}]); \ No newline at end of file diff --git a/src/ngClip.js b/src/ngClip.js index 67e2e4c..d90be2b 100644 --- a/src/ngClip.js +++ b/src/ngClip.js @@ -19,7 +19,7 @@ angular.module('ngClipboard', []). }). run(['ngClip', function(ngClip) { ZeroClipboard.config({ - moviePath: ngClip.path, + swfPath: ngClip.path, trustedDomains: ["*"], allowScriptAccess: "always", forceHandCursor: true