move JS bits into static files

This commit is contained in:
Shish 2012-02-07 11:33:42 +00:00
parent 2162dbebdd
commit ab7c62515e
2 changed files with 13 additions and 20 deletions

View File

@ -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 = "
<script type='text/javascript'><!--
$(document).ready(function() {
$('#search_input').DefaultValue('Search');
$('#search_input').autocomplete('".make_link("api/internal/tag_list/complete")."', {
width: 320,
max: 15,
highlight: false,
multiple: true,
multipleSeparator: ' ',
scroll: true,
scrollHeight: 300,
selectFirst: false
});
});
//--></script>
<p><form action='$h_search_link' method='GET'>
<input id='search_input' name='search' type='text'
<input class='search_input' id='search_input' name='search' type='text'
value='$h_search_string' autocomplete='off' />
<input type='hidden' name='q' value='/post/list'>
<input type='submit' value='Find' style='display: none;' />

View File

@ -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<sections.length;i++) toggle(sections[i]);
@ -44,7 +52,7 @@ window.onload = function(e) {
if(pass_confirm) {
pass_confirm.style.display = "none";
}
}
});
function initGray(boxname, text) {
var box = byId(boxname);