From 91dfb75b4782e4e1d6d4b46aca37bce9789e8d9b Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sun, 3 Apr 2011 11:08:35 +0000 Subject: [PATCH] + selected only the current page in the page list at the bottom of each result page --- src/common/kiwix/searcher.cpp | 4 ++++ static/results.tmpl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/kiwix/searcher.cpp b/src/common/kiwix/searcher.cpp index 0a751931..52ba6496 100644 --- a/src/common/kiwix/searcher.cpp +++ b/src/common/kiwix/searcher.cpp @@ -185,6 +185,10 @@ namespace kiwix { CDT page; page["start"] = i * this->resultCountPerPage; page["end"] = (i+1) * this->resultCountPerPage; + + if (i * this->resultCountPerPage == this->resultStart) + page["selected"] = true; + pagesCDT.PushBack(page); } oData["pages"] = pagesCDT; diff --git a/static/results.tmpl b/static/results.tmpl index 712f4a9d..2144530f 100644 --- a/static/results.tmpl +++ b/static/results.tmpl @@ -114,7 +114,7 @@