Skip to content

Commit

Permalink
Add checkmark to selected dropdown options
Browse files Browse the repository at this point in the history
  • Loading branch information
gneissone committed May 9, 2016
1 parent 43d1133 commit b5934a8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions css/browsers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

.btn-group.hidden {
display: none !important
}

.facetview_filters.hidden {
display: none; !important;
}
5 changes: 5 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ 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";
}
9 changes: 9 additions & 0 deletions jquery.facetview2.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ function getUrlVars() {
event.preventDefault();
sizechoice = ($(this).attr('id'))

// switch item with 'selected' class
$('.facetview_size_drop', obj).removeClass('selected')
$(this).addClass('selected')

// synchronise the new sort with the options
savePageSizeOption(sizechoice);

Expand All @@ -826,6 +830,11 @@ function getUrlVars() {
event.preventDefault();
sortchoice = ($(this).attr('id'))
options.behaviour_set_order_by(options, obj, {orderby: sortchoice})

// switch item with 'selected' class
$('.facetview_orderby', obj).removeClass('selected')
$(this).addClass('selected')

// $('.dropdown-toggle').html($(this).html() + '<span class="caret"></span>');
// synchronise the new sort with the options
saveSortOption(sortchoice);
Expand Down

0 comments on commit b5934a8

Please sign in to comment.