2
* Used by the Compose function in Messaging (modules/s3msg.py)
3
* This script is in Static to allow caching
4
* Dynamic constants (e.g. Internationalised strings) are set in server-generated script
10
function s3_msg_ac_pe_input() {
11
// Hide the real Input Field
12
$('#msg_outbox_pe_id').hide();
13
// Autocomplete-enable the Dummy Input
14
$('#dummy').autocomplete({
15
source: S3.msg_search_url,
17
focus: function( event, ui ) {
18
$( '#dummy' ).val( ui.item.name );
21
select: function( event, ui ) {
22
$( '#dummy_input' ).val( ui.item.name );
23
$( '#msg_outbox_pe_id' ).val( ui.item.id );
27
.data( 'autocomplete' )._renderItem = function( ul, item ) {
28
return $( '<li></li>' )
29
.data( 'item.autocomplete', item )
30
.append( '<a>' + item.name + '</a>' )
35
$(document).ready(function() {
36
if ($('#msg_outbox_pr_message_method').val() != 'EMAIL') {
37
// SMS/Tweets don't have subjects
38
$('#msg_log_subject__row').hide();
40
$('#msg_outbox_pr_message_method').change(function() {
41
if ($(this).val() == 'EMAIL') {
42
// Emails have a Subject
43
$('#msg_log_subject__row').show();
45
$('#msg_log_subject__row').hide();
b'\\ No newline at end of file'