Skip to content

Commit

Permalink
chore(release): 1.0.0-alpha.2 distribution files
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Aug 12, 2015
1 parent 63387f7 commit 976b920
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<a name="1.0.0-alpha.2"></a>
# 1.0.0-alpha.2 (2015-08-12)


## Bug Fixes

- **pager.html:** don't render empty pagination UL
([ffbbca04](https://github.com/esvit/ng-table/commit/ffbbca0466b67e6a4b2b877282e7c7b45ad330af))


## Features

- **ngTableController:** allow $column.filterData to return a promise
([f90cbcb8](https://github.com/esvit/ng-table/commit/f90cbcb87de4d072f33d5813fe69132e3e51b45f))


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

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.1",
"version": "1.0.0-alpha.2",
"main": [
"./dist/ng-table.min.js",
"./dist/ng-table.min.css"
Expand Down
18 changes: 10 additions & 8 deletions dist/ng-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1138,19 +1138,21 @@

this.loadFilterData = function ($columns) {
angular.forEach($columns, function ($column) {
var def;
def = $column.filterData($scope, {
var result;
result = $column.filterData($scope, {
$column: $column
});
if (!def) {
if (!result) {
delete $column.filterData;
return;
}

// if we're working with a deferred object, let's wait for the promise
if ((angular.isObject(def) && angular.isObject(def.promise))) {
// if we're working with a deferred object or a promise, let's wait for the promise
/* WARNING: support for returning a $defer is depreciated */
if ((angular.isObject(result) && (angular.isObject(result.promise) || angular.isFunction(result.then)))) {
var pData = angular.isFunction(result.then) ? result : result.promise;
delete $column.filterData;
return def.promise.then(function(data) {
return pData.then(function(data) {
// our deferred can eventually return arrays, functions and objects
if (!angular.isArray(data) && !angular.isFunction(data) && !angular.isObject(data)) {
// if none of the above was found - we just want an empty array
Expand All @@ -1166,7 +1168,7 @@
}
// otherwise, we just return what the user gave us. It could be a function, array, object, whatever
else {
return $column.data = def;
return $column.data = result;
}
});
};
Expand Down Expand Up @@ -1591,7 +1593,7 @@ angular.module('ngTable').run(['$templateCache', function ($templateCache) {
$templateCache.put('ng-table/filters/select.html', '<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" class="filter filter-select form-control" name="{{name}}"> <option style="display:none" value=""></option> </select> ');
$templateCache.put('ng-table/filters/text.html', '<input type="text" name="{{name}}" ng-disabled="$filterRow.disabled" ng-model="params.filter()[name]" class="input-filter form-control"/> ');
$templateCache.put('ng-table/header.html', '<ng-table-sorter-row></ng-table-sorter-row> <ng-table-filter-row></ng-table-filter-row> ');
$templateCache.put('ng-table/pager.html', '<div class="ng-cloak ng-table-pager" ng-if="params.data.length"> <div ng-if="params.settings().counts.length" class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type="button" ng-class="{\'active\':params.count()==count}" ng-click="params.count(count)" class="btn btn-default"> <span ng-bind="count"></span> </button> </div> <ul class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active && !page.current, \'active\': page.current}" ng-repeat="page in pages" ng-switch="page.type"> <a ng-switch-when="prev" ng-click="params.page(page.number)" href="">&laquo;</a> <a ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a> <a ng-switch-when="last" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="next" ng-click="params.page(page.number)" href="">&raquo;</a> </li> </ul> </div> ');
$templateCache.put('ng-table/pager.html', '<div class="ng-cloak ng-table-pager" ng-if="params.data.length"> <div ng-if="params.settings().counts.length" class="ng-table-counts btn-group pull-right"> <button ng-repeat="count in params.settings().counts" type="button" ng-class="{\'active\':params.count()==count}" ng-click="params.count(count)" class="btn btn-default"> <span ng-bind="count"></span> </button> </div> <ul ng-if="pages.length" class="pagination ng-table-pagination"> <li ng-class="{\'disabled\': !page.active && !page.current, \'active\': page.current}" ng-repeat="page in pages" ng-switch="page.type"> <a ng-switch-when="prev" ng-click="params.page(page.number)" href="">&laquo;</a> <a ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a> <a ng-switch-when="last" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> <a ng-switch-when="next" ng-click="params.page(page.number)" href="">&raquo;</a> </li> </ul> </div> ');
$templateCache.put('ng-table/sorterRow.html', '<tr> <th title="{{$column.headerTitle(this)}}" ng-repeat="$column in $columns" ng-class="{ \'sortable\': $column.sortable(this), \'sort-asc\': params.sorting()[$column.sortable(this)]==\'asc\', \'sort-desc\': params.sorting()[$column.sortable(this)]==\'desc\' }" ng-click="sortBy($column, $event)" ng-if="$column.show(this)" ng-init="template=$column.headerTemplateURL(this)" class="header {{$column.class(this)}}"> <div ng-if="!template" class="ng-table-header" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'div\'}"> <span ng-bind="$column.title(this)" ng-class="{\'sort-indicator\': params.settings().sortingIndicator==\'span\'}"></span> </div> <div ng-if="template" ng-include="template"></div> </th> </tr> ');
}]);
return angular.module('ngTable');
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.1",
"version": "1.0.0-alpha.2",
"author": "Vitalii Savchuk <[email protected]>",
"license": "BSD",
"repository": {
Expand Down

0 comments on commit 976b920

Please sign in to comment.