From e8eea039e14dfe24b57ca62813f9c3326e0d9475 Mon Sep 17 00:00:00 2001 From: AndyButland Date: Tue, 22 Jul 2014 22:35:58 +0100 Subject: [PATCH 1/2] Reset page number to one when applying filter on list view --- .../src/views/propertyeditors/listview/listview.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 8a765bb0f6..578d7a464d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -94,7 +94,8 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific }; //assign debounce method to the search to limit the queries - $scope.search = _.debounce(function() { + $scope.search = _.debounce(function () { + $scope.options.pageNumber = 1; $scope.reloadView($scope.contentId); }, 100); From 8445c9c29b1a67af7361667ce2ac9a4329f63b52 Mon Sep 17 00:00:00 2001 From: AndyButland Date: Tue, 22 Jul 2014 23:11:22 +0100 Subject: [PATCH 2/2] Applied styling to list view paging (active class on page numbers, disabled on prev and next when not available --- .../src/less/listview.less | 4 ++++ .../listview/listview.controller.js | 2 +- .../propertyeditors/listview/listview.html | 18 +++++++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/listview.less b/src/Umbraco.Web.UI.Client/src/less/listview.less index ce1a73fe6d..13e3853458 100644 --- a/src/Umbraco.Web.UI.Client/src/less/listview.less +++ b/src/Umbraco.Web.UI.Client/src/less/listview.less @@ -166,6 +166,10 @@ color: @black; } +.umb-listview .pagination ul > li.disabled > a, .umb-listview .pagination ul > li.disabled > a:hover { + color: @grayLight; +} + /* TEMP */ .umb-listview .table-striped tbody td { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 578d7a464d..220aa070db 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -80,7 +80,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, notific contentResource.getChildren(id, $scope.options).then(function (data) { $scope.listViewResultSet = data; - $scope.pagination = []; + $scope.pagination = []; for (var i = $scope.listViewResultSet.totalPages - 1; i >= 0; i--) { $scope.pagination[i] = { index: i, name: i + 1 }; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 01ed21d42f..a9521865d6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -91,18 +91,22 @@