User: roelofb
Date: 2010/01/13 04:03 AM

Modified:
 
/MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/StaticResourceRegistry/
  DefaultStaticResourceRegistryTestCase.cs
 /MonoRail/trunk/src/Castle.MonoRail.Framework/JSResources/
  Ajax.resx, Effects2.resx

Log:
 Applied patch by Artur Dorochowicz: update Prototype Scriptaculous to newest 
versions.

File Changes:

Directory: /MonoRail/trunk/src/Castle.MonoRail.Framework/JSResources/
=====================================================================

File [modified]: Ajax.resx
Delta lines: +46 -43
===================================================================

--- MonoRail/trunk/src/Castle.MonoRail.Framework/JSResources/Effects2.resx      
2010-01-13 10:41:28 UTC (rev 6656)
+++ MonoRail/trunk/src/Castle.MonoRail.Framework/JSResources/Effects2.resx      
2010-01-13 11:03:51 UTC (rev 6657)
@@ -61,9 +61,9 @@
   <data name="functions" xml:space="preserve">
     <value><![CDATA[
 
-// script.aculo.us scriptaculous.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
+// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -87,10 +87,18 @@
 // For details, see the script.aculo.us web site: http://script.aculo.us/
 
 var Scriptaculous = {
-  Version: '1.8.2',
+  Version: '1.8.3',
   require: function(libraryName) {
-    // inserting via DOM fails in Safari 2.0, so brute force approach
-    document.write('<script type="text/javascript" 
src="'+libraryName+'"><\/script>');
+    try{
+      // inserting via DOM fails in Safari 2.0, so brute force approach
+      document.write('<script type="text/javascript" 
src="'+libraryName+'"><\/script>');
+    } catch(e) {
+      // for xhtml+xml served content, fall back to DOM methods
+      var script = document.createElement('script');
+      script.type = 'text/javascript';
+      script.src = libraryName;
+      document.getElementsByTagName('head')[0].appendChild(script);
+    }
   },
   REQUIRED_PROTOTYPE: '1.6.0.3',
   load: function() {
@@ -123,9 +131,9 @@
 Scriptaculous.load();
 
 
-// script.aculo.us builder.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
+// Copyright (c) 2005-2009 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/
@@ -261,9 +269,9 @@
 };
 
 
-// script.aculo.us effects.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
+// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
 // Contributors:
 //  Justin Palmer (http://encytemedia.com/)
 //  Mark Pilgrim (http://diveintomark.org/)
@@ -410,14 +418,13 @@
     '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 || {}));
   }
 };
 
@@ -493,12 +500,6 @@
 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;
@@ -1393,10 +1394,9 @@
 Element.addMethods(Effect.Methods);
 
 
-// script.aculo.us dragdrop.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us dragdrop.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
-//           (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, 
[email protected])
+// Copyright (c) 2005-2009 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/
@@ -1708,7 +1708,7 @@
         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);
@@ -1851,7 +1851,7 @@
   },
 
   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;
@@ -2127,7 +2127,7 @@
     }
 
     // keep reference
-    this.sortables[element.id] = options;
+    this.sortables[element.identify()] = options;
 
     // for onupdate
     Draggables.addObserver(new SortableObserver(element, options.onUpdate));
@@ -2222,7 +2222,7 @@
           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')
@@ -2370,11 +2370,11 @@
 };
 
 
-// script.aculo.us controls.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// 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-2009 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
+//           (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+//           (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
 // Contributors:
 //  Richard Livsey
 //  Rahul Bhargava
@@ -3337,9 +3337,9 @@
 });
 
 
-// script.aculo.us slider.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us slider.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Marty Haught, Thomas Fuchs
+// Copyright (c) 2005-2009 Marty Haught, Thomas Fuchs
 //
 // 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/
@@ -3548,12 +3548,12 @@
         var pointer  = [Event.pointerX(event), Event.pointerY(event)];
         var track = handle;
         if (track==this.track) {
-          var offsets  = Position.cumulativeOffset(this.track);
+          var offsets  = this.track.cumulativeOffset();
           this.event = event;
           this.setValue(this.translateToValue(
            (this.isVertical() ? pointer[1]-offsets[1] : 
pointer[0]-offsets[0])-(this.handleLength/2)
           ));
-          var offsets  = Position.cumulativeOffset(this.activeHandle);
+          var offsets  = this.activeHandle.cumulativeOffset();
           this.offsetX = (pointer[0] - offsets[0]);
           this.offsetY = (pointer[1] - offsets[1]);
         } else {
@@ -3566,7 +3566,7 @@
             this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
             this.updateStyles();
 
-            var offsets  = Position.cumulativeOffset(this.activeHandle);
+            var offsets  = this.activeHandle.cumulativeOffset();
             this.offsetX = (pointer[0] - offsets[0]);
             this.offsetY = (pointer[1] - offsets[1]);
           }
@@ -3585,7 +3585,7 @@
   },
   draw: function(event) {
     var pointer = [Event.pointerX(event), Event.pointerY(event)];
-    var offsets = Position.cumulativeOffset(this.track);
+    var offsets = this.track.cumulativeOffset();
     pointer[0] -= this.offsetX + offsets[0];
     pointer[1] -= this.offsetY + offsets[1];
     this.event = event;
@@ -3614,9 +3614,9 @@
 });
 
 
-// script.aculo.us sound.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
+// script.aculo.us sound.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
 
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
+// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, 
http://mir.aculo.us)
 //
 // Based on code created by Jules Gravinese (http://www.webveteran.com/)
 //
@@ -3666,11 +3666,14 @@
 if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
   if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return 
p.name.indexOf('QuickTime') != -1 }))
     Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" 
height="0" type="audio/mpeg" data="#{url}"/>');
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ 
return p.name.indexOf('Windows Media') != -1 }))
+    Sound.template = new Template('<object id="sound_#{track}_#{id}" 
type="application/x-mplayer2" data="#{url}"></object>');
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ 
return p.name.indexOf('RealPlayer') != -1 }))
+    Sound.template = new Template('<embed type="audio/x-pn-realaudio-plugin" 
style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" 
autostart="true" hidden="true"/>');
   else
     Sound.play = function(){};
-}
+} 
 
-]]>
-    </value>
+]]></value>
   </data>

File [modified]: Effects2.resx
Delta lines: +3 -3
===================================================================

--- 
MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/StaticResourceRegistry/DefaultStaticResourceRegistryTestCase.cs
 2010-01-13 10:41:28 UTC (rev 6656)
+++ 
MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/StaticResourceRegistry/DefaultStaticResourceRegistryTestCase.cs
 2010-01-13 11:03:51 UTC (rev 6657)
@@ -89,8 +89,8 @@
                {
                        string mime;
                        DateTime? lastMod;
-                       Assert.AreEqual("\r\n/*  Prototype JavaScript 
framework, version 1.6.0.3\r\n *  (c)",
-                               registry.GetResource("AjaxScripts", null, null, 
out mime, out lastMod).Substring(0, 62));
+                       Assert.AreEqual("\r\n/*  Prototype JavaScript 
framework, version 1.6.1\r\n *  (c)",
+                               registry.GetResource("AjaxScripts", null, null, 
out mime, out lastMod).Substring(0, 60));
                        Assert.AreEqual("text/javascript", mime);
                }
 
@@ -141,7 +141,7 @@
                {
                        string mime;
                        DateTime? lastMod;
-                       Assert.AreEqual("\r\n\r\n// script.aculo.us 
scriptaculous.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008\r\n",
+                       Assert.AreEqual("\r\n\r\n// script.aculo.us 
scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009\r\n",
                                registry.GetResource("Effects2", null, null, 
out mime, out lastMod).Substring(0, 80));
                        Assert.AreEqual("text/javascript", mime);

Directory: 
/MonoRail/trunk/src/Castle.MonoRail.Framework.Tests/Services/StaticResourceRegistry/
===============================================================================================

File [modified]: DefaultStaticResourceRegistryTestCase.cs
Delta lines: +0 -0
===================================================================

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-commits?hl=en.


Reply via email to