Skip to content
This repository
Browse code

Upgrade to Prototype 1.7 and script.taculo.us 1.9.0.

  • Loading branch information...
commit 109a8a3cbe595c08cef8f0f7be943d0665137941 1 parent a487178
David E. Wheeler authored December 06, 2011
4  comp/media/js/builder.js
... ...
@@ -1,6 +1,6 @@
1  
-// script.aculo.us builder.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 4
 //
5 5
 // script.aculo.us is freely distributable under the terms of an MIT-style license.
6 6
 // For details, see the script.aculo.us web site: http://script.aculo.us/
15  comp/media/js/controls.js
... ...
@@ -1,8 +1,8 @@
1  
-// script.aculo.us controls.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us controls.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4  
-//           (c) 2005-2008 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
5  
-//           (c) 2005-2008 Jon Tirsen (http://www.tirsen.com)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
  4
+//           (c) 2005-2010 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
  5
+//           (c) 2005-2010 Jon Tirsen (http://www.tirsen.com)
6 6
 // Contributors:
7 7
 //  Richard Livsey
8 8
 //  Rahul Bhargava
@@ -107,9 +107,8 @@ Autocompleter.Base = Class.create({
107 107
 
108 108
   fixIEOverlapping: function() {
109 109
     Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
110  
-    var zIndex = this.update.getStyle('zIndex');
111  
-    if (zIndex < 2) this.update.style.zIndex = 2;
112  
-    this.iefix.style.zIndex = zIndex >= 2 ? zIndex - 1 : 1;
  110
+    this.iefix.style.zIndex = 1;
  111
+    this.update.style.zIndex = 2;
113 112
     Element.show(this.iefix);
114 113
   },
115 114
 
@@ -963,4 +962,4 @@ Form.Element.DelayedObserver = Class.create({
963 962
     this.timer = null;
964 963
     this.callback(this.element, $F(this.element));
965 964
   }
966  
-});
  965
+});
15  comp/media/js/dragdrop.js
... ...
@@ -1,7 +1,6 @@
1  
-// script.aculo.us dragdrop.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us dragdrop.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4  
-//           (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
5 4
 //
6 5
 // script.aculo.us is freely distributable under the terms of an MIT-style license.
7 6
 // For details, see the script.aculo.us web site: http://script.aculo.us/
@@ -313,7 +312,7 @@ var Draggable = Class.create({
313 312
         tag_name=='TEXTAREA')) return;
314 313
 
315 314
       var pointer = [Event.pointerX(event), Event.pointerY(event)];
316  
-      var pos     = Position.cumulativeOffset(this.element);
  315
+      var pos     = this.element.cumulativeOffset();
317 316
       this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
318 317
 
319 318
       Draggables.activate(this);
@@ -375,7 +374,7 @@ var Draggable = Class.create({
375 374
       if (this.options.scroll == window) {
376 375
         with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
377 376
       } else {
378  
-        p = Position.page(this.options.scroll);
  377
+        p = Position.page(this.options.scroll).toArray();
379 378
         p[0] += this.options.scroll.scrollLeft + Position.deltaX;
380 379
         p[1] += this.options.scroll.scrollTop + Position.deltaY;
381 380
         p.push(p[0]+this.options.scroll.offsetWidth);
@@ -456,7 +455,7 @@ var Draggable = Class.create({
456 455
   },
457 456
 
458 457
   draw: function(point) {
459  
-    var pos = Position.cumulativeOffset(this.element);
  458
+    var pos = this.element.cumulativeOffset();
460 459
     if(this.options.ghosting) {
461 460
       var r   = Position.realOffset(this.element);
462 461
       pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
@@ -732,7 +731,7 @@ var Sortable = {
732 731
     }
733 732
 
734 733
     // keep reference
735  
-    this.sortables[element.id] = options;
  734
+    this.sortables[element.identify()] = options;
736 735
 
737 736
     // for onupdate
738 737
     Draggables.addObserver(new SortableObserver(element, options.onUpdate));
@@ -827,7 +826,7 @@ var Sortable = {
827 826
           hide().addClassName('dropmarker').setStyle({position:'absolute'});
828 827
       document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
829 828
     }
830  
-    var offsets = Position.cumulativeOffset(dropon);
  829
+    var offsets = dropon.cumulativeOffset();
831 830
     Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
832 831
 
833 832
     if(position=='after')
21  comp/media/js/effects.js
... ...
@@ -1,6 +1,6 @@
1  
-// script.aculo.us effects.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 4
 // Contributors:
5 5
 //  Justin Palmer (http://encytemedia.com/)
6 6
 //  Mark Pilgrim (http://diveintomark.org/)
@@ -147,14 +147,13 @@ var Effect = {
147 147
     'blind':  ['BlindDown','BlindUp'],
148 148
     'appear': ['Appear','Fade']
149 149
   },
150  
-  toggle: function(element, effect) {
  150
+  toggle: function(element, effect, options) {
151 151
     element = $(element);
152  
-    effect = (effect || 'appear').toLowerCase();
153  
-    var options = Object.extend({
  152
+    effect  = (effect || 'appear').toLowerCase();
  153
+    
  154
+    return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({
154 155
       queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
155  
-    }, arguments[2] || { });
156  
-    Effect[element.visible() ?
157  
-      Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
  156
+    }, options || {}));
158 157
   }
159 158
 };
160 159
 
@@ -230,12 +229,6 @@ Effect.Queue = Effect.Queues.get('global');
230 229
 Effect.Base = Class.create({
231 230
   position: null,
232 231
   start: function(options) {
233  
-    function codeForEvent(options,eventName){
234  
-      return (
235  
-        (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
236  
-        (options[eventName] ? 'this.options.'+eventName+'(this);' : '')
237  
-      );
238  
-    }
239 232
     if (options && options.transition === false) options.transition = Effect.Transitions.linear;
240 233
     this.options      = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { });
241 234
     this.currentFrame = 0;
5,538  comp/media/js/prototype.js
3650 additions, 1888 deletions not shown
20  comp/media/js/scriptaculous.js
... ...
@@ -1,6 +1,6 @@
1  
-// script.aculo.us scriptaculous.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us scriptaculous.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 4
 //
5 5
 // Permission is hereby granted, free of charge, to any person obtaining
6 6
 // a copy of this software and associated documentation files (the
@@ -24,10 +24,18 @@
24 24
 // For details, see the script.aculo.us web site: http://script.aculo.us/
25 25
 
26 26
 var Scriptaculous = {
27  
-  Version: '1.8.2',
  27
+  Version: '1.9.0',
28 28
   require: function(libraryName) {
29  
-    // inserting via DOM fails in Safari 2.0, so brute force approach
30  
-    document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
  29
+    try{
  30
+      // inserting via DOM fails in Safari 2.0, so brute force approach
  31
+      document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
  32
+    } catch(e) {
  33
+      // for xhtml+xml served content, fall back to DOM methods
  34
+      var script = document.createElement('script');
  35
+      script.type = 'text/javascript';
  36
+      script.src = libraryName;
  37
+      document.getElementsByTagName('head')[0].appendChild(script);
  38
+    }
31 39
   },
32 40
   REQUIRED_PROTOTYPE: '1.6.0.3',
33 41
   load: function() {
@@ -46,7 +54,7 @@ var Scriptaculous = {
46 54
         Scriptaculous.REQUIRED_PROTOTYPE);
47 55
 
48 56
     var js = /scriptaculous\.js(\?.*)?$/;
49  
-    $$('head script[src]').findAll(function(s) {
  57
+    $$('script[src]').findAll(function(s) {
50 58
       return s.src.match(js);
51 59
     }).each(function(s) {
52 60
       var path = s.src.replace(js, ''),
12  comp/media/js/slider.js
... ...
@@ -1,6 +1,6 @@
1  
-// script.aculo.us slider.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us slider.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Marty Haught, Thomas Fuchs
  3
+// Copyright (c) 2005-2010 Marty Haught, Thomas Fuchs
4 4
 //
5 5
 // script.aculo.us is freely distributable under the terms of an MIT-style license.
6 6
 // For details, see the script.aculo.us web site: http://script.aculo.us/
@@ -209,12 +209,12 @@ Control.Slider = Class.create({
209 209
         var pointer  = [Event.pointerX(event), Event.pointerY(event)];
210 210
         var track = handle;
211 211
         if (track==this.track) {
212  
-          var offsets  = Position.cumulativeOffset(this.track);
  212
+          var offsets  = this.track.cumulativeOffset();
213 213
           this.event = event;
214 214
           this.setValue(this.translateToValue(
215 215
            (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
216 216
           ));
217  
-          var offsets  = Position.cumulativeOffset(this.activeHandle);
  217
+          var offsets  = this.activeHandle.cumulativeOffset();
218 218
           this.offsetX = (pointer[0] - offsets[0]);
219 219
           this.offsetY = (pointer[1] - offsets[1]);
220 220
         } else {
@@ -227,7 +227,7 @@ Control.Slider = Class.create({
227 227
             this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
228 228
             this.updateStyles();
229 229
 
230  
-            var offsets  = Position.cumulativeOffset(this.activeHandle);
  230
+            var offsets  = this.activeHandle.cumulativeOffset();
231 231
             this.offsetX = (pointer[0] - offsets[0]);
232 232
             this.offsetY = (pointer[1] - offsets[1]);
233 233
           }
@@ -246,7 +246,7 @@ Control.Slider = Class.create({
246 246
   },
247 247
   draw: function(event) {
248 248
     var pointer = [Event.pointerX(event), Event.pointerY(event)];
249  
-    var offsets = Position.cumulativeOffset(this.track);
  249
+    var offsets = this.track.cumulativeOffset();
250 250
     pointer[0] -= this.offsetX + offsets[0];
251 251
     pointer[1] -= this.offsetY + offsets[1];
252 252
     this.event = event;
10  comp/media/js/sound.js
... ...
@@ -1,6 +1,6 @@
1  
-// script.aculo.us sound.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
  1
+// script.aculo.us sound.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
2 2
 
3  
-// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
  3
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 4
 //
5 5
 // Based on code created by Jules Gravinese (http://www.webveteran.com/)
6 6
 //
@@ -50,6 +50,10 @@ Sound = {
50 50
 if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
51 51
   if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
52 52
     Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>');
  53
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 }))
  54
+    Sound.template = new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>');
  55
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 }))
  56
+    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"/>');
53 57
   else
54 58
     Sound.play = function(){};
55  
-}
  59
+} 
5  lib/Bric/Changes.pod
Source Rendered
@@ -163,6 +163,11 @@ an error whenever such drift is detected, in an effort to prevent it from
163 163
 happening at all. The migration that adds the triggers also corrects any
164 164
 existing drift. [David]
165 165
 
  166
+=item *
  167
+
  168
+Upgraded to Prototype 1.7 and script.taculo.us 1.9.0 to support newer browsers
  169
+(especially IE 9). [David]
  170
+
166 171
 =back
167 172
 
168 173
 =head2 Bug fixes

0 notes on commit 109a8a3

Please sign in to comment.
Something went wrong with that request. Please try again.