equipment 1.4.94 → 1.4.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGES CHANGED
@@ -1,5 +1,12 @@
1
1
  = Equipment Changelog
2
2
 
3
+ == Version 1.4.96
4
+
5
+ This is a hotfix release. When using Ext::Forward, you could have infinite
6
+ exception loops and Camping loose the database connection.
7
+
8
+ * lib/ext/mount.rb : Fixed custom dirlisting.
9
+
3
10
  == Version 1.4.94
4
11
 
5
12
  This release introduces the new camping_command. It used the Camping controller
data/Rakefile CHANGED
@@ -28,7 +28,7 @@ PKG_NAME = "equipment"
28
28
  PKG_DESC = <<-EOF
29
29
  Equipment is a set of extensions you can use with your Camping apps.
30
30
  EOF
31
- PKG_VERSION = "1.4.94"
31
+ PKG_VERSION = "1.4.96"
32
32
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
33
33
  PKG_FILES = FileList[
34
34
  '[A-Z]*',
data/lib/ext/forward.rb CHANGED
@@ -43,12 +43,12 @@ module Ext
43
43
  super
44
44
  app.module_eval do
45
45
  def self.run(r=$stdin,e=ENV)
46
- puts "REQUEST: `#{e['PATH_INFO']}`" if $DBG
46
+ puts "REQUEST: `#{e['REQUEST_URI']}`" if $DBG
47
47
  self::Controllers.M
48
48
  k, a = self::Controllers.D un("/#{e['PATH_INFO']}".gsub(%r!/+!,'/'))
49
49
  begin
50
50
  puts " --> #{k}" if $DBG
51
- k.new(r,e,(m=m||e['REQUEST_METHOD']||'GET')).service(*a)
51
+ k.new(r,e,(m=m||e['REQUEST_METHOD']||'GET')).Y.service(*a)
52
52
  rescue Forwarder => fw
53
53
  k, m, a = fw.controller, fw.method, fw.args
54
54
 
@@ -58,11 +58,11 @@ module Ext
58
58
  end
59
59
 
60
60
  retry
61
- rescue Exception => x
61
+ rescue => x
62
62
  pp x if $DBG
63
63
  pp x.backtrace if $DBG
64
64
  k, a, m = self::Controllers::ServerError, [k,m,x], 'GET'
65
- retry
65
+ k.new(r,e,m).service(*a)
66
66
  end
67
67
  end
68
68
  end
data/lib/ext/mount.rb CHANGED
@@ -106,7 +106,7 @@ module Ext
106
106
  class_short = self.class.name.gsub(/^.*::/,'').downcase
107
107
 
108
108
  view_name = "#{class_short}_listing"
109
- if app::Views.instance_method(view_name)
109
+ if app::Views.method_defined?(view_name)
110
110
  render view_name
111
111
  else
112
112
  render(:mount_listing)
@@ -125,9 +125,7 @@ module Ext
125
125
  self::r << klass # register route
126
126
 
127
127
  if $DBG
128
- puts "** mounted #{path}"
129
- puts "Controller : #{klass}"
130
- puts "Options : #{opts.inspect}"
128
+ puts "** mounted #{klass} => #{path}"
131
129
  end
132
130
 
133
131
  klass
data/share/js/jquery.js CHANGED
@@ -5,17 +5,14 @@
5
5
  * Dual licensed under the MIT (MIT-LICENSE.txt)
6
6
  * and GPL (GPL-LICENSE.txt) licenses.
7
7
  *
8
- * $Date: 2006-08-22 01:00:07 -0400 (Tue, 22 Aug 2006) $
9
- * $Rev: 221 $
8
+ * $Date: 2006-08-31 13:26:31 -0400 (Thu, 31 Aug 2006) $
9
+ * $Rev: 249 $
10
10
  */
11
11
 
12
12
  // Global undefined variable
13
13
  window.undefined = window.undefined;
14
14
  function jQuery(a,c) {
15
15
 
16
- // Initalize the extra macro functions
17
- if ( !jQuery.initDone ) jQuery.init();
18
-
19
16
  // Shortcut for document ready (because $(document).each() is silly)
20
17
  if ( a && a.constructor == Function && jQuery.fn.ready )
21
18
  return jQuery(document).ready(a);
@@ -23,25 +20,6 @@ function jQuery(a,c) {
23
20
  // Make sure that a selection was provided
24
21
  a = a || jQuery.context || document;
25
22
 
26
- /*
27
- * Handle support for overriding other $() functions. Way too many libraries
28
- * provide this function to simply ignore it and overwrite it.
29
- */
30
- /*
31
- // Check to see if this is a possible collision case
32
- if ( jQuery._$ && !c && a.constructor == String &&
33
-
34
- // Make sure that the expression is a colliding one
35
- !/[^a-zA-Z0-9_-]/.test(a) &&
36
-
37
- // and that there are no elements that match it
38
- // (this is the one truly ambiguous case)
39
- !document.getElementsByTagName(a).length )
40
-
41
- // Use the default method, in case it works some voodoo
42
- return jQuery._$( a );
43
- */
44
-
45
23
  // Watch for when a jQuery object is passed as the selector
46
24
  if ( a.jquery )
47
25
  return $( jQuery.merge( a, [] ) );
@@ -66,20 +44,23 @@ function jQuery(a,c) {
66
44
  // Find the matching elements and save them for later
67
45
  jQuery.find( a, c ) );
68
46
 
47
+ // See if an extra function was provided
69
48
  var fn = arguments[ arguments.length - 1 ];
49
+
50
+ // If so, execute it in context
70
51
  if ( fn && fn.constructor == Function )
71
52
  this.each(fn);
72
53
  }
73
54
 
74
55
  // Map over the $ in case of overwrite
75
- if ( $ )
56
+ if ( typeof $ != "undefined" )
76
57
  jQuery._$ = $;
77
58
 
78
59
  // Map the jQuery namespace to the '$' one
79
60
  var $ = jQuery;
80
61
 
81
62
  jQuery.fn = jQuery.prototype = {
82
- jquery: "$Rev: 221 $",
63
+ jquery: "$Rev: 249 $",
83
64
 
84
65
  size: function() {
85
66
  return this.length;
@@ -150,8 +131,9 @@ jQuery.fn = jQuery.prototype = {
150
131
  for ( var j = 0; j < e.length; j++ ) {
151
132
  var r = e[j].childNodes;
152
133
  for ( var i = 0; i < r.length; i++ )
153
- t += r[i].nodeType != 1 ?
154
- r[i].nodeValue : jQuery.fn.text([ r[i] ]);
134
+ if ( r[i].nodeType != 8 )
135
+ t += r[i].nodeType != 1 ?
136
+ r[i].nodeValue : jQuery.fn.text([ r[i] ]);
155
137
  }
156
138
  return t;
157
139
  },
@@ -363,7 +345,7 @@ jQuery.extend({
363
345
  new RegExp("(^|\\s*\\b[^-])"+c+"($|\\b(?=[^-]))", "g"), "");
364
346
  },
365
347
  has: function(e,a) {
366
- if ( e.className )
348
+ if ( e.className != undefined )
367
349
  e = e.className;
368
350
  return new RegExp("(^|\\s)" + a + "(\\s|$)").test(e);
369
351
  }
@@ -391,36 +373,54 @@ jQuery.extend({
391
373
  if (jQuery.css(e,"display") != "none") {
392
374
  oHeight = e.offsetHeight;
393
375
  oWidth = e.offsetWidth;
394
- } else
395
- jQuery.swap( e, { visibility: "hidden", position: "absolute", display: "" },
396
- function(){
397
- oHeight = e.clientHeight;
398
- oWidth = e.clientWidth;
399
- });
376
+ } else {
377
+ e = $(e.cloneNode(true)).css({
378
+ visibility: "hidden", position: "absolute", display: "block"
379
+ }).prependTo("body")[0];
380
+
381
+ oHeight = e.clientHeight;
382
+ oWidth = e.clientWidth;
383
+
384
+ e.parentNode.removeChild(e);
385
+ }
400
386
  });
401
387
 
402
388
  return p == "height" ? oHeight : oWidth;
403
389
  } else if ( p == "opacity" && jQuery.browser.msie )
404
- return parseFloat( jQuery.curCSS(e,"filter").replace(/[^0-9.]/,"") ) || 1;
390
+ return parseFloat( jQuery.curCSS(e,"filter").replace(/[^0-9.]/,"") ) || 1;
405
391
 
406
392
  return jQuery.curCSS( e, p );
407
393
  },
408
394
 
409
- curCSS: function(e,p,force) {
410
- var r;
395
+ curCSS: function(elem, prop, force) {
396
+ var ret;
411
397
 
412
- if (!force && e.style[p])
413
- r = e.style[p];
414
- else if (e.currentStyle) {
415
- p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
416
- r = e.currentStyle[p];
398
+ if (!force && elem.style[prop]) {
399
+
400
+ ret = elem.style[prop];
401
+
402
+ } else if (elem.currentStyle) {
403
+
404
+ var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
405
+ ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
406
+
417
407
  } else if (document.defaultView && document.defaultView.getComputedStyle) {
418
- p = p.replace(/([A-Z])/g,"-$1").toLowerCase();
419
- var s = document.defaultView.getComputedStyle(e,"");
420
- r = s ? s.getPropertyValue(p) : null;
408
+
409
+ prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
410
+ var cur = document.defaultView.getComputedStyle(elem, null);
411
+
412
+ if ( cur )
413
+ ret = cur.getPropertyValue(prop);
414
+ else if ( prop == 'display' )
415
+ ret = 'none';
416
+ else
417
+ jQuery.swap(elem, { display: 'block' }, function() {
418
+ ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop);
419
+ });
420
+
421
421
  }
422
422
 
423
- return r;
423
+ return ret;
424
424
  },
425
425
 
426
426
  clean: function(a) {
@@ -476,6 +476,7 @@ jQuery.extend({
476
476
  odd: "i%2",
477
477
 
478
478
  // Child Checks
479
+ "nth-child": "jQuery.sibling(a,m[3]).cur",
479
480
  "first-child": "jQuery.sibling(a,0).cur",
480
481
  "last-child": "jQuery.sibling(a,0).last",
481
482
  "only-child": "jQuery.sibling(a).length==1",
@@ -556,6 +557,8 @@ jQuery.extend({
556
557
  var foundToken = false;
557
558
 
558
559
  for ( var i = 0; i < jQuery.token.length; i += 2 ) {
560
+ if ( foundToken ) continue;
561
+
559
562
  var re = new RegExp("^(" + jQuery.token[i] + ")");
560
563
  var m = re.exec(t);
561
564
 
@@ -592,8 +595,9 @@ jQuery.extend({
592
595
  );
593
596
  }
594
597
  }
595
- }
596
598
 
599
+ }
600
+
597
601
  if ( t ) {
598
602
  var val = jQuery.filter(t,r);
599
603
  ret = r = val.r;
@@ -618,28 +622,28 @@ jQuery.extend({
618
622
  return r;
619
623
  },
620
624
 
621
- attr: function(o,a,v){
622
- if ( a && a.constructor == String ) {
623
- var fix = {
624
- "for": "htmlFor",
625
- "class": "className",
626
- "float": "cssFloat"
627
- };
628
-
629
- a = (fix[a] && fix[a].replace && fix[a] || a)
630
- .replace(/-([a-z])/ig,function(z,b){
631
- return b.toUpperCase();
632
- });
633
-
634
- if ( v != undefined ) {
635
- o[a] = v;
636
- if ( o.setAttribute && a != "disabled" )
637
- o.setAttribute(a,v);
638
- }
639
-
640
- return o[a] || o.getAttribute && o.getAttribute(a) || "";
641
- } else
642
- return "";
625
+ attr: function(elem, name, value){
626
+ var fix = {
627
+ "for": "htmlFor",
628
+ "class": "className",
629
+ "float": "cssFloat",
630
+ innerHTML: "innerHTML",
631
+ className: "className",
632
+ value: "value",
633
+ disabled: "disabled"
634
+ };
635
+
636
+ if ( fix[name] ) {
637
+ if ( value != undefined ) elem[fix[name]] = value;
638
+ return elem[fix[name]];
639
+ } else if ( elem.getAttribute ) {
640
+ if ( value != undefined ) elem.setAttribute( name, value );
641
+ return elem.getAttribute( name, 2 );
642
+ } else {
643
+ name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
644
+ if ( value != undefined ) elem[name] = value;
645
+ return elem[name];
646
+ }
643
647
  },
644
648
 
645
649
  // The regular expressions that power the parsing engine
@@ -717,92 +721,96 @@ jQuery.extend({
717
721
  trim: function(t){
718
722
  return t.replace(/^\s+|\s+$/g, "");
719
723
  },
720
- parents: function(a){
721
- var b = [];
722
- var c = a.parentNode;
723
- while ( c && c != document ) {
724
- b.push( c );
725
- c = c.parentNode;
724
+ parents: function( elem ){
725
+ var matched = [];
726
+ var cur = elem.parentNode;
727
+ while ( cur && cur != document ) {
728
+ matched.push( cur );
729
+ cur = cur.parentNode;
726
730
  }
727
- return b;
728
- },
729
- sibling: function(a,n) {
730
- var type = [];
731
- var tmp = a.parentNode.childNodes;
732
- for ( var i = 0; i < tmp.length; i++ ) {
733
- if ( tmp[i].nodeType == 1 )
734
- type.push( tmp[i] );
735
- if ( tmp[i] == a )
736
- type.n = type.length - 1;
731
+ return matched;
732
+ },
733
+ sibling: function(elem, pos, not) {
734
+ var elems = [];
735
+
736
+ var siblings = elem.parentNode.childNodes;
737
+ for ( var i = 0; i < siblings.length; i++ ) {
738
+ if ( not === true && siblings[i] == elem ) continue;
739
+
740
+ if ( siblings[i].nodeType == 1 )
741
+ elems.push( siblings[i] );
742
+ if ( siblings[i] == elem )
743
+ elems.n = elems.length - 1;
737
744
  }
738
- type.last = type.n == type.length - 1;
739
- type.cur =
740
- n == "even" && type.n % 2 == 0 ||
741
- n == "odd" && type.n % 2 ||
742
- type[n] == a;
743
- type.prev = type[type.n - 1];
744
- type.next = type[type.n + 1];
745
- return type;
746
- },
747
- merge: function(a,b) {
748
- var d = [];
745
+
746
+ return jQuery.extend( elems, {
747
+ last: elems.n == elems.length - 1,
748
+ cur: pos == "even" && elems.n % 2 == 0 || pos == "odd" && elems.n % 2 || elems[pos] == elem,
749
+ prev: elems[elems.n - 1],
750
+ next: elems[elems.n + 1]
751
+ });
752
+ },
753
+ merge: function(first, second) {
754
+ var result = [];
749
755
 
750
756
  // Move b over to the new array (this helps to avoid
751
757
  // StaticNodeList instances)
752
- for ( var k = 0; k < a.length; k++ )
753
- d[k] = a[k];
758
+ for ( var k = 0; k < first.length; k++ )
759
+ result[k] = first[k];
754
760
 
755
761
  // Now check for duplicates between a and b and only
756
762
  // add the unique items
757
- for ( var i = 0; i < b.length; i++ ) {
758
- var c = true;
763
+ for ( var i = 0; i < second.length; i++ ) {
764
+ var noCollision = true;
759
765
 
760
766
  // The collision-checking process
761
- for ( var j = 0; j < a.length; j++ )
762
- if ( b[i] == a[j] )
763
- c = false;
767
+ for ( var j = 0; j < first.length; j++ )
768
+ if ( second[i] == first[j] )
769
+ noCollision = false;
764
770
 
765
771
  // If the item is unique, add it
766
- if ( c )
767
- d.push( b[i] );
772
+ if ( noCollision )
773
+ result.push( second[i] );
768
774
  }
769
775
 
770
- return d;
776
+ return result;
771
777
  },
772
- grep: function(a,f,s) {
778
+ grep: function(elems, fn, inv) {
773
779
  // If a string is passed in for the function, make a function
774
780
  // for it (a handy shortcut)
775
- if ( f.constructor == String )
776
- f = new Function("a","i","return " + f);
781
+ if ( fn.constructor == String )
782
+ fn = new Function("a","i","return " + fn);
777
783
 
778
- var r = [];
784
+ var result = [];
779
785
 
780
786
  // Go through the array, only saving the items
781
787
  // that pass the validator function
782
- for ( var i = 0; i < a.length; i++ )
783
- if ( !s && f(a[i],i) || s && !f(a[i],i) )
784
- r.push( a[i] );
788
+ for ( var i = 0; i < elems.length; i++ )
789
+ if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
790
+ result.push( elems[i] );
785
791
 
786
- return r;
792
+ return result;
787
793
  },
788
- map: function(a,f) {
794
+ map: function(elems, fn) {
789
795
  // If a string is passed in for the function, make a function
790
796
  // for it (a handy shortcut)
791
- if ( f.constructor == String )
792
- f = new Function("a","return " + f);
797
+ if ( fn.constructor == String )
798
+ fn = new Function("a","return " + fn);
793
799
 
794
- var r = [];
800
+ var result = [];
795
801
 
796
802
  // Go through the array, translating each of the items to their
797
803
  // new value (or values).
798
- for ( var i = 0; i < a.length; i++ ) {
799
- var t = f(a[i],i);
800
- if ( t !== null && t != undefined ) {
801
- if ( t.constructor != Array ) t = [t];
802
- r = jQuery.merge( r, t );
804
+ for ( var i = 0; i < elems.length; i++ ) {
805
+ var val = fn(elems[i],i);
806
+
807
+ if ( val !== null && val != undefined ) {
808
+ if ( val.constructor != Array ) val = [val];
809
+ result = jQuery.merge( result, val );
803
810
  }
804
811
  }
805
- return r;
812
+
813
+ return result;
806
814
  },
807
815
 
808
816
  /*
@@ -991,7 +999,7 @@ jQuery.macros = {
991
999
 
992
1000
  siblings: jQuery.sibling,
993
1001
 
994
- children: "a.childNodes"
1002
+ children: "jQuery.sibling(a.firstChild)"
995
1003
  },
996
1004
 
997
1005
  each: {
@@ -999,20 +1007,19 @@ jQuery.macros = {
999
1007
  removeAttr: function( key ) {
1000
1008
  this.removeAttribute( key );
1001
1009
  },
1002
- _show: function(){
1010
+ show: function(){
1003
1011
  this.style.display = this.oldblock ? this.oldblock : "";
1004
1012
  if ( jQuery.css(this,"display") == "none" )
1005
1013
  this.style.display = "block";
1006
1014
  },
1007
- _hide: function(){
1015
+ hide: function(){
1008
1016
  this.oldblock = this.oldblock || jQuery.css(this,"display");
1009
1017
  if ( this.oldblock == "none" )
1010
1018
  this.oldblock = "block";
1011
1019
  this.style.display = "none";
1012
1020
  },
1013
- _toggle: function(){
1014
- var d = jQuery.css(this,"display");
1015
- $(this)[ !d || d == "none" ? "show" : "hide" ]();
1021
+ toggle: function(){
1022
+ $(this)[ $(this).is(":hidden") ? "show" : "hide" ].apply( $(this), arguments );
1016
1023
  },
1017
1024
  addClass: function(c){
1018
1025
  jQuery.className.add(this,c);
@@ -1025,7 +1032,7 @@ jQuery.macros = {
1025
1032
  },
1026
1033
 
1027
1034
  remove: function(a){
1028
- if ( !a || jQuery.filter( [this], a ).r )
1035
+ if ( !a || jQuery.filter( a, [this] ).r )
1029
1036
  this.parentNode.removeChild( this );
1030
1037
  },
1031
1038
  empty: function(){
@@ -1046,15 +1053,17 @@ jQuery.macros = {
1046
1053
  }
1047
1054
  }
1048
1055
  };
1056
+
1057
+ jQuery.init();
1049
1058
  jQuery.fn.extend({
1050
1059
 
1051
1060
  // We're overriding the old toggle function, so
1052
1061
  // remember it for later
1053
- //_toggle: jQuery.fn.toggle,
1062
+ _toggle: jQuery.fn.toggle,
1054
1063
  toggle: function(a,b) {
1055
1064
  // If two functions are passed in, we're
1056
1065
  // toggling on a click
1057
- return a && b ? this.click(function(e){
1066
+ return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){
1058
1067
  // Figure out which function to execute
1059
1068
  this.last = this.last == a ? b : a;
1060
1069
 
@@ -1066,9 +1075,9 @@ jQuery.fn.extend({
1066
1075
  }) :
1067
1076
 
1068
1077
  // Otherwise, execute the old toggle function
1069
- this._toggle();
1078
+ this._toggle.apply( this, arguments );
1070
1079
  },
1071
-
1080
+
1072
1081
  hover: function(f,g) {
1073
1082
 
1074
1083
  // A private function for haandling mouse 'hovering'
@@ -1188,8 +1197,9 @@ new function(){
1188
1197
  // Use the defer script hack
1189
1198
  var script = document.getElementById("__ie_init");
1190
1199
  script.onreadystatechange = function() {
1191
- if ( this.readyState == "complete" )
1192
- jQuery.ready();
1200
+ if ( this.readyState != "complete" ) return;
1201
+ this.parentNode.removeChild( this );
1202
+ jQuery.ready();
1193
1203
  };
1194
1204
 
1195
1205
  // Clear from memory
@@ -1220,7 +1230,7 @@ new function(){
1220
1230
  jQuery.fn.extend({
1221
1231
 
1222
1232
  // overwrite the old show method
1223
- //_show: jQuery.fn.show,
1233
+ _show: jQuery.fn.show,
1224
1234
 
1225
1235
  show: function(speed,callback){
1226
1236
  return speed ? this.animate({
@@ -1229,7 +1239,7 @@ jQuery.fn.extend({
1229
1239
  },
1230
1240
 
1231
1241
  // Overwrite the old hide method
1232
- //_hide: jQuery.fn.hide,
1242
+ _hide: jQuery.fn.hide,
1233
1243
 
1234
1244
  hide: function(speed,callback){
1235
1245
  return speed ? this.animate({
@@ -1245,6 +1255,13 @@ jQuery.fn.extend({
1245
1255
  return this.animate({height: "hide"}, speed, callback);
1246
1256
  },
1247
1257
 
1258
+ slideToggle: function(speed,callback){
1259
+ return this.each(function(){
1260
+ var state = $(this).is(":hidden") ? "show" : "hide";
1261
+ $(this).animate({height: state}, speed, callback);
1262
+ });
1263
+ },
1264
+
1248
1265
  fadeIn: function(speed,callback){
1249
1266
  return this.animate({opacity: "show"}, speed, callback);
1250
1267
  },
@@ -1258,14 +1275,17 @@ jQuery.fn.extend({
1258
1275
  },
1259
1276
  animate: function(prop,speed,callback) {
1260
1277
  return this.queue(function(){
1261
- var i = 0;
1278
+
1279
+ this.curAnim = prop;
1280
+
1262
1281
  for ( var p in prop ) {
1263
- var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p );
1282
+ var e = new jQuery.fx( this, jQuery.speed(speed,callback), p );
1264
1283
  if ( prop[p].constructor == Number )
1265
1284
  e.custom( e.cur(), prop[p] );
1266
1285
  else
1267
1286
  e[ prop[p] ]( prop );
1268
1287
  }
1288
+
1269
1289
  });
1270
1290
  },
1271
1291
  queue: function(type,fn){
@@ -1320,7 +1340,7 @@ jQuery.extend({
1320
1340
  }
1321
1341
  },
1322
1342
 
1323
- speed: function(s,o,i) {
1343
+ speed: function(s,o) {
1324
1344
  o = o || {};
1325
1345
 
1326
1346
  if ( o.constructor == Function )
@@ -1336,9 +1356,6 @@ jQuery.extend({
1336
1356
  if ( o.oldComplete && o.oldComplete.constructor == Function )
1337
1357
  o.oldComplete.apply( this );
1338
1358
  };
1339
-
1340
- if ( i > 0 )
1341
- o.complete = null;
1342
1359
 
1343
1360
  return o;
1344
1361
  },
@@ -1388,7 +1405,7 @@ jQuery.extend({
1388
1405
  options.step.apply( elem, [ z.now ] );
1389
1406
 
1390
1407
  if ( prop == "opacity" ) {
1391
- if (z.now == 1) z.now = 0.9999;
1408
+ if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999;
1392
1409
  if (window.ActiveXObject)
1393
1410
  y.filter = "alpha(opacity=" + z.now*100 + ")";
1394
1411
  else
@@ -1397,6 +1414,7 @@ jQuery.extend({
1397
1414
  // My hate for IE will never die
1398
1415
  } else if ( parseInt(z.now) )
1399
1416
  y[prop] = parseInt(z.now) + "px";
1417
+
1400
1418
  y.display = "block";
1401
1419
  };
1402
1420
 
@@ -1407,7 +1425,8 @@ jQuery.extend({
1407
1425
 
1408
1426
  // Get the current size
1409
1427
  z.cur = function(){
1410
- return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max();
1428
+ var r = parseFloat( jQuery.curCSS(z.el, prop) );
1429
+ return r && r > -10000 ? r : z.max();
1411
1430
  };
1412
1431
 
1413
1432
  // Start an animation from one number to another
@@ -1445,7 +1464,7 @@ jQuery.extend({
1445
1464
  z.o.hide = true;
1446
1465
 
1447
1466
  // Begin the animation
1448
- z.custom(z.cur(),0);
1467
+ z.custom(z.el.orig[prop], 0);
1449
1468
  };
1450
1469
 
1451
1470
  // IE has trouble with opacity if it does not have layout
@@ -1457,7 +1476,6 @@ jQuery.extend({
1457
1476
  z.el.oldOverflow = jQuery.css( z.el, "overflow" );
1458
1477
 
1459
1478
  // Make sure that nothing sneaks out
1460
- //if ( z.el.oldOverlay == "visible" )
1461
1479
  y.overflow = "hidden";
1462
1480
 
1463
1481
  // Each step of an animation
@@ -1472,23 +1490,35 @@ jQuery.extend({
1472
1490
  z.now = lastNum;
1473
1491
  z.a();
1474
1492
 
1475
- // Hide the element if the "hide" operation was done
1476
- if ( z.o.hide ) y.display = 'none';
1477
-
1478
- // Reset the overflow
1479
- y.overflow = z.el.oldOverflow;
1480
-
1481
- // Reset the property, if the item has been hidden
1482
- if ( z.o.hide )
1483
- y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ?
1484
- z.el.orig[prop] + "px" : z.el.orig[prop];
1485
-
1486
- // set its height and/or width to auto
1487
- if ( prop == 'height' || prop == 'width' )
1488
- jQuery.setAuto( z.el, prop );
1493
+ z.el.curAnim[ prop ] = true;
1494
+
1495
+ var done = true;
1496
+ for ( var i in z.el.curAnim )
1497
+ if ( z.el.curAnim[i] !== true )
1498
+ done = false;
1499
+
1500
+ if ( done ) {
1501
+ // Reset the overflow
1502
+ y.overflow = z.el.oldOverflow;
1503
+
1504
+ // Hide the element if the "hide" operation was done
1505
+ if ( z.o.hide )
1506
+ y.display = 'none';
1507
+
1508
+ // Reset the property, if the item has been hidden
1509
+ if ( z.o.hide ) {
1510
+ for ( var p in z.el.curAnim ) {
1511
+ y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" );
1512
+
1513
+ // set its height and/or width to auto
1514
+ if ( p == 'height' || p == 'width' )
1515
+ jQuery.setAuto( z.el, p );
1516
+ }
1517
+ }
1518
+ }
1489
1519
 
1490
1520
  // If a callback was provided, execute it
1491
- if( z.o.complete && z.o.complete.constructor == Function )
1521
+ if( done && z.o.complete && z.o.complete.constructor == Function )
1492
1522
  // Execute the complete function
1493
1523
  z.o.complete.apply( z.el );
1494
1524
  } else {
@@ -1560,7 +1590,7 @@ jQuery.fn.load = function( url, params, callback, ifModified ) {
1560
1590
  };
1561
1591
 
1562
1592
  // If IE is used, create a wrapper for the XMLHttpRequest object
1563
- if ( jQuery.browser.msie )
1593
+ if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" )
1564
1594
  XMLHttpRequest = function(){
1565
1595
  return new ActiveXObject(
1566
1596
  navigator.userAgent.indexOf("MSIE 5") >= 0 ?
@@ -1764,6 +1794,9 @@ jQuery.extend({
1764
1794
  // If the type is "script", eval it
1765
1795
  if ( type == "script" ) eval.call( window, data );
1766
1796
 
1797
+ // Get the JavaScript object, if JSON is used.
1798
+ if ( type == "json" ) eval( "data = " + data );
1799
+
1767
1800
  return data;
1768
1801
  },
1769
1802
 
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: equipment
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.4.94
7
- date: 2006-10-02 00:00:00 +02:00
6
+ version: 1.4.96
7
+ date: 2006-10-12 00:00:00 +02:00
8
8
  summary: Equipment (for Camping)
9
9
  require_paths:
10
10
  - lib
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - Jonas Pfenniger
30
31
  files: