summaryrefslogtreecommitdiff
path: root/js/catalog-search.js
diff options
context:
space:
mode:
authorAppleman1234 <applemansigloo@gmail.com>2016-12-15 18:25:42 +0900
committerGitHub <noreply@github.com>2016-12-15 18:25:42 +0900
commitcae526e65a20f3da2d8884c4d8e8978c54120000 (patch)
tree2954153dd49f616f5018490058ff4bfbd17300d3 /js/catalog-search.js
parentb58fab98147a92c8e6d22f15d23684508b6bb811 (diff)
parent5feae402cb55d49963bfd2c6f5a33d10690ecbc1 (diff)
Merge pull request #79 from lainchan/clean_prod_vichan_update
Merge vichan changes from upstream and changes directly applied to the site.
Diffstat (limited to 'js/catalog-search.js')
-rw-r--r--js/catalog-search.js15
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);