Clear sorting now resets to initial sorting.

This commit is contained in:
Gunther Brunner
2014-06-11 15:36:19 +09:00
parent 3798b72401
commit 4b19d960d2
2 changed files with 11 additions and 5 deletions

View File

@@ -7,7 +7,6 @@ module.exports = function DeviceListCtrlDetails($scope, DeviceService, GroupServ
})
$scope.statusFilter = function () {
var def = $q.defer()
var statuses = [
@@ -29,10 +28,17 @@ module.exports = function DeviceListCtrlDetails($scope, DeviceService, GroupServ
// storeName: 'DeviceList.tableFilter'
// })
$scope.tableSorting = {
stateSorting: 'asc', // initial sorting
name: 'asc' // initial sorting
var initialSorting = {
stateSorting: 'asc',
name: 'asc'
}
$scope.tableSorting = initialSorting
$scope.clearSorting = function () {
$scope.tableParams.sorting(initialSorting)
$scope.tableParams.filter({})
}
// SettingsService.bind($scope, {
// key: 'tableSorting',
// storeName: 'DeviceList.tableSorting'