Skip to content

Commit

Permalink
Leave pagination on page on empty search
Browse files Browse the repository at this point in the history
  • Loading branch information
gneissone committed May 24, 2016
1 parent 1c3b97a commit 93b3306
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion bootstrap3.facetview.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,11 @@ function basicPager(options) {

// calculate the human readable values we want
var to = from + size;
from = from + 1; // zero indexed
if (options.data.found < to) { to = options.data.found }
var total = options.data.found;
if (total != 0) {
from = from + 1; // zero indexed
}

// forward and back-links, taking into account start and end boundaries
var backlink = '<a class="facetview_decrement">&laquo; back</a>';
Expand Down
10 changes: 9 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ td.facetview_filtershow {
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.19);
-webkit-font-smoothing: antialiased;
}

.dropdown-menu .selected:after {
font-family: "Glyphicons Halflings";
content:"\0020\e013";
}

.document {
margin-left: 1em;
}

.doc_info {
margin: 0em 0.5em 0.5em 2em;
}
8 changes: 4 additions & 4 deletions jquery.facetview2.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ function getUrlVars() {
"default_date_histogram_sort" : "asc",
"default_short_display" : false,
"default_ignore_empty_string" : false, // because filtering out empty strings is less performant
"default_tooltip" : false,
"default_tooltip_text" : "learn more",
"default_tooltip" : false,
"default_tooltip_text" : "learn more",


///// search bar configuration /////////////////////////////
Expand Down Expand Up @@ -1362,10 +1362,10 @@ function getUrlVars() {
/////// display results metadata /////////////////////////////////

function setUIResultsMetadata() {
if (!options.data.found) {
/* if (!options.data.found) {
$('.facetview_metadata', obj).html("");
return
}
} */
frag = options.render_results_metadata(options);
$('.facetview_metadata', obj).html(frag);
$('.facetview_decrement', obj).bind('click', decrementPage);
Expand Down

0 comments on commit 93b3306

Please sign in to comment.