Skip to content

Commit 549c8b5

Browse files
committed
Merge pull request #511 from angular-ui/2.0.7
2.0.7
2 parents d2e8969 + 1e51a11 commit 549c8b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1252
-639
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "ng-grid",
3-
"version": "2.0.6",
3+
"version": "2.0.7",
44
"main": ["./ng-grid.min.css", "./build/ng-grid.min.js"]
55
}

build/ng-grid.debug.js

+287-143
Large diffs are not rendered by default.

build/ng-grid.js

+246-126
Large diffs are not rendered by default.

build/ng-grid.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ng-grid-2.0.6.min.js

-2
This file was deleted.

ng-grid-2.0.6.debug.js renamed to ng-grid-2.0.7.debug.js

+287-143
Large diffs are not rendered by default.

ng-grid-2.0.7.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ng-grid.css

+36-10
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,36 @@
1919
overflow: auto;
2020
min-height: 20px;
2121
}
22+
.ngViewport:focus {
23+
outline: none;
24+
}
2225
.ngCanvas {
2326
position: relative;
2427
}
28+
.ngVerticalBar {
29+
position: absolute;
30+
right: 0;
31+
width: 0;
32+
}
33+
.ngVerticalBarVisible {
34+
width: 1px;
35+
background-color: #d4d4d4;
36+
}
2537
.ngHeaderContainer {
2638
position: relative;
2739
overflow: hidden;
2840
font-weight: bold;
2941
background-color: inherit;
3042
}
3143
.ngHeaderCell {
32-
border-right: 1px solid #d4d4d4;
33-
border-left: 1px solid #d4d4d4;
3444
position: absolute;
3545
top: 0;
3646
bottom: 0;
3747
background-color: inherit;
3848
}
49+
.ngHeaderCell.pinned {
50+
z-index: 1;
51+
}
3952
.ngHeaderSortColumn {
4053
position: absolute;
4154
overflow: hidden;
@@ -62,9 +75,6 @@
6275
.ngNoSort {
6376
cursor: default;
6477
}
65-
.ngHeaderCell:first-child {
66-
border-left: 0;
67-
}
6878
.ngHeaderButton {
6979
position: absolute;
7080
right: 2px;
@@ -132,6 +142,24 @@
132142
border-width: 6.5px 4.5px 0 4.5px;
133143
border-color: #4d4d4d transparent transparent transparent;
134144
}
145+
.ngPinnedIcon {
146+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAmElEQVQoU33PQapBURjA8UtkwJuaWYGSgfQWYBMvczPmTCzAAGVuaA228BZhRCkDGSmE31FucuRfvzq3vr5zT/JSjSU7DsypEPXDkDVn2hSIytJhw4kWGaLCxgHh2gt/RBuLzNhz5caWPjnSqqw4EraFfwznf8qklWjwy4IRTerkiQoPGtPl40OehcEJvcfXl8LglLfBJLkDcMgbgHlHhK8AAAAASUVORK5CYII=);
147+
background-repeat: no-repeat;
148+
position: absolute;
149+
right: 5px;
150+
top: 5px;
151+
height: 10px;
152+
width: 10px;
153+
}
154+
.ngUnPinnedIcon {
155+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAlElEQVQoU33PPQrCQBRF4fFnI2KfZVi5ARvdgo1l6mwmkCJVOgluwd5OwUoDtnoOxAei8cLXTN7cvEl/skCNDCMPfsUPO5zQwOHIDEvYtMURHe6wOVLgigvOePRyeDkyR4ln7wZ//7XfFBu8B23+aDJjrHGAwza7hjtHJvDmHg7b7Bru7AMjK7Rw2ObBVHDY5oGk9AKQNB2zy8MBTgAAAABJRU5ErkJggg==);
156+
background-repeat: no-repeat;
157+
position: absolute;
158+
height: 10px;
159+
width: 10px;
160+
right: 5px;
161+
top: 5px;
162+
}
135163
.ngColMenu {
136164
right: 2px;
137165
padding: 5px;
@@ -307,14 +335,12 @@
307335
.ngCell {
308336
overflow: hidden;
309337
position: absolute;
310-
border-right: 1px solid #d4d4d4;
311-
border-left: 1px solid #d4d4d4;
312338
top: 0;
313339
bottom: 0;
314340
background-color: inherit;
315341
}
316-
.ngCell:first-child {
317-
border-left: 0;
342+
.ngCell.pinned {
343+
z-index: 1;
318344
}
319345
.ngCellText {
320346
padding: 5px;
@@ -338,7 +364,7 @@
338364
}
339365
.ngCellElement:focus {
340366
outline: 0;
341-
background-color: #c9dde1;
367+
background-color: #b3c4c7;
342368
}
343369
.ngRow.canSelect {
344370
cursor: pointer;

ng-grid.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-grid",
3-
"version": "2.0.6",
3+
"version": "2.0.7",
44
"description": "__Contributors:__",
55
"main": "ng-grid.min.js",
66
"directories": {

plugins/ng-grid-flexible-height.js

+19-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ function ngGridFlexibleHeightPlugin (opts) {
22
var self = this;
33
self.grid = null;
44
self.scope = null;
5-
self.init = function (scope, grid) {
5+
self.init = function (scope, grid, services) {
6+
self.domUtilityService = services.DomUtilityService;
67
self.grid = grid;
78
self.scope = scope;
89
var recalcHeightForData = function () { setTimeout(innerRecalcForData, 1); };
@@ -11,27 +12,29 @@ function ngGridFlexibleHeightPlugin (opts) {
1112
var footerPanelSel = '.' + gridId + ' .ngFooterPanel';
1213
var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height();
1314
var naturalHeight = self.grid.$canvas.height() + 1;
14-
if (scope.baseViewportHeight == null || scope.baseViewportHeight === 0) {
15-
scope.baseViewportHeight = self.grid.$viewport.height();
16-
}
17-
if (scope.baseViewportHeight > naturalHeight) {
18-
if (opts != null) {
19-
if (opts.minHeight != null && (naturalHeight + extraHeight) < opts.minHeight) {
20-
naturalHeight = opts.minHeight - extraHeight - 2;
21-
}
15+
if (opts != null) {
16+
if (opts.minHeight != null && (naturalHeight + extraHeight) < opts.minHeight) {
17+
naturalHeight = opts.minHeight - extraHeight - 2;
2218
}
23-
self.grid.$viewport.css('height', (naturalHeight + 2) + 'px');
24-
self.grid.$root.css('height', (naturalHeight + extraHeight + 2) + 'px');
2519
}
26-
self.grid.refreshDomSizes();
20+
21+
var newViewportHeight = naturalHeight + 2;
22+
if (!self.scope.baseViewportHeight || self.scope.baseViewportHeight !== newViewportHeight) {
23+
self.grid.$viewport.css('height', newViewportHeight + 'px');
24+
self.grid.$root.css('height', (newViewportHeight + extraHeight) + 'px');
25+
self.scope.baseViewportHeight = newViewportHeight;
26+
self.domUtilityService.UpdateGridLayout(self.scope, self.grid);
27+
}
2728
};
28-
scope.catHashKeys = function () {
29+
self.scope.catHashKeys = function () {
2930
var hash = '',
3031
idx;
31-
for (idx in scope.renderedRows) { hash += scope.renderedRows[idx].$$hashKey; }
32+
for (idx in self.scope.renderedRows) {
33+
hash += self.scope.renderedRows[idx].$$hashKey;
34+
}
3235
return hash;
3336
};
34-
scope.$watch('catHashKeys()', innerRecalcForData);
35-
scope.$watch(grid.config.data, recalcHeightForData);
37+
self.scope.$watch('catHashKeys()', innerRecalcForData);
38+
self.scope.$watch(self.grid.config.data, recalcHeightForData);
3639
};
3740
}

0 commit comments

Comments
 (0)