Permalink
Browse files

moved the class comment to top for YUI doc generation

  • Loading branch information...
1 parent 6716e4a commit 23530b015ed26e14531b5ecf622bdf82bd00a417 @rmsguhan committed Aug 24, 2011
Showing with 33 additions and 33 deletions.
  1. +16 −16 js/gallery-clipboard-debug.js
  2. +1 −1 js/gallery-clipboard-min.js
  3. +16 −16 js/gallery-clipboard.js
View
32 js/gallery-clipboard-debug.js
@@ -35,6 +35,22 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+ /**
+ * The ClipBoard class is desinged to be a node plugin and a wrapper over the flash movie
+ * to copy text contents to the OS clipboard. The class will place the flash movie below the given
+ * node so that a user action can trigger the copy of contents to the OS clip board using
+ * Flash's System.setClipboard method. Starting from flash 10, the clipboard can be set only
+ * off a user initiated event. So the JS class shall only set the string to be copied and will
+ * allow the flash movie's event to capture the user action and set the clipboard contents
+ * @class ClipBoard
+ * @constructor
+ * @extends Y.Plugin.Base
+ */
+ function ClipBoard(config) {
+ ClipBoard.superclass.constructor.apply(this, arguments);
+ }
+
/**
* Template for embedding the flash movie in the object tag. Mainly for IE browsers
* @property OBJECT_TEMPLATE
@@ -108,22 +124,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
unsetCache = function(id, ev) {
delete flashEventCache[id][ev];
};
-
-
- /**
- * The ClipBoard class is desinged to be a node plugin and a wrapper over the flash movie
- * to copy text contents to the OS clipboard. The class will place the flash movie below the given
- * node so that a user action can trigger the copy of contents to the OS clip board using
- * Flash's System.setClipboard method. Starting from flash 10, the clipboard can be set only
- * off a user initiated event. So the JS class shall only set the string to be copied and will
- * allow the flash movie's event to capture the user action and set the clipboard contents
- * @class ClipBoard
- * @constructor
- * @extends Y.Plugin.Base
- */
- function ClipBoard(config) {
- ClipBoard.superclass.constructor.apply(this, arguments);
- }
ClipBoard.NAME = COMPONENT_NAME;
ClipBoard.NS = COMPONENT_NAME;
View
2 js/gallery-clipboard-min.js
@@ -1 +1 @@
-YUI.add("gallery-clipboard",function(c){var r='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+' codebase="{__PROTOCOL__}download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+'width="{__WIDTH__}" height="{__HEIGHT__}" id="{__MOVIEID__}" '+'align="middle"><param name="allowScriptAccess" value="always" embed-type="menu"/>'+'<param name="allowFullScreen" value="false" />'+'<param name="movie" value="{__MOVIEPATH__}" />'+'<param name="loop" value="false" /><param name="menu" value="false" />'+'<param name="quality" value="best" /><param name="bgcolor" value="#ffffff" />'+'<param name="flashvars" value="{__FLASHVARS__}"/><param name="wmode" '+'value="transparent"/></object>',v='<embed id="{__MOVIEID__}" src="{__MOVIEPATH__}" loop="false" '+'menu="false" quality="best" bgcolor="#ffffff" width="{__WIDTH__}" '+'height="{__HEIGHT__}" name="{__MOVIEID__}" align="middle" '+'allowScriptAccess="always" allowFullScreen="false" '+'type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" '+'flashvars="{__FLASHVARS__}" wmode="transparent" embed-type="menu" />',m="ClipBoardCopy.swf",a="clipboard",s="cp",q=window,e="ClipboardInterfaceFn",f=window.location.href.match(/^https/i)?"https://":"http://",d="id={__MOVIEID__}&ns={__NS__}&width={__WIDTH__}&height={__HEIGHT__}"+"&fn={__FN__}&domain={__DOMAIN__}",i="-2000px",t=false,u={},o={},l=function(w){if(c.Lang.isString(w)||c.Lang.isArray(w)){return(w.length==0)?true:false;}return false;},b=c.Lang.isUndefined,n=c.Lang.isNull,k=c.Lang.isNumber,j=c.Lang.isString,h=function(y){var w=u;for(var z in w){for(var x in w[z]){if(x===y){return false;}}}return true;},g=function(x,w){delete u[x][w];};function p(w){p.superclass.constructor.apply(this,arguments);}p.NAME=a;p.NS=a;p.ATTRS={page:{value:c.one("body")},id:{value:""},moviepath:{value:""},global:{value:q},domain:{value:"*.yahoo.com"},movieloaded:{value:false}};c.extend(p,c.Plugin.Base,{initializer:function(w){var A=this,z=A.get("global"),x=e,y;if(l(A.get("id"))){this.set("id",c.guid(a+"_"));}A._host=A.get("host");A._movie=null;if(l(A._host.get("id"))){A._host.set("id",A.get("id"));}else{A.set("id",A._host.get("id"));}y=A.getHostDimensions();if(b(z[x])){z[x]=A._flashInterface;}A._host.publish(a+":"+"load",{emitFacade:true,preventable:true,context:A._host,bubbles:true,fireOnce:true});c.on(a+":"+"load",function(B){t=true;o.params=B;A._host.fire(a+":"+"load",B);A.set("movieloaded",true);});A._movie=A._getFlashMovieObj(y,x);A._alignMovie(y,A._host);A.hide();A.beforeHostMethod("setAttribute",function(B,C){if(B==="copy"){A.copy(C);A.show();A.focus();}});A.afterHostMethod("on",function(B){if(B===a+":load"&&t){A._host.fire(a+":"+"load",o.params);A.set("movieloaded",true);}});},_destructor:function(){var w=this;w.get("boundingBox").destroy(true);t=false;o={};u={};},getHostDimensions:function(){var y=this,x=y._host,w=y._getNodeSize(x);return{w:parseInt(w[0],10),h:parseInt(w[1],10),xy:x.getXY()};},show:function(){var w=this;w._alignMovie(w.getHostDimensions());},focus:function(){var w=this._movie;if(w.focus){w.focus();}},hide:function(){var x=this,w=x.get("boundingBox");w.setStyles({"left":i});},copy:function(x){var y=this;try{y._movie._node.copy(x,y.get("id"));}catch(w){c.fire(a+":error",{"error":w.message});}},setEvent:function(A,w,x){try{var z=this;movie=z._movie._node,cache=u,obj={},id=this.get("id");if(b(cache[id])){cache[id]={};}cache[id][A]=w;obj[A]={"docopy":x?true:false};if(movie.setupEvents){movie.setupEvents(obj);}}catch(y){c.fire(a+":error",{"error":y.message});}},removeEvent:function(y){try{var w=u,C=this,B=0,z=0,x=C.get("id"),E=[],A=C._movie._node;if(j(y)){y=[y];}for(z=y.length;B<z;B++){g(x,y[B]);if(h(y[B])){E.push(y[B]);}}if(E.length>0&&A.removeEvents){A.removeEvents(E);}}catch(D){c.fire(a+":error",{"error":D.message});}return true;},_alignMovie:function(B,x){var C=this,y=b(x)?C._host:x,A=C.get("boundingBox"),z=1,w=parseInt(y.getStyle("zIndex"),10);if(k(w)){z=w+1;}A.setXY(B.xy);A.setStyles({zIndex:z});return A;},_getFlashMovieObj:function(B,A){var z=this,x=a,D={"__PROTOCOL__":f,"__MOVIEID__":x,"__WIDTH__":B.w,"__HEIGHT__":B.h,"__MOVIEPATH__":z.get("moviepath")+m,"__NS__":p.NS,"__FN__":A,"__DOMAIN__":z.get("domain")},E=c.UA.ie?r:v,C=z.get("page"),y=z.get("page").one("#"+x),w;D["__FLASHVARS__"]=c.substitute(d,D);if(n(y)){w=c.Node.create("<div></div>");w.set("innerHTML",c.substitute(E,D));w.setStyles({"width":B.w,height:B.h,position:"absolute"});w.set("className",a+"-wrapper");C.appendChild(w);y=z.get("page").one("#"+x);o.host=z._host;}this.set("boundingBox",y.get("parentNode"));y.setStyle("outline","none");return y;},_flashInterface:function(z,w){try{var A,y,x=u;if(z==a+":event"){A=w.transaction,y=c.one("#"+A);if(x[A][w.event]){x[A][w.event].call(y,w);}}else{c.fire(z,w);}}catch(B){c.fire(a+":error",c.mix({"error":B.message},w));}},_getNodeSize:function(w){var y=[],x=function(z,A){return parseInt(A.getComputedStyle(z),10);};y[0]=x("marginLeft",w)+x("paddingLeft",w)+x("borderLeftWidth",w)+x("width",w)+x("borderRightWidth",w)+x("paddingRight",w)+x("marginRight",w);y[1]=x("marginTop",w)+x("paddingTop",w)+x("borderTopWidth",w)+x("height",w)+x("borderBottomWidth",w)+x("paddingBottom",w)+x("marginBottom",w);return y;}});c.ClipBoard=p;},"@VERSION@",{skinnable:false,requires:["node","plugin","substitute"]});
+YUI.add("gallery-clipboard",function(c){function p(w){p.superclass.constructor.apply(this,arguments);}var r='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+' codebase="{__PROTOCOL__}download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+'width="{__WIDTH__}" height="{__HEIGHT__}" id="{__MOVIEID__}" '+'align="middle"><param name="allowScriptAccess" value="always" embed-type="menu"/>'+'<param name="allowFullScreen" value="false" />'+'<param name="movie" value="{__MOVIEPATH__}" />'+'<param name="loop" value="false" /><param name="menu" value="false" />'+'<param name="quality" value="best" /><param name="bgcolor" value="#ffffff" />'+'<param name="flashvars" value="{__FLASHVARS__}"/><param name="wmode" '+'value="transparent"/></object>',v='<embed id="{__MOVIEID__}" src="{__MOVIEPATH__}" loop="false" '+'menu="false" quality="best" bgcolor="#ffffff" width="{__WIDTH__}" '+'height="{__HEIGHT__}" name="{__MOVIEID__}" align="middle" '+'allowScriptAccess="always" allowFullScreen="false" '+'type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" '+'flashvars="{__FLASHVARS__}" wmode="transparent" embed-type="menu" />',n="ClipBoardCopy.swf",a="clipboard",s="cp",q=window,e="ClipboardInterfaceFn",f=window.location.href.match(/^https/i)?"https://":"http://",d="id={__MOVIEID__}&ns={__NS__}&width={__WIDTH__}&height={__HEIGHT__}"+"&fn={__FN__}&domain={__DOMAIN__}",i="-2000px",t=false,u={},o={},l=function(w){if(c.Lang.isString(w)||c.Lang.isArray(w)){return(w.length==0)?true:false;}return false;},b=c.Lang.isUndefined,m=c.Lang.isNull,k=c.Lang.isNumber,j=c.Lang.isString,h=function(y){var w=u;for(var z in w){for(var x in w[z]){if(x===y){return false;}}}return true;},g=function(x,w){delete u[x][w];};p.NAME=a;p.NS=a;p.ATTRS={page:{value:c.one("body")},id:{value:""},moviepath:{value:""},global:{value:q},domain:{value:"*.yahoo.com"},movieloaded:{value:false}};c.extend(p,c.Plugin.Base,{initializer:function(w){var A=this,z=A.get("global"),x=e,y;if(l(A.get("id"))){this.set("id",c.guid(a+"_"));}A._host=A.get("host");A._movie=null;if(l(A._host.get("id"))){A._host.set("id",A.get("id"));}else{A.set("id",A._host.get("id"));}y=A.getHostDimensions();if(b(z[x])){z[x]=A._flashInterface;}A._host.publish(a+":"+"load",{emitFacade:true,preventable:true,context:A._host,bubbles:true,fireOnce:true});c.on(a+":"+"load",function(B){t=true;o.params=B;A._host.fire(a+":"+"load",B);A.set("movieloaded",true);});A._movie=A._getFlashMovieObj(y,x);A._alignMovie(y,A._host);A.hide();A.beforeHostMethod("setAttribute",function(B,C){if(B==="copy"){A.copy(C);A.show();A.focus();}});A.afterHostMethod("on",function(B){if(B===a+":load"&&t){A._host.fire(a+":"+"load",o.params);A.set("movieloaded",true);}});},_destructor:function(){var w=this;w.get("boundingBox").destroy(true);t=false;o={};u={};},getHostDimensions:function(){var y=this,x=y._host,w=y._getNodeSize(x);return{w:parseInt(w[0],10),h:parseInt(w[1],10),xy:x.getXY()};},show:function(){var w=this;w._alignMovie(w.getHostDimensions());},focus:function(){var w=this._movie;if(w.focus){w.focus();}},hide:function(){var x=this,w=x.get("boundingBox");w.setStyles({"left":i});},copy:function(x){var y=this;try{y._movie._node.copy(x,y.get("id"));}catch(w){c.fire(a+":error",{"error":w.message});}},setEvent:function(A,w,x){try{var z=this;movie=z._movie._node,cache=u,obj={},id=this.get("id");if(b(cache[id])){cache[id]={};}cache[id][A]=w;obj[A]={"docopy":x?true:false};if(movie.setupEvents){movie.setupEvents(obj);}}catch(y){c.fire(a+":error",{"error":y.message});}},removeEvent:function(y){try{var w=u,C=this,B=0,z=0,x=C.get("id"),E=[],A=C._movie._node;if(j(y)){y=[y];}for(z=y.length;B<z;B++){g(x,y[B]);if(h(y[B])){E.push(y[B]);}}if(E.length>0&&A.removeEvents){A.removeEvents(E);}}catch(D){c.fire(a+":error",{"error":D.message});}return true;},_alignMovie:function(B,x){var C=this,y=b(x)?C._host:x,A=C.get("boundingBox"),z=1,w=parseInt(y.getStyle("zIndex"),10);if(k(w)){z=w+1;}A.setXY(B.xy);A.setStyles({zIndex:z});return A;},_getFlashMovieObj:function(B,A){var z=this,x=a,D={"__PROTOCOL__":f,"__MOVIEID__":x,"__WIDTH__":B.w,"__HEIGHT__":B.h,"__MOVIEPATH__":z.get("moviepath")+n,"__NS__":p.NS,"__FN__":A,"__DOMAIN__":z.get("domain")},E=c.UA.ie?r:v,C=z.get("page"),y=z.get("page").one("#"+x),w;D["__FLASHVARS__"]=c.substitute(d,D);if(m(y)){w=c.Node.create("<div></div>");w.set("innerHTML",c.substitute(E,D));w.setStyles({"width":B.w,height:B.h,position:"absolute"});w.set("className",a+"-wrapper");C.appendChild(w);y=z.get("page").one("#"+x);o.host=z._host;}this.set("boundingBox",y.get("parentNode"));y.setStyle("outline","none");return y;},_flashInterface:function(z,w){try{var A,y,x=u;if(z==a+":event"){A=w.transaction,y=c.one("#"+A);if(x[A][w.event]){x[A][w.event].call(y,w);}}else{c.fire(z,w);}}catch(B){c.fire(a+":error",c.mix({"error":B.message},w));}},_getNodeSize:function(w){var y=[],x=function(z,A){return parseInt(A.getComputedStyle(z),10);};y[0]=x("marginLeft",w)+x("paddingLeft",w)+x("borderLeftWidth",w)+x("width",w)+x("borderRightWidth",w)+x("paddingRight",w)+x("marginRight",w);y[1]=x("marginTop",w)+x("paddingTop",w)+x("borderTopWidth",w)+x("height",w)+x("borderBottomWidth",w)+x("paddingBottom",w)+x("marginBottom",w);return y;}});c.ClipBoard=p;},"@VERSION@",{skinnable:false,requires:["node","plugin","substitute"]});
View
32 js/gallery-clipboard.js
@@ -35,6 +35,22 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+ /**
+ * The ClipBoard class is desinged to be a node plugin and a wrapper over the flash movie
+ * to copy text contents to the OS clipboard. The class will place the flash movie below the given
+ * node so that a user action can trigger the copy of contents to the OS clip board using
+ * Flash's System.setClipboard method. Starting from flash 10, the clipboard can be set only
+ * off a user initiated event. So the JS class shall only set the string to be copied and will
+ * allow the flash movie's event to capture the user action and set the clipboard contents
+ * @class ClipBoard
+ * @constructor
+ * @extends Y.Plugin.Base
+ */
+ function ClipBoard(config) {
+ ClipBoard.superclass.constructor.apply(this, arguments);
+ }
+
/**
* Template for embedding the flash movie in the object tag. Mainly for IE browsers
* @property OBJECT_TEMPLATE
@@ -108,22 +124,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
unsetCache = function(id, ev) {
delete flashEventCache[id][ev];
};
-
-
- /**
- * The ClipBoard class is desinged to be a node plugin and a wrapper over the flash movie
- * to copy text contents to the OS clipboard. The class will place the flash movie below the given
- * node so that a user action can trigger the copy of contents to the OS clip board using
- * Flash's System.setClipboard method. Starting from flash 10, the clipboard can be set only
- * off a user initiated event. So the JS class shall only set the string to be copied and will
- * allow the flash movie's event to capture the user action and set the clipboard contents
- * @class ClipBoard
- * @constructor
- * @extends Y.Plugin.Base
- */
- function ClipBoard(config) {
- ClipBoard.superclass.constructor.apply(this, arguments);
- }
ClipBoard.NAME = COMPONENT_NAME;
ClipBoard.NS = COMPONENT_NAME;

0 comments on commit 23530b0

Please sign in to comment.