summaryrefslogtreecommitdiff
path: root/js/dojo-1.6/dojox/fx/ext-dojo
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo-1.6/dojox/fx/ext-dojo')
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.js73
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.xd.js79
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/NodeList.js73
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/NodeList.xd.js79
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/complex.js180
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/complex.xd.js184
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/reverse.js109
-rw-r--r--js/dojo-1.6/dojox/fx/ext-dojo/reverse.xd.js115
8 files changed, 892 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.js b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.js
new file mode 100644
index 0000000..cf05555
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.js
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.fx.ext-dojo.NodeList-style"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.NodeList-style"] = true;
+dojo.provide("dojox.fx.ext-dojo.NodeList-style");
+dojo.experimental("dojox.fx.ext-dojo.NodeList-style");
+// summary:
+// Core extensions to `dojo.NodeList` providing addtional fx to `dojo.NodeList-fx`
+// from `dojox.fx.style`
+//
+// description:
+// A Package to extend dojo base NodeList with fx provided by the `dojox.fx` project.
+// These are experimental animations, in an experimental
+
+dojo.require("dojo.NodeList-fx");
+dojo.require("dojox.fx.style");
+
+dojo.extend(dojo.NodeList, {
+
+ addClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effects of adding a class to all nodes in this list.
+ // see `dojox.fx.addClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | // fade all elements with class "bar" to to 50% opacity
+ // | dojo.query(".bar").addClassFx("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.addClass(n, cssClass, args);
+ }));
+ },
+
+ removeClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effect of removing a class to all nodes in this list.
+ // see `dojox.fx.removeClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").removeClassFx("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.removeClass(n, cssClass, args);
+ }));
+ },
+
+ toggleClassFx: function(cssClass, force, args){
+ // summary:
+ // Animate the effect of adding or removing a class to all nodes in this list.
+ // see `dojox.fx.toggleClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").toggleClass("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.toggleClass(n, cssClass, force, args);
+ }));
+ }
+
+});
+
+}
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.xd.js b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.xd.js
new file mode 100644
index 0000000..7903115
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList-style.xd.js
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.fx.ext-dojo.NodeList-style"],
+["require", "dojo.NodeList-fx"],
+["require", "dojox.fx.style"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.fx.ext-dojo.NodeList-style"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.NodeList-style"] = true;
+dojo.provide("dojox.fx.ext-dojo.NodeList-style");
+dojo.experimental("dojox.fx.ext-dojo.NodeList-style");
+// summary:
+// Core extensions to `dojo.NodeList` providing addtional fx to `dojo.NodeList-fx`
+// from `dojox.fx.style`
+//
+// description:
+// A Package to extend dojo base NodeList with fx provided by the `dojox.fx` project.
+// These are experimental animations, in an experimental
+
+dojo.require("dojo.NodeList-fx");
+dojo.require("dojox.fx.style");
+
+dojo.extend(dojo.NodeList, {
+
+ addClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effects of adding a class to all nodes in this list.
+ // see `dojox.fx.addClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | // fade all elements with class "bar" to to 50% opacity
+ // | dojo.query(".bar").addClassFx("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.addClass(n, cssClass, args);
+ }));
+ },
+
+ removeClassFx: function(cssClass, args){
+ // summary:
+ // Animate the effect of removing a class to all nodes in this list.
+ // see `dojox.fx.removeClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").removeClassFx("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.removeClass(n, cssClass, args);
+ }));
+ },
+
+ toggleClassFx: function(cssClass, force, args){
+ // summary:
+ // Animate the effect of adding or removing a class to all nodes in this list.
+ // see `dojox.fx.toggleClass`
+ //
+ // tags: FX, NodeList
+ //
+ // example:
+ // | dojo.query(".box").toggleClass("bar").play();
+
+ return dojo.fx.combine(this.map(function(n){ // dojo.Animation
+ return dojox.fx.toggleClass(n, cssClass, force, args);
+ }));
+ }
+
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.js b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.js
new file mode 100644
index 0000000..680e5db
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.js
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.fx.ext-dojo.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.NodeList"] = true;
+dojo.provide("dojox.fx.ext-dojo.NodeList");
+dojo.experimental("dojox.fx.ext-dojo.NodeList");
+// summary: Core extensions to dojo.NodeList providing addtional fx to dojo.NodeList-fx
+// description:
+// A Package to extend dojo base NodeList with fx provided by the dojox.fx project.
+// These are experimental animations, in an experimental
+
+dojo.require("dojo.NodeList-fx");
+dojo.require("dojox.fx");
+
+dojo.extend(dojo.NodeList, {
+
+ sizeTo: function(args){
+ // summary:
+ // size all elements of this NodeList. Returns an instance of dojo.Animation
+ // example:
+ // | // size all divs with class "blah"
+ // | dojo.query("div.blah").sizeTo({
+ // | width:50,
+ // | height:50
+ // | }).play();
+ return this._anim(dojox.fx, "sizeTo", args); // dojo.Animation
+ },
+
+ slideBy: function(args){
+ // summary:
+ // slide all elements of this NodeList. Returns an instance of dojo.Animation
+ //
+ // example:
+ // | // slide all tables with class "blah" 10 px
+ // | dojo.query("table.blah").slideBy({ top:10, left:10 }).play();
+ return this._anim(dojox.fx, "slideBy", args); // dojo.Animation
+ },
+
+ highlight: function(args){
+ // summary:
+ // highlight all elements of the node list.
+ // Returns an instance of dojo.Animation
+ // example:
+ // | // highlight all links with class "foo"
+ // | dojo.query("a.foo").hightlight().play();
+ return this._anim(dojox.fx, "highlight", args); // dojo.Animation
+ },
+
+ fadeTo: function(args){
+ // summary:
+ // fade all elements of the node list to a specified opacity
+ // example:
+ // | // fade all elements with class "bar" to to 50% opacity
+ // | dojo.query(".bar").fadeTo({ end: 0.5 }).play();
+ return this._anim(dojo,"_fade",args);
+ },
+
+ wipeTo: function(args){
+ // summary:
+ // Wipe all elements of the NodeList to a specified width: or height:
+ // example:
+ // | dojo.query(".box").wipeTo({ width: 300px }).play();
+ return this._anim(dojox.fx, "wipeTo", args);
+ }
+
+});
+
+}
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.xd.js b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.xd.js
new file mode 100644
index 0000000..56c5471
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/NodeList.xd.js
@@ -0,0 +1,79 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.fx.ext-dojo.NodeList"],
+["require", "dojo.NodeList-fx"],
+["require", "dojox.fx"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.fx.ext-dojo.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.NodeList"] = true;
+dojo.provide("dojox.fx.ext-dojo.NodeList");
+dojo.experimental("dojox.fx.ext-dojo.NodeList");
+// summary: Core extensions to dojo.NodeList providing addtional fx to dojo.NodeList-fx
+// description:
+// A Package to extend dojo base NodeList with fx provided by the dojox.fx project.
+// These are experimental animations, in an experimental
+
+dojo.require("dojo.NodeList-fx");
+dojo.require("dojox.fx");
+
+dojo.extend(dojo.NodeList, {
+
+ sizeTo: function(args){
+ // summary:
+ // size all elements of this NodeList. Returns an instance of dojo.Animation
+ // example:
+ // | // size all divs with class "blah"
+ // | dojo.query("div.blah").sizeTo({
+ // | width:50,
+ // | height:50
+ // | }).play();
+ return this._anim(dojox.fx, "sizeTo", args); // dojo.Animation
+ },
+
+ slideBy: function(args){
+ // summary:
+ // slide all elements of this NodeList. Returns an instance of dojo.Animation
+ //
+ // example:
+ // | // slide all tables with class "blah" 10 px
+ // | dojo.query("table.blah").slideBy({ top:10, left:10 }).play();
+ return this._anim(dojox.fx, "slideBy", args); // dojo.Animation
+ },
+
+ highlight: function(args){
+ // summary:
+ // highlight all elements of the node list.
+ // Returns an instance of dojo.Animation
+ // example:
+ // | // highlight all links with class "foo"
+ // | dojo.query("a.foo").hightlight().play();
+ return this._anim(dojox.fx, "highlight", args); // dojo.Animation
+ },
+
+ fadeTo: function(args){
+ // summary:
+ // fade all elements of the node list to a specified opacity
+ // example:
+ // | // fade all elements with class "bar" to to 50% opacity
+ // | dojo.query(".bar").fadeTo({ end: 0.5 }).play();
+ return this._anim(dojo,"_fade",args);
+ },
+
+ wipeTo: function(args){
+ // summary:
+ // Wipe all elements of the NodeList to a specified width: or height:
+ // example:
+ // | dojo.query(".box").wipeTo({ width: 300px }).play();
+ return this._anim(dojox.fx, "wipeTo", args);
+ }
+
+});
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/complex.js b/js/dojo-1.6/dojox/fx/ext-dojo/complex.js
new file mode 100644
index 0000000..8eafedb
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/complex.js
@@ -0,0 +1,180 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.fx.ext-dojo.complex"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.complex"] = true;
+dojo.provide("dojox.fx.ext-dojo.complex");
+
+(function(){
+ var da = dojo.animateProperty;
+ dojo.animateProperty = function(options){
+ // summary:
+ // An extension of dojo.animateProperty which adds functionality
+ // that animates a "complex property". The primary example is the
+ // clip style: rect(10px 30px 10px 50px).
+ // Note this can also be used with (and is actually intended for)
+ // CSS3 properties, such as transform:
+ // transform: rotate(10deg) translateX(0px)
+ //
+ // description:
+ // The standard animation doesn't know what to do with something like
+ // rect(...). This class identifies complex properties by they being a
+ // string and having parenthesis. If so, that property is made into a
+ // dojox.fx._Complex object and the getValue() is obtained from
+ // there.
+ //
+ // example:
+ // | var ani = dojo.animateProperty({
+ // | node:dojo.byId("myDiv"),
+ // | duration:600,
+ // | properties:{
+ // | clip:{start:'rect(0px 50px 50px 0px)', end:'rect(10px 30px 30px 10px)'}
+ // | }
+ // | }).play();
+ //
+ var d = dojo;
+ var ani = da(options);
+
+ dojo.connect(ani, "beforeBegin", function(){
+ // dojo.Animate original still invokes and still
+ // works. We're appending this functionality to
+ // modify targeted properties.
+ ani.curve.getValue = function(r){
+ // Overwriting dojo.Animate's curve.getValue
+ // This is mostly duplicate code, except it looks
+ // for an instance of dojox.fx._Complex.
+ var ret = {};
+ for(var p in this._properties){
+ var prop = this._properties[p],
+ start = prop.start;
+ if(start instanceof d.Color){
+ ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
+ }else if(start instanceof dojox.fx._Complex){
+ ret[p] = start.getValue(r);
+ }else if(!d.isArray(start)){
+ ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);
+ }
+ }
+ return ret;
+ };
+
+ // this.properties has already been set, as has this.curve._properties.
+ // We're fixing the props in curve which will have NaN attributes from
+ // our string property.
+ var pm = {};
+ for(var p in this.properties){
+ var o = this.properties[p];
+ if(typeof(o.start) == "string" && /\(/.test(o.start)){
+ this.curve._properties[p].start = new dojox.fx._Complex(o);
+ }
+ }
+
+ });
+ return ani; // dojo.Animation
+ }
+})();
+
+dojo.declare("dojox.fx._Complex", null, {
+ // summary:
+ // A class that takes a complex property such as
+ // clip style: rect(10px 30px 10px 50px), and breaks it
+ // into seperate animatable units. The object has a getValue()
+ // that will return a string with the modified units.
+ //
+ PROP: /\([+-]?[\w|,|#|\.|\s]*\)/g,
+ constructor: function(options){
+ var beg = options.start.match(this.PROP);
+ var end = options.end.match(this.PROP);
+
+ var begProps = dojo.map(beg, this.getProps, this);
+ var endProps = dojo.map(end, this.getProps, this);
+
+ this._properties = {};
+ this.strProp = options.start;
+ dojo.forEach(begProps, function(prop, i){
+ dojo.forEach(prop, function(p, j){
+ this.strProp = this.strProp.replace(p, "PROP_"+i+""+j);
+ this._properties["PROP_"+i+""+j] = this.makePropObject(p, endProps[i][j])
+ },this);
+ },this);
+ },
+
+ getValue: function(/*Float*/r){
+ // summary:
+ // Returns a string with teh same integrity as the
+ // original star and end, but with the modified units.
+ var str = this.strProp, u;
+ for(var nm in this._properties){
+ var v, o = this._properties[nm];
+ if(o.units == "isColor"){
+ v = dojo.blendColors(o.beg, o.end, r).toCss(false);
+ u = "";
+ }else{
+ v = ((o.end - o.beg) * r) + o.beg;
+ u = o.units;
+ }
+ str = str.replace(nm, v + u);
+ }
+
+ return str; // String
+ },
+
+ makePropObject: function(/* String */beg, /* String */end){
+ // summary:
+ // Returns an object that stores the numeric value and
+ // units of the beggining and ending properties.
+ //
+ var b = this.getNumAndUnits(beg);
+ var e = this.getNumAndUnits(end);
+ return {
+ beg:b.num,
+ end:e.num,
+ units:b.units
+ }; // Object
+ },
+
+ getProps: function(/* String */str){
+ // summary:
+ // Helper function that splits a stringified set of properties
+ // into individual units.
+ //
+ str = str.substring(1, str.length-1);
+ var s;
+ if(/,/.test(str)){
+ str = str.replace(/\s/g, "");
+ s = str.split(",");
+ }else{
+ str = str.replace(/\s{2,}/g, " ");
+ s = str.split(" ");
+ }
+ return s; // String
+ },
+ getNumAndUnits: function(prop){
+ // summary:
+ // Helper function that returns the numeric verion of the string
+ // property (or dojo.Color object) and the unit in which it was
+ // defined.
+ //
+ if(!prop){ return {}; }
+ if(/#/.test(prop)){
+ return {
+ num: new dojo.Color(prop),
+ units:"isColor"
+ }; // Object
+ }
+ var o = {
+ num:parseFloat(/-*[\d\.\d|\d]{1,}/.exec(prop).join(""))
+ };
+ o.units = /[a-z]{1,}/.exec(prop);//.join("");
+ o.units = o.units && o.units.length ? o.units.join("") : "";
+ return o; // Object
+ }
+});
+
+
+
+}
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/complex.xd.js b/js/dojo-1.6/dojox/fx/ext-dojo/complex.xd.js
new file mode 100644
index 0000000..1e5c538
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/complex.xd.js
@@ -0,0 +1,184 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.fx.ext-dojo.complex"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.fx.ext-dojo.complex"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.complex"] = true;
+dojo.provide("dojox.fx.ext-dojo.complex");
+
+(function(){
+ var da = dojo.animateProperty;
+ dojo.animateProperty = function(options){
+ // summary:
+ // An extension of dojo.animateProperty which adds functionality
+ // that animates a "complex property". The primary example is the
+ // clip style: rect(10px 30px 10px 50px).
+ // Note this can also be used with (and is actually intended for)
+ // CSS3 properties, such as transform:
+ // transform: rotate(10deg) translateX(0px)
+ //
+ // description:
+ // The standard animation doesn't know what to do with something like
+ // rect(...). This class identifies complex properties by they being a
+ // string and having parenthesis. If so, that property is made into a
+ // dojox.fx._Complex object and the getValue() is obtained from
+ // there.
+ //
+ // example:
+ // | var ani = dojo.animateProperty({
+ // | node:dojo.byId("myDiv"),
+ // | duration:600,
+ // | properties:{
+ // | clip:{start:'rect(0px 50px 50px 0px)', end:'rect(10px 30px 30px 10px)'}
+ // | }
+ // | }).play();
+ //
+ var d = dojo;
+ var ani = da(options);
+
+ dojo.connect(ani, "beforeBegin", function(){
+ // dojo.Animate original still invokes and still
+ // works. We're appending this functionality to
+ // modify targeted properties.
+ ani.curve.getValue = function(r){
+ // Overwriting dojo.Animate's curve.getValue
+ // This is mostly duplicate code, except it looks
+ // for an instance of dojox.fx._Complex.
+ var ret = {};
+ for(var p in this._properties){
+ var prop = this._properties[p],
+ start = prop.start;
+ if(start instanceof d.Color){
+ ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
+ }else if(start instanceof dojox.fx._Complex){
+ ret[p] = start.getValue(r);
+ }else if(!d.isArray(start)){
+ ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);
+ }
+ }
+ return ret;
+ };
+
+ // this.properties has already been set, as has this.curve._properties.
+ // We're fixing the props in curve which will have NaN attributes from
+ // our string property.
+ var pm = {};
+ for(var p in this.properties){
+ var o = this.properties[p];
+ if(typeof(o.start) == "string" && /\(/.test(o.start)){
+ this.curve._properties[p].start = new dojox.fx._Complex(o);
+ }
+ }
+
+ });
+ return ani; // dojo.Animation
+ }
+})();
+
+dojo.declare("dojox.fx._Complex", null, {
+ // summary:
+ // A class that takes a complex property such as
+ // clip style: rect(10px 30px 10px 50px), and breaks it
+ // into seperate animatable units. The object has a getValue()
+ // that will return a string with the modified units.
+ //
+ PROP: /\([+-]?[\w|,|#|\.|\s]*\)/g,
+ constructor: function(options){
+ var beg = options.start.match(this.PROP);
+ var end = options.end.match(this.PROP);
+
+ var begProps = dojo.map(beg, this.getProps, this);
+ var endProps = dojo.map(end, this.getProps, this);
+
+ this._properties = {};
+ this.strProp = options.start;
+ dojo.forEach(begProps, function(prop, i){
+ dojo.forEach(prop, function(p, j){
+ this.strProp = this.strProp.replace(p, "PROP_"+i+""+j);
+ this._properties["PROP_"+i+""+j] = this.makePropObject(p, endProps[i][j])
+ },this);
+ },this);
+ },
+
+ getValue: function(/*Float*/r){
+ // summary:
+ // Returns a string with teh same integrity as the
+ // original star and end, but with the modified units.
+ var str = this.strProp, u;
+ for(var nm in this._properties){
+ var v, o = this._properties[nm];
+ if(o.units == "isColor"){
+ v = dojo.blendColors(o.beg, o.end, r).toCss(false);
+ u = "";
+ }else{
+ v = ((o.end - o.beg) * r) + o.beg;
+ u = o.units;
+ }
+ str = str.replace(nm, v + u);
+ }
+
+ return str; // String
+ },
+
+ makePropObject: function(/* String */beg, /* String */end){
+ // summary:
+ // Returns an object that stores the numeric value and
+ // units of the beggining and ending properties.
+ //
+ var b = this.getNumAndUnits(beg);
+ var e = this.getNumAndUnits(end);
+ return {
+ beg:b.num,
+ end:e.num,
+ units:b.units
+ }; // Object
+ },
+
+ getProps: function(/* String */str){
+ // summary:
+ // Helper function that splits a stringified set of properties
+ // into individual units.
+ //
+ str = str.substring(1, str.length-1);
+ var s;
+ if(/,/.test(str)){
+ str = str.replace(/\s/g, "");
+ s = str.split(",");
+ }else{
+ str = str.replace(/\s{2,}/g, " ");
+ s = str.split(" ");
+ }
+ return s; // String
+ },
+ getNumAndUnits: function(prop){
+ // summary:
+ // Helper function that returns the numeric verion of the string
+ // property (or dojo.Color object) and the unit in which it was
+ // defined.
+ //
+ if(!prop){ return {}; }
+ if(/#/.test(prop)){
+ return {
+ num: new dojo.Color(prop),
+ units:"isColor"
+ }; // Object
+ }
+ var o = {
+ num:parseFloat(/-*[\d\.\d|\d]{1,}/.exec(prop).join(""))
+ };
+ o.units = /[a-z]{1,}/.exec(prop);//.join("");
+ o.units = o.units && o.units.length ? o.units.join("") : "";
+ return o; // Object
+ }
+});
+
+
+
+}
+
+}};});
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/reverse.js b/js/dojo-1.6/dojox/fx/ext-dojo/reverse.js
new file mode 100644
index 0000000..dd6fac6
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/reverse.js
@@ -0,0 +1,109 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.fx.ext-dojo.reverse"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.reverse"] = true;
+dojo.provide("dojox.fx.ext-dojo.reverse");
+dojo.require("dojo.fx.easing");
+dojo.require("dojo.fx");
+
+
+dojo.extend(dojo.Animation, {
+ // summary:
+ // A dojo.Animation extension that enables an easy reversal.
+ // description:
+ // To use, simply require dojox.fx.ext-dojo.reverse and a reverse()
+ // method will be added to all dojo.Animations.
+ // It can be used at any time during the animation. It does not
+ // need to be called when it ends. It also reverses the easing -
+ // if dojo.fx.easing.quadIn is used, dojo.fx.easing.quadOut will
+ // be used when animating backwards.
+ //
+ _reversed: false,
+ reverse: function(/*Boolean*/keepPaused, /*Function ? */reverseEase){
+ // summary:
+ // The key method added to an animation to enable reversal.
+ // keepPaused: Boolean
+ // By default, calling reverse() will play the animation if
+ // it was paused. Pass in true to keep it paused (will have
+ // no effect if reverse is called while animation is playing).
+ // reverseEase: Function
+ // A function to use for the reverse easing. This allows for
+ // the possibility of custom eases that are not in the dojo.fx
+ // library.
+ //
+ var playing = this.status() == "playing";
+ this.pause();
+ this._reversed = !this._reversed;
+ var d = this.duration,
+ sofar = d * this._percent,
+ togo = d - sofar,
+ curr = new Date().valueOf(),
+ cp = this.curve._properties,
+ p = this.properties,
+ nm
+ ;
+ this._endTime = curr + sofar;
+ this._startTime = curr - togo;
+
+ if(playing){
+ this.gotoPercent(togo / d)
+ }
+ for(nm in p){
+ var tmp = p[nm].start;
+ p[nm].start = cp[nm].start = p[nm].end;
+ p[nm].end = cp[nm].end = tmp;
+ }
+
+ if(this._reversed){
+ if(!this.rEase){
+ this.fEase = this.easing;
+ if(reverseEase){
+ this.rEase = reverseEase;
+ }else{
+ // loop through dojo.fx.easing to find the matching ease
+ var de = dojo.fx.easing, found, eName;
+ for(nm in de){
+ if(this.easing == de[nm]){
+ // get ease's name
+ found = nm; break;
+ }
+ }
+
+ if(found){
+ // find ease's opposite
+ if(/InOut/.test(nm) || !/In|Out/i.test(nm)){
+ this.rEase = this.easing;
+ }else if(/In/.test(nm)){
+ eName = nm.replace("In", "Out");
+ }else{
+ eName = nm.replace("Out", "In");
+ }
+ if(eName){
+ this.rEase = dojo.fx.easing[eName];
+ }
+ }else{
+ // default ease, and other's like linear do not have an opposite
+ console.info("ease function to reverse not found");
+ this.rEase = this.easing;
+ }
+ }
+
+ }
+ this.easing = this.rEase;
+ }else{
+ this.easing = this.fEase;
+ }
+ if(!keepPaused && this.status() != "playing"){
+ this.play();
+ }
+
+ return this;
+ }
+});
+
+}
diff --git a/js/dojo-1.6/dojox/fx/ext-dojo/reverse.xd.js b/js/dojo-1.6/dojox/fx/ext-dojo/reverse.xd.js
new file mode 100644
index 0000000..cfc75f8
--- /dev/null
+++ b/js/dojo-1.6/dojox/fx/ext-dojo/reverse.xd.js
@@ -0,0 +1,115 @@
+/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.fx.ext-dojo.reverse"],
+["require", "dojo.fx.easing"],
+["require", "dojo.fx"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.fx.ext-dojo.reverse"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.fx.ext-dojo.reverse"] = true;
+dojo.provide("dojox.fx.ext-dojo.reverse");
+dojo.require("dojo.fx.easing");
+dojo.require("dojo.fx");
+
+
+dojo.extend(dojo.Animation, {
+ // summary:
+ // A dojo.Animation extension that enables an easy reversal.
+ // description:
+ // To use, simply require dojox.fx.ext-dojo.reverse and a reverse()
+ // method will be added to all dojo.Animations.
+ // It can be used at any time during the animation. It does not
+ // need to be called when it ends. It also reverses the easing -
+ // if dojo.fx.easing.quadIn is used, dojo.fx.easing.quadOut will
+ // be used when animating backwards.
+ //
+ _reversed: false,
+ reverse: function(/*Boolean*/keepPaused, /*Function ? */reverseEase){
+ // summary:
+ // The key method added to an animation to enable reversal.
+ // keepPaused: Boolean
+ // By default, calling reverse() will play the animation if
+ // it was paused. Pass in true to keep it paused (will have
+ // no effect if reverse is called while animation is playing).
+ // reverseEase: Function
+ // A function to use for the reverse easing. This allows for
+ // the possibility of custom eases that are not in the dojo.fx
+ // library.
+ //
+ var playing = this.status() == "playing";
+ this.pause();
+ this._reversed = !this._reversed;
+ var d = this.duration,
+ sofar = d * this._percent,
+ togo = d - sofar,
+ curr = new Date().valueOf(),
+ cp = this.curve._properties,
+ p = this.properties,
+ nm
+ ;
+ this._endTime = curr + sofar;
+ this._startTime = curr - togo;
+
+ if(playing){
+ this.gotoPercent(togo / d)
+ }
+ for(nm in p){
+ var tmp = p[nm].start;
+ p[nm].start = cp[nm].start = p[nm].end;
+ p[nm].end = cp[nm].end = tmp;
+ }
+
+ if(this._reversed){
+ if(!this.rEase){
+ this.fEase = this.easing;
+ if(reverseEase){
+ this.rEase = reverseEase;
+ }else{
+ // loop through dojo.fx.easing to find the matching ease
+ var de = dojo.fx.easing, found, eName;
+ for(nm in de){
+ if(this.easing == de[nm]){
+ // get ease's name
+ found = nm; break;
+ }
+ }
+
+ if(found){
+ // find ease's opposite
+ if(/InOut/.test(nm) || !/In|Out/i.test(nm)){
+ this.rEase = this.easing;
+ }else if(/In/.test(nm)){
+ eName = nm.replace("In", "Out");
+ }else{
+ eName = nm.replace("Out", "In");
+ }
+ if(eName){
+ this.rEase = dojo.fx.easing[eName];
+ }
+ }else{
+ // default ease, and other's like linear do not have an opposite
+ console.info("ease function to reverse not found");
+ this.rEase = this.easing;
+ }
+ }
+
+ }
+ this.easing = this.rEase;
+ }else{
+ this.easing = this.fEase;
+ }
+ if(!keepPaused && this.status() != "playing"){
+ this.play();
+ }
+
+ return this;
+ }
+});
+
+}
+
+}};});