19,667
edits
(is this necessary?) |
(replacing obsolete hasClass() with $(element).hasClass()) |
||
| Line 81: | Line 81: | ||
appendCSS('.iezoomfix div, .iezoomfix table {zoom: 1;}'); | appendCSS('.iezoomfix div, .iezoomfix table {zoom: 1;}'); | ||
} | } | ||
| Line 138: | Line 122: | ||
for (var j = 0; j < Cells.length; j++) | for (var j = 0; j < Cells.length; j++) | ||
{ | { | ||
if ( | if ($(Cells[j]).hasClass("hovercell")) | ||
{ | { | ||
$(Cells[j]).mouseover(new Function("evt", "showDescrip(this.id, true);")); | $(Cells[j]).mouseover(new Function("evt", "showDescrip(this.id, true);")); | ||
| Line 237: | Line 221: | ||
for (var i = 0; i < Tables.length; i++) | for (var i = 0; i < Tables.length; i++) | ||
{ | { | ||
if ( | if ($(Tables[i]).hasClass("collapsible")) | ||
{ | { | ||
/* only add button and increment count if there is a header row to work with */ | /* only add button and increment count if there is a header row to work with */ | ||
| Line 271: | Line 255: | ||
for (var i = 0; i < tableIndex; i++) | for (var i = 0; i < tableIndex; i++) | ||
{ | { | ||
if ( | if ($(NavigationBoxes[i]).hasClass("collapsed") || (tableIndex >= autoCollapse && $(NavigationBoxes[i]).hasClass("autocollapse"))) | ||
{ | { | ||
collapseTable(i); | collapseTable(i); | ||
} | } | ||
else if ( | else if ($(NavigationBoxes[i]).hasClass("innercollapse")) | ||
{ | { | ||
var element = NavigationBoxes[i]; | var element = NavigationBoxes[i]; | ||
while (element = element.parentNode) | while (element = element.parentNode) | ||
{ | { | ||
if (hasClass( | if ($(element).hasClass("outercollapse")) | ||
{ | { | ||
collapseTable(i); | collapseTable(i); | ||
| Line 319: | Line 303: | ||
for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | ||
{ | { | ||
if (hasClass( | if ($(NavChild).hasClass("NavContent") || $(NavChild).hasClass("NavPic")) | ||
{ | { | ||
NavChild.style.display = 'none'; | NavChild.style.display = 'none'; | ||
| Line 332: | Line 316: | ||
for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | ||
{ | { | ||
if (hasClass( | if ($(NavChild).hasClass("NavContent") || $(NavChild).hasClass("NavPic")) | ||
{ | { | ||
NavChild.style.display = 'block'; | NavChild.style.display = 'block'; | ||
| Line 350: | Line 334: | ||
{ | { | ||
// if found a navigation bar | // if found a navigation bar | ||
if (hasClass( | if ($(NavFrame).hasClass("NavFrame")) | ||
{ | { | ||
indexNavigationBar++; | indexNavigationBar++; | ||
| Line 358: | Line 342: | ||
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');'); | NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');'); | ||
var isCollapsed = hasClass( | var isCollapsed = $(NavFrame).hasClass("collapsed"); | ||
/* | /* | ||
* Check if any children are already hidden. This loop is here for backwards compatibility: | * Check if any children are already hidden. This loop is here for backwards compatibility: | ||
| Line 368: | Line 352: | ||
for (var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling) | for (var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling) | ||
{ | { | ||
if (hasClass( | if ($(NavChild).hasClass("NavPic") || $(NavChild).hasClass("NavContent")) | ||
{ | { | ||
if (NavChild.style.display == 'none') | if (NavChild.style.display == 'none') | ||
| Line 380: | Line 364: | ||
for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | for (var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling) | ||
{ | { | ||
if (hasClass( | if ($(NavChild).hasClass("NavPic") || $(NavChild).hasClass("NavContent")) | ||
{ | { | ||
NavChild.style.display = 'none'; | NavChild.style.display = 'none'; | ||
| Line 392: | Line 376: | ||
for (var j = 0; j < NavFrame.childNodes.length; j++) | for (var j = 0; j < NavFrame.childNodes.length; j++) | ||
{ | { | ||
if ( | if ($(NavFrame.childNodes[j]).hasClass("NavHead")) | ||
{ | { | ||
NavToggle.style.color = NavFrame.childNodes[j].style.color; | NavToggle.style.color = NavFrame.childNodes[j].style.color; | ||
| Line 548: | Line 532: | ||
var theTable = tables[j]; | var theTable = tables[j]; | ||
// If we found a sortable table that is asking for autosort... | // If we found a sortable table that is asking for autosort... | ||
if (hasClass( | if ($(theTable).hasClass("sortable") && $(theTable).hasClass("autosort")) | ||
{ | { | ||
var sortColumnNum = 1, curColumnNum = 0; | var sortColumnNum = 1, curColumnNum = 0; | ||
// | // First check if there is any by-column-x class at all, then take the time to figure out the value of x | ||
if ($('div[theTable.className*="by-column-"]')) | |||
if ( | |||
{ | { | ||
for (var col = 1; col < 10; col++) | for (var col = 1; col < 10; col++) | ||
{ | { | ||
var colOption = "by-column-" + col; | var colOption = "by-column-" + col; | ||
if (hasClass( | if ($(theTable).hasClass(colOption)) | ||
{ | { | ||
sortColumnNum = col; | sortColumnNum = col; | ||
| Line 572: | Line 555: | ||
for (var k = 0; k < allTHs.length; k++) | for (var k = 0; k < allTHs.length; k++) | ||
{ | { | ||
if ( | if ($(allTHs[k]).hasClass("headerSort")) | ||
{ | { | ||
curColumnNum++; | curColumnNum++; | ||