summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--live/js/mootools/mootools.v1.11.js333
-rw-r--r--live/js/mootools/readme.mootools.config32
2 files changed, 32 insertions, 333 deletions
diff --git a/live/js/mootools/mootools.v1.11.js b/live/js/mootools/mootools.v1.11.js
index ac754b9..b6c0cd6 100644
--- a/live/js/mootools/mootools.v1.11.js
+++ b/live/js/mootools/mootools.v1.11.js
@@ -3746,339 +3746,6 @@ window.extend({
});
/*
-Script: Fx.Base.js
- Contains <Fx.Base>, the foundamentals of the MooTools Effects.
-
-License:
- MIT-style license.
-*/
-
-var Fx = {};
-
-/*
-Class: Fx.Base
- Base class for the Effects.
-
-Options:
- transition - the equation to use for the effect see <Fx.Transitions>; default is <Fx.Transitions.Sine.easeInOut>
- duration - the duration of the effect in ms; 500 is the default.
- unit - the unit is 'px' by default (other values include things like 'em' for fonts or '%').
- wait - boolean: to wait or not to wait for a current transition to end before running another of the same instance. defaults to true.
- fps - the frames per second for the transition; default is 50
-
-Events:
- onStart - the function to execute as the effect begins; nothing (<Class.empty>) by default.
- onComplete - the function to execute after the effect has processed; nothing (<Class.empty>) by default.
- onCancel - the function to execute when you manually stop the effect.
-*/
-
-Fx.Base = new Class({
-
- options: {
- onStart: Class.empty,
- onComplete: Class.empty,
- onCancel: Class.empty,
- transition: function(p){
- return -(Math.cos(Math.PI * p) - 1) / 2;
- },
- duration: 500,
- unit: 'px',
- wait: true,
- fps: 50
- },
-
- initialize: function(options){
- this.element = this.element || null;
- this.setOptions(options);
- if (this.options.initialize) this.options.initialize.call(this);
- },
-
- step: function(){
- var time = $time();
- if (time < this.time + this.options.duration){
- this.delta = this.options.transition((time - this.time) / this.options.duration);
- this.setNow();
- this.increase();
- } else {
- this.stop(true);
- this.set(this.to);
- this.fireEvent('onComplete', this.element, 10);
- this.callChain();
- }
- },
-
- /*
- Property: set
- Immediately sets the value with no transition.
-
- Arguments:
- to - the point to jump to
-
- Example:
- >var myFx = new Fx.Style('myElement', 'opacity').set(0); //will make it immediately transparent
- */
-
- set: function(to){
- this.now = to;
- this.increase();
- return this;
- },
-
- setNow: function(){
- this.now = this.compute(this.from, this.to);
- },
-
- compute: function(from, to){
- return (to - from) * this.delta + from;
- },
-
- /*
- Property: start
- Executes an effect from one position to the other.
-
- Arguments:
- from - integer: staring value
- to - integer: the ending value
-
- Examples:
- >var myFx = new Fx.Style('myElement', 'opacity').start(0,1); //display a transition from transparent to opaque.
- */
-
- start: function(from, to){
- if (!this.options.wait) this.stop();
- else if (this.timer) return this;
- this.from = from;
- this.to = to;
- this.change = this.to - this.from;
- this.time = $time();
- this.timer = this.step.periodical(Math.round(1000 / this.options.fps), this);
- this.fireEvent('onStart', this.element);
- return this;
- },
-
- /*
- Property: stop
- Stops the transition.
- */
-
- stop: function(end){
- if (!this.timer) return this;
- this.timer = $clear(this.timer);
- if (!end) this.fireEvent('onCancel', this.element);
- return this;
- }/*compatibility*/,
-
- custom: function(from, to){
- return this.start(from, to);
- },
-
- clearTimer: function(end){
- return this.stop(end);
- }
-
- /*end compatibility*/
-
-});
-
-Fx.Base.implement(new Chain, new Events, new Options);
-
-/*
-Script: Fx.CSS.js
- Css parsing class for effects. Required by <Fx.Style>, <Fx.Styles>, <Fx.Elements>. No documentation needed, as its used internally.
-
-License:
- MIT-style license.
-*/
-
-Fx.CSS = {
-
- select: function(property, to){
- if (property.test(/color/i)) return this.Color;
- var type = $type(to);
- if ((type == 'array') || (type == 'string' && to.contains(' '))) return this.Multi;
- return this.Single;
- },
-
- parse: function(el, property, fromTo){
- if (!fromTo.push) fromTo = [fromTo];
- var from = fromTo[0], to = fromTo[1];
- if (!$chk(to)){
- to = from;
- from = el.getStyle(property);
- }
- var css = this.select(property, to);
- return {'from': css.parse(from), 'to': css.parse(to), 'css': css};
- }
-
-};
-
-Fx.CSS.Single = {
-
- parse: function(value){
- return parseFloat(value);
- },
-
- getNow: function(from, to, fx){
- return fx.compute(from, to);
- },
-
- getValue: function(value, unit, property){
- if (unit == 'px' && property != 'opacity') value = Math.round(value);
- return value + unit;
- }
-
-};
-
-Fx.CSS.Multi = {
-
- parse: function(value){
- return value.push ? value : value.split(' ').map(function(v){
- return parseFloat(v);
- });
- },
-
- getNow: function(from, to, fx){
- var now = [];
- for (var i = 0; i < from.length; i++) now[i] = fx.compute(from[i], to[i]);
- return now;
- },
-
- getValue: function(value, unit, property){
- if (unit == 'px' && property != 'opacity') value = value.map(Math.round);
- return value.join(unit + ' ') + unit;
- }
-
-};
-
-Fx.CSS.Color = {
-
- parse: function(value){
- return value.push ? value : value.hexToRgb(true);
- },
-
- getNow: function(from, to, fx){
- var now = [];
- for (var i = 0; i < from.length; i++) now[i] = Math.round(fx.compute(from[i], to[i]));
- return now;
- },
-
- getValue: function(value){
- return 'rgb(' + value.join(',') + ')';
- }
-
-};
-
-/*
-Script: Fx.Styles.js
- Contains <Fx.Styles>
-
-License:
- MIT-style license.
-*/
-
-/*
-Class: Fx.Styles
- Allows you to animate multiple css properties at once;
- Colors must be in hex format.
- Inherits methods, properties, options and events from <Fx.Base>.
-
-Arguments:
- el - the $(element) to apply the styles transition to
- options - the fx options (see: <Fx.Base>)
-
-Example:
- (start code)
- var myEffects = new Fx.Styles('myElement', {duration: 1000, transition: Fx.Transitions.linear});
-
- //height from 10 to 100 and width from 900 to 300
- myEffects.start({
- 'height': [10, 100],
- 'width': [900, 300]
- });
-
- //or height from current height to 100 and width from current width to 300
- myEffects.start({
- 'height': 100,
- 'width': 300
- });
- (end)
-*/
-
-Fx.Styles = Fx.Base.extend({
-
- initialize: function(el, options){
- this.element = $(el);
- this.parent(options);
- },
-
- setNow: function(){
- for (var p in this.from) this.now[p] = this.css[p].getNow(this.from[p], this.to[p], this);
- },
-
- set: function(to){
- var parsed = {};
- this.css = {};
- for (var p in to){
- this.css[p] = Fx.CSS.select(p, to[p]);
- parsed[p] = this.css[p].parse(to[p]);
- }
- return this.parent(parsed);
- },
-
- /*
- Property: start
- Executes a transition for any number of css properties in tandem.
-
- Arguments:
- obj - an object containing keys that specify css properties to alter and values that specify either the from/to values (as an array) or just the end value (an integer).
-
- Example:
- see <Fx.Styles>
- */
-
- start: function(obj){
- if (this.timer && this.options.wait) return this;
- this.now = {};
- this.css = {};
- var from = {}, to = {};
- for (var p in obj){
- var parsed = Fx.CSS.parse(this.element, p, obj[p]);
- from[p] = parsed.from;
- to[p] = parsed.to;
- this.css[p] = parsed.css;
- }
- return this.parent(from, to);
- },
-
- increase: function(){
- for (var p in this.now) this.element.setStyle(p, this.css[p].getValue(this.now[p], this.options.unit, p));
- }
-
-});
-
-/*
-Class: Element
- Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>.
-*/
-
-Element.extend({
-
- /*
- Property: effects
- Applies an <Fx.Styles> to the Element; This a shortcut for <Fx.Styles>.
-
- Example:
- >var myEffects = $(myElement).effects({duration: 1000, transition: Fx.Transitions.Sine.easeInOut});
- >myEffects.start({'height': [10, 100], 'width': [900, 300]});
- */
-
- effects: function(options){
- return new Fx.Styles(this, options);
- }
-
-});
-
-/*
Script: Drag.Base.js
Contains <Drag.Base>, <Element.makeResizable>
diff --git a/live/js/mootools/readme.mootools.config b/live/js/mootools/readme.mootools.config
new file mode 100644
index 0000000..dccaf42
--- /dev/null
+++ b/live/js/mootools/readme.mootools.config
@@ -0,0 +1,32 @@
+This file documents the configuration of mootools!
+
+The otherwise cool feature of mootools to select only needed
+functionality can be a nightmare when trying to add additional
+features in a distributed development situation. Because the
+configured mootools download does not document in a central position
+which options have been selected to optain a specific version of
+mootools.
+
+Therefore this file, which documents the minimal selections needed to
+get a valid mootools configuration for the features of mootools used in
+live. In order to obtain the right mootools configuration follow these steps:
+
+- Go to mootools download page: http://mootools.net/download
+
+- Usualy 'Core' is preselected. This is OK :) but you can unselect it
+ to have a 'clean' starting base.
+
+- Scroll down to the bottom of the page and select the following
+ options towards the top of the download page in this order:
+ 1. Tips
+ 2. Ajax
+ 3. Drag.Move
+ 4. Window.DomReady
+ 5. Element.Selectors
+
+- Then open 'Choose compression type' and select 'No Compression' to
+ have fully documented mootools source. This helps when developing
+ own functionality and when trying do debug errors with Firebug.
+
+If mootools is extended by additional modules, please document this
+here in this file, by updating the selection scheme above.