
audreyt at bestpractical
Dec 1, 2007, 6:30 PM
Post #1 of 1
(141 views)
Permalink
|
|
r9780 - rt/branches/3.6-RELEASE/html/Elements
|
|
Author: audreyt Date: Sat Dec 1 21:30:10 2007 New Revision: 9780 Modified: rt/branches/3.6-RELEASE/html/Elements/EmailInput Log: * EmailInput: First cut at email completion widget. Modified: rt/branches/3.6-RELEASE/html/Elements/EmailInput ============================================================================== --- rt/branches/3.6-RELEASE/html/Elements/EmailInput (original) +++ rt/branches/3.6-RELEASE/html/Elements/EmailInput Sat Dec 1 21:30:10 2007 @@ -45,7 +45,62 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<input id="EmailInput-<% $Name %>" name="<% $Name %>" size="<% $Size %>" value="<% $Default %>" /> +% if (!$m->notes('RT-Scriptaculous-Loaded')) { +% $m->notes('RT-Scriptaculous-Loaded' => 1); +<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/scriptaculous/prototype.js"></script> +<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/scriptaculous/scriptaculous.js?load=effects,controls"></script> +<style type="text/css"> +<!--/*--><![.CDATA[./*><!--*/ + +/* This part wants to be in a .css file */ + +form input.ajaxautocompletes { + background: #fff url(<%$RT::WebPath%>/NoAuth/images/css/fieldbg-autocomplete.gif) repeat-x top right; + padding-right: 18px; +} + +/* Autocomplete */ + +.autocomplete { + border: 1px solid #666; + background: white; + z-index: 43; +} + +.autocomplete ul { + margin: 0; + padding: 0; + list-style: none; +} + +.autocomplete li { + padding: 0.1em 0 0.1em 0.3em; + cursor: default; +} + +.autocomplete .selected { + background: rgb(82, 134, 181); + color: white; +} + +div.inline .autocomplete .hidden_value, +.autocomplete .hidden_value { + display: none; +} + +/*]]>*/--> +</style> +% } +% my $id = "EmailInput-$Name"; +% my $div = "$id-Autocomplete"; +% my $indicator = "$id-Indicator"; +<input id="<% $id %>" class="ajaxautocompletes" name="<% $Name %>" size="<% $Size %>" value="<% $Default %>" /> +<div id="<% $div %>" class="autocomplete"></div> +<script type="text/javascript"> +<!--//--><![.CDATA[.//><!-- +new Ajax.Autocompleter("<% $id %>", "<% $div %>", "<%$RT::WebPath%>/Helpers/EmailAutocomplete", {paramName: 'Value'}); +//--><!]]> +</script> <%ARGS> $Name $Size => 40 _______________________________________________ Rt-commit mailing list Rt-commit [at] lists http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|