Permalink
Browse files

- Removed code supporting the deprecated cell positioning.

- Generated an explicit row height for the row CSS class to allow styling the row and fix the odd/even row styling.
  • Loading branch information...
1 parent 0ed544b commit 3f791a247e859af4761f4620d74df2b6f109300f @mleibman mleibman committed Jul 24, 2011
Showing with 2 additions and 15 deletions.
  1. +2 −15 slick.grid.js
View
@@ -711,19 +711,16 @@ if (typeof Slick === "undefined") {
"." + uid + " .slick-top-panel { height:" + options.topPanelHeight + "px; }",
"." + uid + " .slick-headerrow-columns { height:" + options.headerRowHeight + "px; }",
"." + uid + " .slick-cell { height:" + rowHeight + "px; }",
- "." + uid + " .slick-row { width:" + getRowWidth() + "px; }",
+ "." + uid + " .slick-row { width:" + getRowWidth() + "px; height:" + options.rowHeight + "px; }",
"." + uid + " .lr { float:none; position:absolute; }"
];
var rowWidth = getRowWidth();
var x = 0, w;
for (var i=0; i<columns.length; i++) {
w = columns[i].width;
-
rules.push("." + uid + " .l" + i + " { left: " + x + "px; }");
rules.push("." + uid + " .r" + i + " { right: " + (rowWidth - x - w) + "px; }");
- rules.push("." + uid + " .c" + i + " { width:" + (w - cellWidthDiff) + "px; }");
-
x += columns[i].width;
}
@@ -873,9 +870,6 @@ if (typeof Slick === "undefined") {
for (var i = 0; i < columns.length; i++) {
w = columns[i].width;
- rule = findCssRule("." + uid + " .c" + i);
- rule.style.width = (w - cellWidthDiff) + "px";
-
rule = findCssRule("." + uid + " .l" + i);
rule.style.left = x + "px";
@@ -1094,14 +1088,7 @@ if (typeof Slick === "undefined") {
for (var i=0, cols=columns.length; i<cols; i++) {
var m = columns[i];
colspan = getColspan(row, i); // TODO: don't calc unless we have to
-
- if (true || rowHasColumnData) {
- cellCss = "slick-cell lr l" + i + " r" + Math.min(columns.length -1, i + colspan - 1) + (m.cssClass ? " " + m.cssClass : "");
- }
- else {
- cellCss = "slick-cell c" + i + (m.cssClass ? " " + m.cssClass : "");
- }
-
+ cellCss = "slick-cell lr l" + i + " r" + Math.min(columns.length -1, i + colspan - 1) + (m.cssClass ? " " + m.cssClass : "");
if (row === activeRow && i === activeCell) {
cellCss += (" active");
}

0 comments on commit 3f791a2

Please sign in to comment.