Subject: | Autocompleter bug |
Date: | Thu, 1 Apr 2010 01:13:28 -0700 |
To: | <bug-RTx-Tags [...] rt.cpan.org> |
From: | "Mark Bassett" <mbassett [...] intelius.com> |
When using WebPath, the autocompleter does not function as it should.
Needed to add RT->Config->Get('WebPath') in front of <% $helper %>
Updated code in html/Elements/EditCustomFieldAutocompleter
%# END BPS TAGGED BLOCK }}}
% my($tokens, $helper) = ('',
"/Helpers/Autocomplete/CustomFieldValues");
% if( uc($CustomField->Name) eq 'TAGS' ){
% $tokens = q(tokens: [',', ';', '\n']);
% $helper = "/Helpers/Autocomplete/CustomFieldContents";
%}
% if ( $Multiple ) {
<textarea cols="<% $Cols %>" rows="<% $Rows %>" name="<% $name
%>-Values" id="<% $name %>-Values" ><% $Default %></textarea><div id="<%
$name %>-Choices" class="autocomplete"></div>
<script type="text/javascript">
new Ajax.Autocompleter(
"<% $name %>-Values",
"<% $name %>-Choices",
"<% RT->Config->Get('WebPath').$helper %>",
{<% $tokens || "tokens: [ '\n' ]" |n%>}
);
% } else {
<input type="text" id="<% $name %>-Value" name="<% $name %>-Value"
value="<% $Default %>"/><div id="<% $name %>-Choices"
class="autocomplete"></div>
<script type="text/javascript">
new Ajax.Autocompleter(
"<% $name %>-Value",
"<% $name %>-Choices",
"<% RT->Config->Get('WebPath').$helper %>",
{<% $tokens |n%>}
);
% }
</script>
<%INIT>
Mark Bassett
Sr. Network Engineer
Intelius
p: 425-974-8810
c: 425-233-7253
e: mbassett@intelius.com <mailto:mbassett@intelius.com>