-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): 1.0.0-beta.3 distribution files
- Loading branch information
1 parent
e290293
commit 15e66b7
Showing
9 changed files
with
97 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -542,7 +542,7 @@ | |
isCommittedDataset = false, | ||
log = function() { | ||
if (settings.debugMode && $log.debug) { | ||
$log.debug.apply(this, arguments); | ||
$log.debug.apply($log, arguments); | ||
} | ||
}, | ||
defaultFilterOptions = { | ||
|
@@ -1731,6 +1731,50 @@ | |
}]); | ||
})(); | ||
|
||
/** | ||
* ngTable: Table + Angular JS | ||
* | ||
* @author Vitalii Savchuk <[email protected]> | ||
* @url https://github.com/esvit/ng-table/ | ||
* @license New BSD License <http://creativecommons.org/licenses/BSD/> | ||
*/ | ||
|
||
(function(){ | ||
'use strict'; | ||
|
||
angular.module('ngTable') | ||
.directive('ngTableColumnsBinding', ngTableColumnsBinding); | ||
|
||
ngTableColumnsBinding.$inject = ["$parse"]; | ||
|
||
/** | ||
* @ngdoc service | ||
* @name ngTableColumnsBinding | ||
* @description One-way data binds the $columns array generated by ngTable/ngTableDynamic to the specified | ||
* expression. | ||
* | ||
* This allows the $columns array to be accessed outside of the html table markup | ||
*/ | ||
function ngTableColumnsBinding($parse){ | ||
var directive = { | ||
restrict: 'A', | ||
require: 'ngTable', | ||
link: linkFn | ||
}; | ||
return directive; | ||
|
||
function linkFn($scope, $element, $attrs){ | ||
var setter = $parse($attrs.ngTableColumnsBinding).assign; | ||
if (setter){ | ||
$scope.$watch('$columns', function(newColumns){ | ||
var shallowClone = (newColumns || []).slice(0); | ||
setter($scope, shallowClone); | ||
}); | ||
} | ||
} | ||
} | ||
})(); | ||
|
||
/** | ||
* ngTable: Table + Angular JS | ||
* | ||
|
@@ -1879,6 +1923,7 @@ | |
$scope.getVisibleColumns = getVisibleColumns; | ||
$scope.groupBy = groupBy; | ||
$scope.isSelectedGroup = isSelectedGroup; | ||
$scope.toggleDetail = toggleDetail; | ||
|
||
$scope.$watch('params.group()', setGroup, true); | ||
} | ||
|
@@ -1922,14 +1967,7 @@ | |
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{ | ||
$scope.params.group(group); | ||
|
@@ -1946,6 +1984,10 @@ | |
} | ||
|
||
function setGroup(group){ | ||
var existingGroupCol = findGroupColumn($scope.$selGroup); | ||
if (existingGroupCol && existingGroupCol.show.assign){ | ||
existingGroupCol.show.assign($scope, true); | ||
} | ||
if (angular.isFunction(group)) { | ||
groupFns = [group]; | ||
$scope.$selGroup = group; | ||
|
@@ -1957,9 +1999,17 @@ | |
if (groupedColumn) { | ||
$scope.$selGroupTitle = groupedColumn.title($scope); | ||
$scope.$selGroup = groupKey; | ||
if (groupedColumn.show.assign) { | ||
groupedColumn.show.assign($scope, false); | ||
} | ||
} | ||
} | ||
} | ||
|
||
function toggleDetail(){ | ||
$scope.params.settings().groupOptions.isExpanded = !$scope.params.settings().groupOptions.isExpanded; | ||
return $scope.params.reload(); | ||
} | ||
} | ||
})(); | ||
|
||
|
@@ -2148,7 +2198,7 @@ angular.module('ngTable').run(['$templateCache', function ($templateCache) { | |
$templateCache.put('ng-table/filters/select-multiple.html', '<select ng-options="data.id as data.title for data in $column.data" ng-disabled="$filterRow.disabled" multiple ng-multiple="true" ng-model="params.filter()[name]" class="filter filter-select-multiple form-control" name="{{name}}"> </select> '); | ||
$templateCache.put('ng-table/filters/select.html', '<select ng-options="data.id as data.title for data in $selectData" ng-table-select-filter-ds="$column" 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" placeholder="{{getFilterPlaceholderValue(filter, name)}}"/> '); | ||
$templateCache.put('ng-table/groupRow.html', '<tr ng-if="params.hasGroup()" ng-show="$groupRow.show" class="ng-table-group-header"> <th colspan="{{getVisibleColumns().length}}" class="sortable" ng-class="{ \'sort-asc\': params.hasGroup($selGroup, \'asc\'), \'sort-desc\':params.hasGroup($selGroup, \'desc\') }"> <a href="" ng-click="isSelectorOpen=!isSelectorOpen" class="ng-table-group-selector"> <strong class="sort-indicator">{{$selGroupTitle}}</strong> <button class="btn btn-default btn-xs" ng-click="$groupRow.show=false" ng-disabled="isSelectorOpen"><span class="glyphicon glyphicon-resize-small"></span> </button> </a> <div class="list-group" ng-if="isSelectorOpen"> <a href="" class="list-group-item" ng-repeat="group in getGroupables()" ng-click="groupBy(group)"> <strong>{{ getGroupTitle(group)}}</strong> <strong ng-class="isSelectedGroup(group) && \'sort-indicator\'"></strong> </a> </div> </th> </tr> '); | ||
$templateCache.put('ng-table/groupRow.html', '<tr ng-if="params.hasGroup()" ng-show="$groupRow.show" class="ng-table-group-header"> <th colspan="{{getVisibleColumns().length}}" class="sortable" ng-class="{ \'sort-asc\': params.hasGroup($selGroup, \'asc\'), \'sort-desc\':params.hasGroup($selGroup, \'desc\') }"> <a href="" ng-click="isSelectorOpen=!isSelectorOpen" class="ng-table-group-selector"> <strong class="sort-indicator">{{$selGroupTitle}}</strong> <button class="btn btn-default btn-xs ng-table-group-close" ng-click="$groupRow.show=false; $event.preventDefault(); $event.stopPropagation();"> <span class="glyphicon glyphicon-remove"></span> </button> <button class="btn btn-default btn-xs ng-table-group-toggle" ng-click="toggleDetail(); $event.preventDefault(); $event.stopPropagation();"> <span class="glyphicon" ng-class="{ \'glyphicon-resize-small\': params.settings().groupOptions.isExpanded, \'glyphicon-resize-full\': !params.settings().groupOptions.isExpanded }"></span> </button> </a> <div class="list-group" ng-if="isSelectorOpen"> <a href="" class="list-group-item" ng-repeat="group in getGroupables()" ng-click="groupBy(group)"> <strong>{{ getGroupTitle(group)}}</strong> <strong ng-class="isSelectedGroup(group) && \'sort-indicator\'"></strong> </a> </div> </th> </tr> '); | ||
$templateCache.put('ng-table/header.html', '<ng-table-group-row></ng-table-group-row> <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 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="">«</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="">…</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="">»</a> </li> </ul> </div> '); | ||
$templateCache.put('ng-table/sorterRow.html', '<tr class="ng-table-sort-header"> <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> '); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ng-table", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"author": "Vitalii Savchuk <[email protected]>", | ||
"license": "BSD", | ||
"repository": { | ||
|