From ab7c62515efbe5f7dc1e19c52cc6196f4a80dcda Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 7 Feb 2012 11:33:42 +0000 Subject: [PATCH] move JS bits into static files --- ext/index/theme.php | 17 +---------------- lib/shimmie.js | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/ext/index/theme.php b/ext/index/theme.php index c7d2cb95..0a4b1fa8 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -79,23 +79,8 @@ and of course start organising your images :-) $h_search_string = html_escape(implode(" ", $search_terms)); $h_search_link = make_link(); $h_search = " -

- diff --git a/lib/shimmie.js b/lib/shimmie.js index ae4bc7aa..6ed41062 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -27,11 +27,19 @@ $(document).ready(function() { }); $("time").timeago(); -}); -var defaultTexts = new Array(); + $('.search_input').DefaultValue('Search'); + $('#search_input').autocomplete(base_href + '/api/internal/tag_list/complete', { + width: 320, + max: 15, + highlight: false, + multiple: true, + multipleSeparator: ' ', + scroll: true, + scrollHeight: 300, + selectFirst: false + }); -window.onload = function(e) { var sections=get_sections(); for(var i=0;i