1
0
Fork 0

Fixed #1050. Now its possible to clear the search in the documentation

This commit is contained in:
Thomas Schmidts 2014-10-14 16:13:03 +02:00
parent 766faddaf1
commit 12b3562f53
2 changed files with 27 additions and 1 deletions

View File

@ -2916,4 +2916,23 @@ background-color: rgba(240,240,0,0.4);
.book .book-body .page-wrapper .page-inner section.normal .deprecated pre{
background-color: rgba(240,240,0,0.4);
}
#clear-search {
display: inline;
position: absolute;
top: 12px;
right: 9px;
font-size: 18pt;
line-height: 18pt;
color: #364149; // needs to be updated on theme change
}
#clear-search:hover {
color: #008cff; // needs to be updated on theme change
text-decoration: none;
}
.book .book-summary .book-search input{
padding-right: 20px !important;
}

View File

@ -34,6 +34,7 @@
<div class="book-summary">
<div class="book-search">
<a id="clear-search" href="#">&times;</a>
<input type="text" placeholder="Type to search" class="form-control" />
</div>
<ul class="summary">
@ -87,4 +88,10 @@ $(function(){
}
});
});
</script>
</script>
<script type="text/javascript">
$('#clear-search').on('click', function(event){
event.preventDefault();
$('.book-search input').val("").trigger("keyup");
});
</script>