Skip to content

Commit

Permalink
Merge pull request #511 from angular-ui/2.0.7
Browse files Browse the repository at this point in the history
2.0.7
  • Loading branch information
jonricaurte committed Jul 2, 2013
2 parents d2e8969 + 1e51a11 commit 549c8b5
Show file tree
Hide file tree
Showing 41 changed files with 1,252 additions and 639 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ng-grid",
"version": "2.0.6",
"version": "2.0.7",
"main": ["./ng-grid.min.css", "./build/ng-grid.min.js"]
}
430 changes: 287 additions & 143 deletions build/ng-grid.debug.js

Large diffs are not rendered by default.

372 changes: 246 additions & 126 deletions build/ng-grid.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/ng-grid.min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions ng-grid-2.0.6.min.js

This file was deleted.

430 changes: 287 additions & 143 deletions ng-grid-2.0.6.debug.js → ng-grid-2.0.7.debug.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ng-grid-2.0.7.min.js

Large diffs are not rendered by default.

46 changes: 36 additions & 10 deletions ng-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,36 @@
overflow: auto;
min-height: 20px;
}
.ngViewport:focus {
outline: none;
}
.ngCanvas {
position: relative;
}
.ngVerticalBar {
position: absolute;
right: 0;
width: 0;
}
.ngVerticalBarVisible {
width: 1px;
background-color: #d4d4d4;
}
.ngHeaderContainer {
position: relative;
overflow: hidden;
font-weight: bold;
background-color: inherit;
}
.ngHeaderCell {
border-right: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
position: absolute;
top: 0;
bottom: 0;
background-color: inherit;
}
.ngHeaderCell.pinned {
z-index: 1;
}
.ngHeaderSortColumn {
position: absolute;
overflow: hidden;
Expand All @@ -62,9 +75,6 @@
.ngNoSort {
cursor: default;
}
.ngHeaderCell:first-child {
border-left: 0;
}
.ngHeaderButton {
position: absolute;
right: 2px;
Expand Down Expand Up @@ -132,6 +142,24 @@
border-width: 6.5px 4.5px 0 4.5px;
border-color: #4d4d4d transparent transparent transparent;
}
.ngPinnedIcon {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAmElEQVQoU33PQapBURjA8UtkwJuaWYGSgfQWYBMvczPmTCzAAGVuaA228BZhRCkDGSmE31FucuRfvzq3vr5zT/JSjSU7DsypEPXDkDVn2hSIytJhw4kWGaLCxgHh2gt/RBuLzNhz5caWPjnSqqw4EraFfwznf8qklWjwy4IRTerkiQoPGtPl40OehcEJvcfXl8LglLfBJLkDcMgbgHlHhK8AAAAASUVORK5CYII=);
background-repeat: no-repeat;
position: absolute;
right: 5px;
top: 5px;
height: 10px;
width: 10px;
}
.ngUnPinnedIcon {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAlElEQVQoU33PPQrCQBRF4fFnI2KfZVi5ARvdgo1l6mwmkCJVOgluwd5OwUoDtnoOxAei8cLXTN7cvEl/skCNDCMPfsUPO5zQwOHIDEvYtMURHe6wOVLgigvOePRyeDkyR4ln7wZ//7XfFBu8B23+aDJjrHGAwza7hjtHJvDmHg7b7Bru7AMjK7Rw2ObBVHDY5oGk9AKQNB2zy8MBTgAAAABJRU5ErkJggg==);
background-repeat: no-repeat;
position: absolute;
height: 10px;
width: 10px;
right: 5px;
top: 5px;
}
.ngColMenu {
right: 2px;
padding: 5px;
Expand Down Expand Up @@ -307,14 +335,12 @@
.ngCell {
overflow: hidden;
position: absolute;
border-right: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
top: 0;
bottom: 0;
background-color: inherit;
}
.ngCell:first-child {
border-left: 0;
.ngCell.pinned {
z-index: 1;
}
.ngCellText {
padding: 5px;
Expand All @@ -338,7 +364,7 @@
}
.ngCellElement:focus {
outline: 0;
background-color: #c9dde1;
background-color: #b3c4c7;
}
.ngRow.canSelect {
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion ng-grid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-grid",
"version": "2.0.6",
"version": "2.0.7",
"description": "__Contributors:__",
"main": "ng-grid.min.js",
"directories": {
Expand Down
35 changes: 19 additions & 16 deletions plugins/ng-grid-flexible-height.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ function ngGridFlexibleHeightPlugin (opts) {
var self = this;
self.grid = null;
self.scope = null;
self.init = function (scope, grid) {
self.init = function (scope, grid, services) {
self.domUtilityService = services.DomUtilityService;
self.grid = grid;
self.scope = scope;
var recalcHeightForData = function () { setTimeout(innerRecalcForData, 1); };
Expand All @@ -11,27 +12,29 @@ function ngGridFlexibleHeightPlugin (opts) {
var footerPanelSel = '.' + gridId + ' .ngFooterPanel';
var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height();
var naturalHeight = self.grid.$canvas.height() + 1;
if (scope.baseViewportHeight == null || scope.baseViewportHeight === 0) {
scope.baseViewportHeight = self.grid.$viewport.height();
}
if (scope.baseViewportHeight > naturalHeight) {
if (opts != null) {
if (opts.minHeight != null && (naturalHeight + extraHeight) < opts.minHeight) {
naturalHeight = opts.minHeight - extraHeight - 2;
}
if (opts != null) {
if (opts.minHeight != null && (naturalHeight + extraHeight) < opts.minHeight) {
naturalHeight = opts.minHeight - extraHeight - 2;
}
self.grid.$viewport.css('height', (naturalHeight + 2) + 'px');
self.grid.$root.css('height', (naturalHeight + extraHeight + 2) + 'px');
}
self.grid.refreshDomSizes();

var newViewportHeight = naturalHeight + 2;
if (!self.scope.baseViewportHeight || self.scope.baseViewportHeight !== newViewportHeight) {
self.grid.$viewport.css('height', newViewportHeight + 'px');
self.grid.$root.css('height', (newViewportHeight + extraHeight) + 'px');
self.scope.baseViewportHeight = newViewportHeight;
self.domUtilityService.UpdateGridLayout(self.scope, self.grid);
}
};
scope.catHashKeys = function () {
self.scope.catHashKeys = function () {
var hash = '',
idx;
for (idx in scope.renderedRows) { hash += scope.renderedRows[idx].$$hashKey; }
for (idx in self.scope.renderedRows) {
hash += self.scope.renderedRows[idx].$$hashKey;
}
return hash;
};
scope.$watch('catHashKeys()', innerRecalcForData);
scope.$watch(grid.config.data, recalcHeightForData);
self.scope.$watch('catHashKeys()', innerRecalcForData);
self.scope.$watch(self.grid.config.data, recalcHeightForData);
};
}
Loading

0 comments on commit 549c8b5

Please sign in to comment.