diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
| commit | a3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (patch) | |
| tree | 5a2ebdb801748586e3fde7c12cbeda169b2c3e31 /js/catalog-search.js | |
| parent | 9436524a306c8e3d6d8a6ed195e2a3c56d5cde39 (diff) | |
| parent | a4b619ae5eaab5755dc215a496854dee8f7ce395 (diff) | |
Merged lainchan with vichan master at 25/9/2016 a4b619ae5eaab5755dc215a496854dee8f7ce395 @czaks czaks committed on GitHub 2 days ago
Diffstat (limited to 'js/catalog-search.js')
| -rw-r--r-- | js/catalog-search.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/catalog-search.js b/js/catalog-search.js index b3c9c49e..fc39b1ce 100644 --- a/js/catalog-search.js +++ b/js/catalog-search.js @@ -17,6 +17,21 @@ var catalogSearch = function() { $threads = $('.threads .thread'), $searchLabel = $('<label for="catalog_search">Search: </label>'), $searchBox = $('<input id="catalog_search" type="text" placeholder="Search" />'); + function searchToggle() { + var button = $('#catalog_search_button'); + + if (!button.data('expanded')) { + button.data('expanded', '1'); + button.text('Close'); + $('.catalog_search').append(' <input id="search_field" style="border: inset 1px;">'); + $('#search_field').focus(); + } else { + button.removeData('expanded'); + button.text('Search'); + $('.catalog_search').children().last().remove(); + $('div[id="Grid"]>.mix').each(function () { $(this).css('display', 'inline-block'); }); + } + } $controls.append($searchLabel) .append($searchBox); |
