X-Git-Url: http://git.euphorik.ch/?p=pompage.git;a=blobdiff_plain;f=doc%2Fwebdeveloper%2Fgenerated%2Ftable_pivot.js;fp=doc%2Fwebdeveloper%2Fgenerated%2Ftable_pivot.js;h=0000000000000000000000000000000000000000;hp=23fa4043e33f2225af39c89781af647deed82edb;hb=eb7467621891b71883916c90f91bddf4c38d615f;hpb=de6efc861c1f471125cb4d3ab3d0f82572b3d21b diff --git a/doc/webdeveloper/generated/table_pivot.js b/doc/webdeveloper/generated/table_pivot.js deleted file mode 100644 index 23fa404..0000000 --- a/doc/webdeveloper/generated/table_pivot.js +++ /dev/null @@ -1,79 +0,0 @@ -// Makes all tables on the page with a cell with a pivot class pivotable -function webdeveloper_makeTablesPivotable() -{ - var tableCellList = webdeveloper_evaluateXPath(document, "//td[@class='pivot']"); - var tableCellLength = tableCellList.length; - - // Loop through the table cells - for(var i = 0; i < tableCellLength; i++) - { - tableCellList[i].addEventListener("click", webdeveloper_pivotTable, false); - } -} - -// Pivots a table -function webdeveloper_pivotTable(event) -{ - // If the event is set - if(event) - { - var hide = true; - var pivotRow = event.target.parentNode; - var tableCell = null; - var tableRow = pivotRow; - - // If the pivot row class attribute is set to collapsed - if(pivotRow.getAttribute("class") == "collapsed") - { - hide = false; - - pivotRow.setAttribute("class", "expanded"); - } - else - { - pivotRow.setAttribute("class", "collapsed"); - } - - // Loop through the table rows - while((tableRow = tableRow.nextSibling) != null) - { - tableCell = tableRow.firstChild; - - // If the table cell is set and has a class attribute set to indent - if(tableCell && tableCell.hasAttribute("class") && tableCell.getAttribute("class") == "indent") - { - // If the table row has a class attribute that contains shaded - if(tableRow.hasAttribute("class") && tableRow.getAttribute("class").indexOf("shaded") != -1) - { - // If hiding the row - if(hide) - { - tableRow.setAttribute("class", "hidden shaded"); - } - else - { - tableRow.setAttribute("class", "shaded"); - } - } - else - { - // If hiding the row - if(hide) - { - tableRow.setAttribute("class", "hidden"); - } - else - { - tableRow.removeAttribute("class"); - } - } - } - else - { - break; - } - } - } -} - -webdeveloper_makeTablesPivotable();