Skip to content

Commit

Permalink
remove search-bar, clean up styling
Browse files Browse the repository at this point in the history
  • Loading branch information
6palace committed Aug 31, 2017
1 parent 32ed27c commit e9d8d33
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 46 deletions.
22 changes: 0 additions & 22 deletions uaa/slate/source/javascripts/app/_version_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

function bindFilter() {
searchResults = $('#version-list');
$('#version-select').on('keyup', filterDropdown);
}

function findMatchingLinkFromOriginal(id) {
Expand All @@ -58,27 +57,6 @@
});
}

function filterDropdown(event) {
// ESC clears the field
if (event.keyCode === 27) this.value = '';

if (this.value) {
var results = index.search(this.value).filter(function(r) {
return r.score > 0.0001;
});
if (results.length) {
searchResults.empty();
displaySearchResults(results);
} else {
searchResults.html('<li>' + 'No Results Found for "' + this.value + '"' + '</li>');
}
} else {
searchResults.empty();
restoreOriginalContent();
populateFilter();
}
}

function setupVersionsDropdown() {
$.get(
"/versions.json",
Expand Down
3 changes: 0 additions & 3 deletions uaa/slate/source/layouts/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ under the License.
<button type="button" id="version-dropdown-button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><%= get_version %><span class="caret">&#x25BE;</span></button>
<ul id="version-dropdown-menu" class="dropdown-menu" role="menu" aria-labelledby="version-dropdown-button">
<div class="dropdown-filter">
<div class="dropdown-search-bar">
<input id="version-select" type="text" placeholder="Filter">
</div>
<div class="dropdown-content">
<ul class="dropdown-list" id="version-list">
</ul>
Expand Down
22 changes: 1 addition & 21 deletions uaa/slate/source/stylesheets/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
position: absolute;
top: 100%;
left: 0;
background-color: #fff;
background-color: #999;
border: 1px solid #d4d9d9;
border-radius: 4px;
box-shadow: 0 2px 0 rgba(211, 217, 217, 0.5);
Expand All @@ -34,26 +34,6 @@
width: calc(100% - 25px);
color: #2185c5;
}

&:before {
position: absolute;
top: 17px;
left: $nav-padding;
color: $nav-text;
@extend %icon-search;
}
}

.dropdown-filter .dropdown-search-bar {
padding:10px;

&:first-child {
border-bottom:1px solid #d4d9d9;
}

&:last-child {
border-top:1px solid #d4d9d9;
}
}

.dropdown-filter .dropdown-footer {
Expand Down

0 comments on commit e9d8d33

Please sign in to comment.