Skip to content

Commit

Permalink
Added more Zebra example
Browse files Browse the repository at this point in the history
  • Loading branch information
duboisp committed Aug 7, 2012
1 parent 4da5d27 commit efed919
Show file tree
Hide file tree
Showing 12 changed files with 3,848 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/js/css/pe-ap-ie-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/css/pe-ap-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

494 changes: 494 additions & 0 deletions demos/zebra/collevel.html

Large diffs are not rendered by default.

647 changes: 647 additions & 0 deletions demos/zebra/invoice.html

Large diffs are not rendered by default.

1,260 changes: 1,260 additions & 0 deletions demos/zebra/longtable.html

Large diffs are not rendered by default.

454 changes: 454 additions & 0 deletions demos/zebra/rowlevel.html

Large diffs are not rendered by default.

475 changes: 475 additions & 0 deletions demos/zebra/rowlevelwithsummary.html

Large diffs are not rendered by default.

493 changes: 493 additions & 0 deletions demos/zebra/simple.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/js/sass/zebra.scss
Expand Up @@ -74,10 +74,6 @@ table.wet-boew-zebra,table.wet-boew-zebra table{
padding: 8px;
background-color: #F4F4F4!important;
}
td.table-layoutCell, th.table-layoutCell{
background-color: white!important;
border: none;
}
td.table-summarycol3, td.table-summaryrow3 {
background-color: #9EE!important;
}
Expand Down Expand Up @@ -110,4 +106,9 @@ table.wet-boew-zebra,table.wet-boew-zebra table{
th.table-hover {
background-color: lightgray;
}

td.table-layoutCell, th.table-layoutCell{
background-color: white!important;
}

}
17 changes: 13 additions & 4 deletions src/js/workers/parser.table.js
Expand Up @@ -232,6 +232,9 @@
colgroupFrame.push(colgroup);
}
function processRowgroupHeader(colgroupHeaderColEnd) { // thead row group processing
if(groupZero.colgrouphead){
return; // Prevent multiple call
}
if (colgroupHeaderColEnd && colgroupHeaderColEnd > 0) {
// The first colgroup must match the colgroupHeaderColEnd
if (colgroupFrame.length > 0 && (colgroupFrame[0].start != 1 || (colgroupFrame[0].end != colgroupHeaderColEnd && colgroupFrame[0].end != (colgroupHeaderColEnd + 1)))) {
Expand All @@ -245,6 +248,7 @@
} else {
colgroupHeaderColEnd = 0; // This mean that are no colgroup designated to be a colgroup header
}
console.log('Call ProcessRowGroupHeader');

// Associate any descriptive cell to his top header
for(i=0; i<theadRowStack.length; i++) {
Expand Down Expand Up @@ -1528,12 +1532,13 @@ elem: this
//
// Process the table row heading and colgroup if required
//
processRowgroupHeader(lastHeadingColPos);
if (colgroupFrame.length != 0) {

// We check the first colgroup to know if a colgroup type has been defined
if (!(colgroupFrame[0].type)) {

processRowgroupHeader(lastHeadingColPos);
// processRowgroupHeader(lastHeadingColPos);

// Match the already defined colgroup tag with the table rowgroup heading section

Expand All @@ -1543,7 +1548,7 @@ elem: this
}

} else {
processRowgroupHeader(lastHeadingColPos);
// processRowgroupHeader(lastHeadingColPos);

// If the table have a table rowgroup heading section, let that to be transformed into colgroup

Expand Down Expand Up @@ -1587,8 +1592,12 @@ elem: this
}

// Test if this cell is a layout cell
if (row.type == 3 && colgroupFrame[j].type == 3 && ($(row.cell[i].elem).html().length == 0)) {
if (row.type == 3 && colgroupFrame[j].type == 3 && ($(row.cell[i].elem).text().length === 0)) {
row.cell[i].type = 6;
if (!groupZero.layoutCell) {
groupZero.layoutCell = [];
}
groupZero.layoutCell.push(row.cell[i]);
}

row.cell[i].collevel = colgroupFrame[j].level;
Expand Down Expand Up @@ -1811,7 +1820,7 @@ elem: this
groupZero.theadRowStack = theadRowStack;


delete groupZero.colgroupFrame;
//delete groupZero.colgroupFrame;
groupZero.colgrouplevel = groupZero.colgrp;
delete groupZero.colgrp;

Expand Down
10 changes: 4 additions & 6 deletions src/js/workers/zebra.js
Expand Up @@ -74,7 +74,7 @@
/* The Heading highlight take times to be set up in ÌE and just a little bit more in Firefox
*
*/

/*
var getCellHeaders = function (elem) {
var cellsheader = [],
tblparser = $(elem).data().tblparser;
Expand Down Expand Up @@ -132,10 +132,8 @@
autoRemoveTimeout = setTimeout(function () {
var i;
if (tblparser.type === 1){
if (tblparser.scope === "row") {
$(this).removeClass('table-hover');
return;
}
$(elem).removeClass('table-hover');
delete $(elem).data().zebrafor;
return;
}
for (i = 0; i < $(elem).data().cellsheader.length; i += 1) {
Expand All @@ -146,7 +144,7 @@
}
}, 25);
});

*/


// Default Zebra
Expand Down

0 comments on commit efed919

Please sign in to comment.