Skip to content

Commit

Permalink
Upgrade to Prototype 1.7 and Scripty 1.9.0
Browse files Browse the repository at this point in the history
Update tests to check for both Prototype version and Scripty version
Integrate in TapX Gradle build
  • Loading branch information
hlship committed Mar 30, 2011
1 parent e130462 commit 46e1ca9
Show file tree
Hide file tree
Showing 16 changed files with 2,438 additions and 1,212 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Bundles [Processing.js 0.9.7](http://processingjs.org/) as a component.
* Components:
* Processing

tapx-prototype
--------------

Patches Tapestry to Script.aculo.us 1.9.0 and Prototype 1.7.

tapx-templating
---------------
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include "tapx-core", "tapx-kaptcha", "tapx-datefield", "tapx-plainmessage", "tapx-templating", "tapx-yui", "tapx-processing"
include "tapx-core", "tapx-kaptcha", "tapx-datefield", "tapx-plainmessage"
include "tapx-prototype", "tapx-templating", "tapx-yui", "tapx-processing"
7 changes: 7 additions & 0 deletions tapx-prototype/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description = "Patch Tapestry's Prototype to version 1.7 and Script.aculo.us 1.9.0"

jar {
manifest {
attributes 'Tapestry-Module-Classes': 'com.howardlewisship.tapx.prototype.PrototypeModule'
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// script.aculo.us builder.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010

// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// script.aculo.us controls.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
// script.aculo.us controls.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010

// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2008 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
// (c) 2005-2008 Jon Tirsen (http://www.tirsen.com)
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2010 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
// (c) 2005-2010 Jon Tirsen (http://www.tirsen.com)
// Contributors:
// Richard Livsey
// Rahul Bhargava
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// script.aculo.us dragdrop.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
// script.aculo.us dragdrop.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010

// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
Expand Down Expand Up @@ -313,7 +312,7 @@ var Draggable = Class.create({
tag_name=='TEXTAREA')) return;

var pointer = [Event.pointerX(event), Event.pointerY(event)];
var pos = Position.cumulativeOffset(this.element);
var pos = this.element.cumulativeOffset();
this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });

Draggables.activate(this);
Expand Down Expand Up @@ -375,7 +374,7 @@ var Draggable = Class.create({
if (this.options.scroll == window) {
with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
} else {
p = Position.page(this.options.scroll);
p = Position.page(this.options.scroll).toArray();
p[0] += this.options.scroll.scrollLeft + Position.deltaX;
p[1] += this.options.scroll.scrollTop + Position.deltaY;
p.push(p[0]+this.options.scroll.offsetWidth);
Expand Down Expand Up @@ -456,7 +455,7 @@ var Draggable = Class.create({
},

draw: function(point) {
var pos = Position.cumulativeOffset(this.element);
var pos = this.element.cumulativeOffset();
if(this.options.ghosting) {
var r = Position.realOffset(this.element);
pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
Expand Down Expand Up @@ -732,7 +731,7 @@ var Sortable = {
}

// keep reference
this.sortables[element.id] = options;
this.sortables[element.identify()] = options;

// for onupdate
Draggables.addObserver(new SortableObserver(element, options.onUpdate));
Expand Down Expand Up @@ -827,7 +826,7 @@ var Sortable = {
hide().addClassName('dropmarker').setStyle({position:'absolute'});
document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
}
var offsets = Position.cumulativeOffset(dropon);
var offsets = dropon.cumulativeOffset();
Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});

if(position=='after')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// script.aculo.us effects.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
// script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010

// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// Contributors:
// Justin Palmer (http://encytemedia.com/)
// Mark Pilgrim (http://diveintomark.org/)
Expand Down Expand Up @@ -147,14 +147,13 @@ var Effect = {
'blind': ['BlindDown','BlindUp'],
'appear': ['Appear','Fade']
},
toggle: function(element, effect) {
toggle: function(element, effect, options) {
element = $(element);
effect = (effect || 'appear').toLowerCase();
var options = Object.extend({
effect = (effect || 'appear').toLowerCase();

return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({
queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
}, arguments[2] || { });
Effect[element.visible() ?
Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
}, options || {}));
}
};

Expand Down Expand Up @@ -230,12 +229,6 @@ Effect.Queue = Effect.Queues.get('global');
Effect.Base = Class.create({
position: null,
start: function(options) {
function codeForEvent(options,eventName){
return (
(options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
(options[eventName] ? 'this.options.'+eventName+'(this);' : '')
);
}
if (options && options.transition === false) options.transition = Effect.Transitions.linear;
this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { });
this.currentFrame = 0;
Expand Down
Loading

0 comments on commit 46e1ca9

Please sign in to comment.