Author: pyaschenko
Date: 2009-02-25 12:12:01 -0500 (Wed, 25 Feb 2009)
New Revision: 12747
Modified:
trunk/framework/impl/generatescript.xml
trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
Log:
https://jira.jboss.org/jira/browse/RF-6282
Modified: trunk/framework/impl/generatescript.xml
===================================================================
--- trunk/framework/impl/generatescript.xml 2009-02-25 17:11:38 UTC (rev 12746)
+++ trunk/framework/impl/generatescript.xml 2009-02-25 17:12:01 UTC (rev 12747)
@@ -50,7 +50,7 @@
-->
<filelist id="jquery"
dir="${basedir}/src/main/javascript/jquery"
- files="jquery-1.3.1.js,noConflict.js,../memory.js,patches.js">
+ files="jquery-1.3.2.js,noConflict.js,../memory.js,patches.js">
</filelist>
<filelist id="scriptaculous"
Modified: trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-02-25 17:11:38
UTC (rev 12746)
+++ trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-02-25 17:12:01
UTC (rev 12747)
@@ -22,6 +22,10 @@
_$ = window.$,
jQuery = window.jQuery = window.$ = function( selector, context ) {
+ // RF: added for RichFaces components
+ if (arguments[0] == arguments.callee) {
+ return arguments.callee;
+ }
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context );
},
@@ -1266,7 +1270,7 @@
function num(elem, prop) {
return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
}
-var expando = "jQuery" + now(), uuid = 0, windowData = {};
+var expando = jQuery.expando = "jQuery" + now(), uuid = 0, windowData = {};
jQuery.extend({
cache: {},
@@ -4189,11 +4193,21 @@
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
body = doc.body, defaultView = doc.defaultView,
prevComputedStyle = defaultView.getComputedStyle(elem, null),
- top = elem.offsetTop, left = elem.offsetLeft;
+ top = elem.offsetTop, left = elem.offsetLeft,
+ isAbsolute = prevComputedStyle.position === "absolute"; //RF: added by
rf-team
+
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem
&& prevComputedStyle.position !== "fixed" ) {
+ computedStyle = defaultView.getComputedStyle(elem, null);
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem )
{
- computedStyle = defaultView.getComputedStyle(elem, null);
- top -= elem.scrollTop, left -= elem.scrollLeft;
+ //RF: added by rf-team
+ if ( (!isAbsolute && prevComputedStyle.position === "static") /*
add scroll for statically positioned elements */ ||
+ prevComputedStyle.position === "relative" /* not sure we need this - have
to test */ ||
+ elem === offsetParent /* add scroll offset of offsetParent element */ ) {
+ top -= elem.scrollTop, left -= elem.scrollLeft;
+ isAbsolute = prevComputedStyle.position === "absolute";
+ }
+ //RF: end
+
if ( elem === offsetParent ) {
top += elem.offsetTop, left += elem.offsetLeft;
if ( jQuery.offset.doesNotAddBorder &&
!(jQuery.offset.doesAddBorderForTableAndCells &&
/^t(able|d|h)$/i.test(elem.tagName)) )
@@ -4215,6 +4229,7 @@
top += Math.max(docElem.scrollTop, body.scrollTop),
left += Math.max(docElem.scrollLeft, body.scrollLeft);
+
return { top: top, left: left };
};