a bunch of autocompletion
This commit is contained in:
parent
f3c9ca3e65
commit
c8b7d639df
@ -81,7 +81,16 @@ EOD;
|
|||||||
$h_search = "
|
$h_search = "
|
||||||
<script><!--
|
<script><!--
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(\"#search_input\").DefaultValue(\"Search\");
|
$('#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
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//--></script>
|
//--></script>
|
||||||
<p><form action='$h_search_link' method='GET'>
|
<p><form action='$h_search_link' method='GET'>
|
||||||
|
@ -19,8 +19,29 @@ 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
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
";
|
||||||
$h_tags = html_escape($image->get_tag_list());
|
$h_tags = html_escape($image->get_tag_list());
|
||||||
return "<tr><td width='50px'>Tags</td><td width='300px'><input type='text' name='tag_edit__tags' value='$h_tags'></td></tr>";
|
return "
|
||||||
|
<tr>
|
||||||
|
<td width='50px'>Tags</td>
|
||||||
|
<td width='300px'><input type='text' name='tag_edit__tags' value='$h_tags' id='tag_editor'></td>
|
||||||
|
</tr>
|
||||||
|
$script
|
||||||
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_source_editor_html(Image $image) {
|
public function get_source_editor_html(Image $image) {
|
||||||
|
@ -35,15 +35,29 @@ class UploadTheme extends Themelet {
|
|||||||
$max_size = $config->get_int('upload_size');
|
$max_size = $config->get_int('upload_size');
|
||||||
$max_kb = to_shorthand_int($max_size);
|
$max_kb = to_shorthand_int($max_size);
|
||||||
$html = "
|
$html = "
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#tag_box').DefaultValue('tagme');
|
||||||
|
$('#tag_box').autocomplete('".make_link("api/internal/tag_list/complete")."', {
|
||||||
|
width: 320,
|
||||||
|
max: 15,
|
||||||
|
highlight: false,
|
||||||
|
multiple: true,
|
||||||
|
multipleSeparator: ' ',
|
||||||
|
scroll: true,
|
||||||
|
scrollHeight: 300
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<form enctype='multipart/form-data' action='".make_link("upload")."' method='POST'>
|
<form enctype='multipart/form-data' action='".make_link("upload")."' method='POST'>
|
||||||
<table id='large_upload_form'>
|
<table id='large_upload_form'>
|
||||||
$upload_list
|
$upload_list
|
||||||
<tr><td>Tags</td><td colspan='3'><input id='tagBox' name='tags' type='text' value='tagme' autocomplete='off'></td></tr>
|
<tr><td>Tags</td><td colspan='3'><input id='tag_box' name='tags' type='text'></td></tr>
|
||||||
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
||||||
<tr><td colspan='4'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
<tr><td colspan='4'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<div id='upload_completions' style='clear: both;'><small>(Max file size is $max_kb)</small></div>
|
<small>(Max file size is $max_kb)</small>
|
||||||
";
|
";
|
||||||
|
|
||||||
if($tl_enabled) {
|
if($tl_enabled) {
|
||||||
@ -93,7 +107,16 @@ class UploadTheme extends Themelet {
|
|||||||
return "
|
return "
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(\"#tag_input\").DefaultValue(\"tagme\");
|
$('#tag_input').DefaultValue('tagme');
|
||||||
|
$('#tag_input').autocomplete('".make_link("api/internal/tag_list/complete")."', {
|
||||||
|
width: 320,
|
||||||
|
max: 15,
|
||||||
|
highlight: false,
|
||||||
|
multiple: true,
|
||||||
|
multipleSeparator: ' ',
|
||||||
|
scroll: true,
|
||||||
|
scrollHeight: 300
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<form enctype='multipart/form-data' action='".make_link("upload")."' method='POST'>
|
<form enctype='multipart/form-data' action='".make_link("upload")."' method='POST'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user