Skip to content

Commit

Permalink
Unix line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jul 7, 2008
1 parent 22099bb commit 39d17b8
Show file tree
Hide file tree
Showing 59 changed files with 7,120 additions and 7,120 deletions.
106 changes: 53 additions & 53 deletions test/jake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,50 @@ packages:
- yui
- ojay/js-class-min
files:
- core
- utils
- array
- function
- string
- number
- ../external/reiterate
- event
- observable
- dom_collection
- dom_insertion
- html_builder
- animation
- region
- sequence
- core
- utils
- array
- function
- string
- number
- ../external/reiterate
- event
- observable
- dom_collection
- dom_insertion
- html_builder
- animation
- region
- sequence
- method_chain

pkg/forms:
directory: packages/forms
requires:
- ojay/core-min
- ojay/pkg/http-min
files:
- begin
- utils
- description
- requirement
- data
- errors
- dsl
- inputable
- checkable
- radio_buttons
- checkbox
- select
files:
- begin
- utils
- description
- requirement
- data
- errors
- dsl
- inputable
- checkable
- radio_buttons
- checkbox
- select
- end

pkg/http:
directory: packages/http
requires:
- ojay/core-min
files:
- ajax
- cross_domain
- ajax
- cross_domain
- uri

pkg/history:
Expand All @@ -82,13 +82,13 @@ packages:
requires:
- ojay/core-min
files:
- begin
- utils
- keyboard
- rules
- monitor
- disabler
- events
- begin
- utils
- keyboard
- rules
- monitor
- disabler
- events
- end

pkg/mouse:
Expand All @@ -103,12 +103,12 @@ packages:
requires:
- ojay/core-min
files:
- begin
- overlay
- transitions
- content_overlay
- tooltip
- page_mask
- begin
- overlay
- transitions
- content_overlay
- tooltip
- page_mask
- end

pkg/paginator:
Expand All @@ -117,21 +117,21 @@ packages:
- ojay/core-min
- ojay/pkg/http-min
files:
- paginator
- ajax_paginator
- paginator
- ajax_paginator
- controls

bundles:
all:
header: COPYRIGHT
files:
- js-class
- core
- pkg/http
- pkg/forms
- pkg/history
- pkg/keyboard
- pkg/mouse
- pkg/overlay
- js-class
- core
- pkg/http
- pkg/forms
- pkg/history
- pkg/keyboard
- pkg/mouse
- pkg/overlay
- pkg/paginator

8 changes: 4 additions & 4 deletions test/source/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
Copyright (c) 2007-2008 the OTHER media Limited
Licensed under the BSD license, http://ojay.othermedia.org/license.html
*/
/*
Copyright (c) 2007-2008 the OTHER media Limited
Licensed under the BSD license, http://ojay.othermedia.org/license.html
*/
146 changes: 73 additions & 73 deletions test/source/core/animation.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
/**
* @overview
* <p>The <tt>Animation</tt> class is used to set up all animations in Ojay. It is entirely
* for internal consumption, and not to be accessed directly. Use the <tt>animate</tt> method
* in <tt>DomCollection</tt> instead, and look to that for documentation.</p>
* @constructor
* @class Animation
*/
Ojay.Animation = new JS.Class(/** @scope Ojay.Animation.prototype */{

/**
* @param {DomCollection} elements
* @param {Object|Function} parameters
* @param {Number|Function} duration
* @param {Object} options
*/
initialize: function(elements, parameters, duration, options) {
this._collection = elements;
this._parameters = parameters || {};
this._duration = duration || 1.0;
this._options = options || {};
this._easing = YAHOO.util.Easing[this._options.easing || 'easeBoth'];
var after = this._options.after, before = this._options.before;
this._afterCallback = after && Function.from(after);
this._beforeCallback = before && Function.from(before);
this.chain = new JS.MethodChain;
},

/**
* @param {Object|Function} options
* @param {DomCollection} element
* @param {Number} i
* @returns {Object}
*/
_evaluateOptions: function(options, element, i) {
if (typeof options == 'function') options = options(i, element);
if (typeof options != 'object') return options;
var results = {};
for (var field in options) results[field] = arguments.callee(options[field], element, i);
return results;
}.curry(),

/**
* <p>Runs the animation.</p>
*/
run: function() {
var paramSets = this._collection.map(this._evaluateOptions(this._parameters));
var durations = this._collection.map(this._evaluateOptions(this._duration));

var maxDuration = durations.reduce(function(a,b) { return a > b ? a : b; }, -Infinity);
var callbackAttached = false;

var after = this._afterCallback, before = this._beforeCallback;

this._collection.forEach(function(element, i) {
var parameters = paramSets[i], duration = durations[i];
var anim = new YAHOO.util.ColorAnim(element.node, parameters, duration, this._easing);
anim.onComplete.subscribe(function() {
if (YAHOO.env.ua.ie && (parameters.opacity || {}).to !== undefined)
element.setStyle({opacity: parameters.opacity.to});

if (after) after(element, i);

if (duration == maxDuration && !callbackAttached) {
callbackAttached = true;
this.chain.fire(this._collection);
}
}.bind(this));
if (before) before(element, i);
anim.animate();
}, this);
}
});
/**
* @overview
* <p>The <tt>Animation</tt> class is used to set up all animations in Ojay. It is entirely
* for internal consumption, and not to be accessed directly. Use the <tt>animate</tt> method
* in <tt>DomCollection</tt> instead, and look to that for documentation.</p>
* @constructor
* @class Animation
*/
Ojay.Animation = new JS.Class(/** @scope Ojay.Animation.prototype */{

/**
* @param {DomCollection} elements
* @param {Object|Function} parameters
* @param {Number|Function} duration
* @param {Object} options
*/
initialize: function(elements, parameters, duration, options) {
this._collection = elements;
this._parameters = parameters || {};
this._duration = duration || 1.0;
this._options = options || {};
this._easing = YAHOO.util.Easing[this._options.easing || 'easeBoth'];
var after = this._options.after, before = this._options.before;
this._afterCallback = after && Function.from(after);
this._beforeCallback = before && Function.from(before);
this.chain = new JS.MethodChain;
},

/**
* @param {Object|Function} options
* @param {DomCollection} element
* @param {Number} i
* @returns {Object}
*/
_evaluateOptions: function(options, element, i) {
if (typeof options == 'function') options = options(i, element);
if (typeof options != 'object') return options;
var results = {};
for (var field in options) results[field] = arguments.callee(options[field], element, i);
return results;
}.curry(),

/**
* <p>Runs the animation.</p>
*/
run: function() {
var paramSets = this._collection.map(this._evaluateOptions(this._parameters));
var durations = this._collection.map(this._evaluateOptions(this._duration));

var maxDuration = durations.reduce(function(a,b) { return a > b ? a : b; }, -Infinity);
var callbackAttached = false;

var after = this._afterCallback, before = this._beforeCallback;

this._collection.forEach(function(element, i) {
var parameters = paramSets[i], duration = durations[i];
var anim = new YAHOO.util.ColorAnim(element.node, parameters, duration, this._easing);
anim.onComplete.subscribe(function() {
if (YAHOO.env.ua.ie && (parameters.opacity || {}).to !== undefined)
element.setStyle({opacity: parameters.opacity.to});

if (after) after(element, i);

if (duration == maxDuration && !callbackAttached) {
callbackAttached = true;
this.chain.fire(this._collection);
}
}.bind(this));
if (before) before(element, i);
anim.animate();
}, this);
}
});
Loading

0 comments on commit 39d17b8

Please sign in to comment.