Skip to content

Commit

Permalink
Bring SlickGrid up to master.
Browse files Browse the repository at this point in the history
  • Loading branch information
swhitt committed Aug 2, 2011
1 parent 6bd87da commit 149478f
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions vendor/assets/javascripts/slickgrid/slick.grid.js
Expand Up @@ -299,9 +299,10 @@ if (typeof Slick === "undefined") {
}

selectionModel = model;
selectionModel.init(self);

selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged);
if (selectionModel) {
selectionModel.init(self);
selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged);
}
}

function getSelectionModel() {
Expand Down Expand Up @@ -711,19 +712,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;
}

Expand Down Expand Up @@ -873,9 +871,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";

Expand Down Expand Up @@ -1094,14 +1089,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");
}
Expand Down

0 comments on commit 149478f

Please sign in to comment.