Skip to content

Commit

Permalink
Make sure there is room for the sort icons when search results are th…
Browse files Browse the repository at this point in the history
…ere, refs #515
  • Loading branch information
Seldaek committed Jun 14, 2015
1 parent 65acc91 commit a3aef12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Packagist/WebBundle/Resources/public/css/main.css
Expand Up @@ -808,6 +808,9 @@ ul.packages .metadata-block:last-child {
position: relative;
top: 2px;
margin-left: -12px;
padding-right: 0;
white-space: nowrap;
overflow: hidden;
}

.sortable .order-by-group .icon:first-child {
Expand Down
1 change: 1 addition & 0 deletions src/Packagist/WebBundle/Resources/public/js/search.js
Expand Up @@ -21,6 +21,7 @@
$('.order-by-group').attr('href', function (index, current) {
return current.replace(/q=.*?&/, 'q=' + encodeURIComponent($('input[type="search"]', form).val()) + '&')
});
$('.js-search-field-wrapper').removeClass('col-xs-12').addClass('col-xs-8');
$('#order-bys-wrapper').removeClass('hidden');

searching = false;
Expand Down
@@ -1,7 +1,7 @@
<form id="search-form" action="{{ path('search.ajax') }}" method="GET" {{ form_enctype(searchForm) }} autocomplete="off">
<div class="{% if orderBys is defined %}sortable{% endif %} row">
<div class="hidden">{{ form_errors(searchForm.query) }}</div>
<div class="col-xs-12 col-sm-9">
<div class="{% if searchForm.vars.value.query is empty %}col-xs-12{% else %}col-xs-8{% endif %} js-search-field-wrapper col-sm-9">
{{ form_widget(searchForm.query, {'attr': {'autocomplete': 'off', 'autofocus': 'autofocus', 'placeholder': 'Search packages...', 'tabindex': 1}}) }}
</div>

Expand Down

0 comments on commit a3aef12

Please sign in to comment.