Skip to content

Commit

Permalink
chore(release): 1.0.0-alpha.8 distribution files
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Aug 28, 2015
1 parent b43c41b commit e7d18a8
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 23 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<a name="1.0.0-alpha.8"></a>
# 1.0.0-alpha.8 (2015-08-28)


## Bug Fixes

- **NgTableParams:** incorrect default sort direction applied to grouping function
([7b30995e](https://github.com/esvit/ng-table/commit/7b30995e2922d7367e9336d987d9e739f7f29cd3))
- **groupRow:** table columns are lost when switching between groups
([6d2c7358](https://github.com/esvit/ng-table/commit/6d2c735847918bd3c717f58a2f10be0fd3a01a8b))


## Features

- **ngTableController:** add visibleColumnCount to $groups data
([53ed583c](https://github.com/esvit/ng-table/commit/53ed583c5fd1b1dd4f147aee9ab852a90e6f17c4))


<a name="1.0.0-alpha.7"></a>
# 1.0.0-alpha.7 (2015-08-27)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-table",
"version": "1.0.0-alpha.7",
"version": "1.0.0-alpha.8",
"main": [
"./dist/ng-table.min.js",
"./dist/ng-table.min.css"
Expand Down
48 changes: 31 additions & 17 deletions dist/ng-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,23 @@
};

function parseGroup(group){
var defaultSort = settings.groupOptions && settings.groupOptions.defaultSort;
if (angular.isFunction(group)) {
if (group.sortDirection == null){
group.sortDirection = defaultSort;
}
return group;
} else if (angular.isString(group)) {
var grp = {};
grp[group] = settings.groupOptions && settings.groupOptions.defaultSort;
grp[group] = defaultSort;
return grp;
} else if (angular.isObject(group)) {
for (var key in group) {
if (group[key] == null){
group[key] = defaultSort;
}
}
return group;
} else {
return group;
}
Expand Down Expand Up @@ -1460,15 +1471,20 @@
}
};


function getVisibleColumns(){
return ($scope.$columns || []).filter(function(c){
return c.show($scope);
});
}

function commonInit(){
ngTableEventsChannel.onAfterReloadData(bindDataToScope, $scope, isMyPublisher);
ngTableEventsChannel.onPagesChanged(bindPagesToScope, $scope, isMyPublisher);

function bindDataToScope(params, newDatapage){
if (params.hasGroup()) {
$scope.$groups = newDatapage;
$scope.$groups = newDatapage || [];
$scope.$groups.visibleColumnCount = getVisibleColumns().length;
} else {
$scope.$data = newDatapage;
}
Expand Down Expand Up @@ -1521,7 +1537,7 @@
groupRow,
rows = [];

angular.forEach(angular.element(element.find('tr')), function(tr) {
angular.forEach(element.find('tr'), function(tr) {
rows.push(angular.element(tr))
});
dataRow = rows.filter(function(tr){
Expand Down Expand Up @@ -1652,7 +1668,7 @@
var row;

// IE 8 fix :not(.ng-table-group) selector
angular.forEach(angular.element(tElement.find('tr')), function(tr) {
angular.forEach(tElement.find('tr'), function(tr) {
tr = angular.element(tr);
if (!tr.hasClass('ng-table-group') && !row) {
row = tr;
Expand Down Expand Up @@ -1882,21 +1898,19 @@
}

function groupBy(group){
if (group.groupable){
if (group.groupable($scope) === $scope.$selGroup){
changeSortDirection();
} else {
var existingGroupCol = findGroupColumn($scope.$selGroup);
if (existingGroupCol && existingGroupCol.show.assign && group.show.assign){
existingGroupCol.show.assign($scope, true);
if (isSelectedGroup(group)){
changeSortDirection();
} else {
var existingGroupCol = findGroupColumn($scope.$selGroup);
if (existingGroupCol && existingGroupCol.show.assign){
existingGroupCol.show.assign($scope, true);
}
if (group.groupable){
if (group.show.assign){
group.show.assign($scope, false);
}
$scope.params.group(group.groupable($scope));
}
} else{
if (group === $scope.$selGroup){
changeSortDirection();
} else {
} else{
$scope.params.group(group);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-table.min.css

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

4 changes: 2 additions & 2 deletions dist/ng-table.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ng-table.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-table",
"version": "1.0.0-alpha.7",
"version": "1.0.0-alpha.8",
"author": "Vitalii Savchuk <esvit666@gmail.com>",
"license": "BSD",
"repository": {
Expand Down

0 comments on commit e7d18a8

Please sign in to comment.