1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 12:05:57 +00:00

upgrade Dojo to 1.6.1

This commit is contained in:
Andrew Dolgov
2011-11-08 20:40:44 +04:00
parent 870a70e109
commit 81bea17aef
680 changed files with 51915 additions and 74107 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -9,6 +9,8 @@ if(!dojo._hasResource["dojo.window"]){ //_hasResource checks added by build. Do
dojo._hasResource["dojo.window"] = true;
dojo.provide("dojo.window");
dojo.getObject("window", true, dojo);
dojo.window.getBox = function(){
// summary:
// Returns the dimensions and scroll position of the viewable area of a browser window
@@ -62,7 +64,9 @@ dojo.window.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
return;
}
var backCompat = doc.compatMode == 'BackCompat',
clientAreaRoot = backCompat? body : html,
clientAreaRoot = (isIE >= 9 && node.ownerDocument.parentWindow.frameElement)
? ((html.clientHeight > 0 && html.clientWidth > 0 && (body.clientHeight == 0 || body.clientWidth == 0 || body.clientHeight > html.clientHeight || body.clientWidth > html.clientWidth)) ? html : body)
: (backCompat ? body : html),
scrollRoot = isWK ? body : clientAreaRoot,
rootWidth = clientAreaRoot.clientWidth,
rootHeight = clientAreaRoot.clientHeight,
@@ -87,14 +91,11 @@ dojo.window.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
}else{
var pb = dojo._getPadBorderExtents(el);
elPos.w -= pb.w; elPos.h -= pb.h; elPos.x += pb.l; elPos.y += pb.t;
}
if(el != scrollRoot){ // body, html sizes already have the scrollbar removed
var clientSize = el.clientWidth,
scrollBarSize = elPos.w - clientSize;
if(clientSize > 0 && scrollBarSize > 0){
elPos.w = clientSize;
if(isIE && rtl){ elPos.x += scrollBarSize; }
elPos.x += (rtl && (isIE || el.clientLeft > pb.l/*Chrome*/)) ? scrollBarSize : 0;
}
clientSize = el.clientHeight;
scrollBarSize = elPos.h - clientSize;
@@ -123,8 +124,9 @@ dojo.window.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
bot = t + nodePos.h - elPos.h; // beyond bottom: > 0
if(r * l > 0){
var s = Math[l < 0? "max" : "min"](l, r);
if(rtl && ((isIE == 8 && !backCompat) || isIE >= 9)){ s = -s; }
nodePos.x += el.scrollLeft;
el.scrollLeft += (isIE >= 8 && !backCompat && rtl)? -s : s;
el.scrollLeft += s;
nodePos.x -= el.scrollLeft;
}
if(bot * t > 0){
@@ -133,7 +135,7 @@ dojo.window.scrollIntoView = function(/*DomNode*/ node, /*Object?*/ pos){
nodePos.y -= el.scrollTop;
}
el = (el != scrollRoot) && !fixedPos && el.parentNode;
}
}
}catch(error){
console.error('scrollIntoView: ' + error);
node.scrollIntoView(false);