Skip to content

Commit da670f6

Browse files
Portugal, MarceloPortugal, Marcelo
Portugal, Marcelo
authored and
Portugal, Marcelo
committed
v4.2.4
1 parent 190d5ad commit da670f6

8 files changed

+85
-29
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<a name="v4.2.4"></a>
2+
### v4.2.4 (2018-02-07)
3+
4+
5+
#### Bug Fixes
6+
7+
* **uiGridAutoResize:** Asking for grid $elm sizing in a digest loop always triggers `refresh`, not cond ([835153ce](http://github.com/angular-ui/ng-grid/commit/835153ce256fbeb5f58e20752ca7a4ea35b7a963), closes [#6561](http://github.com/angular-ui/ng-grid/issues/6561))
8+
9+
10+
#### Features
11+
12+
* **expandAllButton:** Add ability to hide expand all button. ([343d7116](http://github.com/angular-ui/ng-grid/commit/343d711660e83b47c664e74fb8ec735da06a0a07))
13+
114
<a name="v4.2.3"></a>
215
### v4.2.3 (2018-02-02)
316

@@ -218,6 +231,7 @@
218231
* **protractor:** Fixing npm so protractor can be installed and run locally. ([724df352](http://github.com/angular-ui/ng-grid/commit/724df3520ccc1d5f585fcc42508a537935875da2))
219232
* **shell.js:** Adding windows support. ([5e438643](http://github.com/angular-ui/ng-grid/commit/5e438643ea06e06455e91f9d0368f0021b8ef9c8))
220233
* **sort:** Fixing sorting priority aria-label ([a364886f](http://github.com/angular-ui/ng-grid/commit/a364886f37a2685500643d5df05b4c936dcd42a5))
234+
* **ui-grid-menu.js:** Removed log debug statement (#5388) ([7efe5304](https://github.com/angular-ui/ui-grid/commit/7efe5304f015714c8ba742bafe9a96ba80971622))
221235

222236

223237
#### Features

less/cell.less

+6
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@
4141
border-bottom: solid @gridBorderWidth @borderColor;
4242
}
4343

44+
.ui-grid-cell-empty {
45+
display: inline-block;
46+
width: 10px;
47+
height: 10px;
48+
}
49+

less/grid.less

+6
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,9 @@
7878
clip: rect(0,0,0,0);
7979
border: 0;
8080
}
81+
82+
.ui-grid-icon-button {
83+
background-color: transparent;
84+
border: none;
85+
padding: 0;
86+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"data grid"
2828
],
2929
"license": "MIT",
30-
"version": "4.2.3",
30+
"version": "4.2.4",
3131
"files": [
3232
"less",
3333
"ui-grid.css",

ui-grid.css

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.2.3 - 2018-02-02
2+
* ui-grid - v4.2.4 - 2018-02-07
33
* Copyright (c) 2018 ; License: MIT
44
*/
55
#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
@@ -77,6 +77,11 @@
7777
clip: rect(0, 0, 0, 0);
7878
border: 0;
7979
}
80+
.ui-grid-icon-button {
81+
background-color: transparent;
82+
border: none;
83+
padding: 0;
84+
}
8085
.ui-grid-top-panel-background {
8186
background-color: #f3f3f3;
8287
}
@@ -435,6 +440,11 @@ select.ui-grid-filter-select:hover {
435440
background-color: #f0f0ee;
436441
border-bottom: solid 1px #d4d4d4;
437442
}
443+
.ui-grid-cell-empty {
444+
display: inline-block;
445+
width: 10px;
446+
height: 10px;
447+
}
438448
.ui-grid-footer-panel-background {
439449
background-color: #f3f3f3;
440450
}

ui-grid.js

+39-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.2.3 - 2018-02-02
2+
* ui-grid - v4.2.4 - 2018-02-07
33
* Copyright (c) 2018 ; License: MIT
44
*/
55

@@ -15310,30 +15310,35 @@ module.filter('px', function() {
1531015310
require: 'uiGrid',
1531115311
scope: false,
1531215312
link: function($scope, $elm, $attrs, uiGridCtrl) {
15313-
var timeout = null;
15314-
15315-
var debounce = function(width, height) {
15316-
if (timeout !== null) {
15317-
clearTimeout(timeout);
15318-
}
15319-
timeout = setTimeout(function() {
15320-
uiGridCtrl.grid.gridWidth = width;
15321-
uiGridCtrl.grid.gridHeight = height;
15322-
uiGridCtrl.grid.refresh();
15323-
timeout = null;
15324-
}, 400);
15325-
};
15313+
var elementWidth,
15314+
elementHeight;
15315+
15316+
var updateWidth = gridUtil.throttle(function() {
15317+
elementWidth = gridUtil.elementWidth($elm);
15318+
}, 200);
15319+
15320+
var updateHeight = gridUtil.throttle(function() {
15321+
elementHeight = gridUtil.elementHeight($elm);
15322+
}, 200);
15323+
15324+
var refresh = gridUtil.throttle(function(width, height) {
15325+
uiGridCtrl.grid.gridWidth = width;
15326+
uiGridCtrl.grid.gridHeight = height;
15327+
uiGridCtrl.grid.refresh();
15328+
}, 300);
1532615329

1532715330
$scope.$watchGroup([
1532815331
function() {
15329-
return gridUtil.elementWidth($elm);
15332+
updateWidth();
15333+
return elementWidth;
1533015334
},
1533115335
function() {
15332-
return gridUtil.elementHeight($elm);
15336+
updateHeight();
15337+
return elementHeight;
1533315338
}
1533415339
], function(newValues, oldValues, scope) {
1533515340
if (!angular.equals(newValues, oldValues)) {
15336-
debounce(newValues[0], newValues[1]);
15341+
refresh(newValues[0], newValues[1]);
1533715342
}
1533815343
});
1533915344
}
@@ -18054,6 +18059,21 @@ module.filter('px', function() {
1805418059
*/
1805518060
grid.options.enableExpandable = grid.options.enableExpandable !== false;
1805618061

18062+
/**
18063+
* @ngdoc object
18064+
* @name showExpandAllButton
18065+
* @propertyOf ui.grid.expandable.api:GridOptions
18066+
* @description Whether or not to display the expand all button, allows you to hide expand all button on specific grids
18067+
* within your application, or in specific modes on _this_ grid. Defaults to true.
18068+
* @example
18069+
* <pre>
18070+
* $scope.gridOptions = {
18071+
* showExpandAllButton: false
18072+
* }
18073+
* </pre>
18074+
*/
18075+
grid.options.showExpandAllButton = grid.options.showExpandAllButton !== false;
18076+
1805718077
/**
1805818078
* @ngdoc object
1805918079
* @name expandableRowHeight
@@ -18071,7 +18091,7 @@ module.filter('px', function() {
1807118091

1807218092
/**
1807318093
* @ngdoc object
18074-
* @name
18094+
* @name expandableRowHeaderWidth
1807518095
* @propertyOf ui.grid.expandable.api:GridOptions
1807618096
* @description Width in pixels of the expandable column. Defaults to 40
1807718097
* @example
@@ -29897,7 +29917,7 @@ angular.module('ui.grid').run(['$templateCache', function($templateCache) {
2989729917

2989829918

2989929919
$templateCache.put('ui-grid/expandableTopRowHeader',
29900-
"<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><i ng-class=\"{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }\" ng-click=\"grid.api.expandable.toggleAllRows()\"></i></div></div>"
29920+
"<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><span class=\"ui-grid-cell-empty\" ng-if=\"!grid.options.showExpandAllButton\"></span> <button type=\"button\" class=\"ui-grid-icon-button\" ng-if=\"grid.options.showExpandAllButton\" ng-class=\"{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }\" ng-click=\"grid.api.expandable.toggleAllRows()\"></button></div></div>"
2990129921
);
2990229922

2990329923

ui-grid.min.css

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

ui-grid.min.js

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

0 commit comments

Comments
 (0)