autocomplete on a class name
This commit is contained in:
parent
82f2d10f75
commit
efa7f4f17c
@ -80,12 +80,12 @@ and of course start organising your images :-)
|
|||||||
$h_search_link = make_link();
|
$h_search_link = make_link();
|
||||||
$h_search = "
|
$h_search = "
|
||||||
<p><form action='$h_search_link' method='GET'>
|
<p><form action='$h_search_link' method='GET'>
|
||||||
<input class='search_input' id='search_input' name='search' type='text'
|
<input class='tag_autocomplete search_input' id='search_input' name='search' type='text'
|
||||||
value='$h_search_string' autocomplete='off' />
|
value='$h_search_string' autocomplete='off' />
|
||||||
<input type='hidden' name='q' value='/post/list'>
|
<input type='hidden' name='q' value='/post/list'>
|
||||||
<input type='submit' value='Find' style='display: none;' />
|
<input type='submit' value='Find' style='display: none;' />
|
||||||
</form>
|
</form>
|
||||||
<div id='search_completions'></div>";
|
";
|
||||||
|
|
||||||
return $h_prev.' | '.$h_index.' | '.$h_next.'<br>'.$h_search;
|
return $h_prev.' | '.$h_index.' | '.$h_next.'<br>'.$h_search;
|
||||||
}
|
}
|
||||||
|
@ -20,29 +20,12 @@ class TagEditTheme extends Themelet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function get_tag_editor_html(Image $image) {
|
public function get_tag_editor_html(Image $image) {
|
||||||
$script = "
|
|
||||||
<script type='text/javascript'>
|
|
||||||
$().ready(function() {
|
|
||||||
$('#tag_editor').autocomplete('".make_link("api/internal/tag_list/complete")."', {
|
|
||||||
width: 320,
|
|
||||||
max: 15,
|
|
||||||
highlight: false,
|
|
||||||
multiple: true,
|
|
||||||
multipleSeparator: ' ',
|
|
||||||
scroll: true,
|
|
||||||
scrollHeight: 300,
|
|
||||||
selectFirst: false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
";
|
|
||||||
$h_tags = html_escape($image->get_tag_list());
|
$h_tags = html_escape($image->get_tag_list());
|
||||||
return "
|
return "
|
||||||
<tr>
|
<tr>
|
||||||
<td width='50px'>Tags</td>
|
<td width='50px'>Tags</td>
|
||||||
<td width='300px'><input type='text' name='tag_edit__tags' value='$h_tags' id='tag_editor'></td>
|
<td width='300px'><input type='text' name='tag_edit__tags' value='$h_tags' class='tag_autocomplete' id='tag_editor'></td>
|
||||||
</tr>
|
</tr>
|
||||||
$script
|
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ $(document).ready(function() {
|
|||||||
$("time").timeago();
|
$("time").timeago();
|
||||||
|
|
||||||
$('.search_input').DefaultValue('Search');
|
$('.search_input').DefaultValue('Search');
|
||||||
$('#search_input').autocomplete(base_href + '/api/internal/tag_list/complete', {
|
$('.tag_autocomplete').autocomplete(base_href + '/api/internal/tag_list/complete', {
|
||||||
width: 320,
|
width: 320,
|
||||||
max: 15,
|
max: 15,
|
||||||
highlight: false,
|
highlight: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user