comparison gpp/messages/static/js/tabbed_messages.js @ 430:9df368d9775d

Fix bug where messages were never getting replied to.
author Brian Neal <bgneal@gmail.com>
date Thu, 05 May 2011 02:58:44 +0000
parents d0f0800eef0c
children 9f888dbe61ce
comparison
equal deleted inserted replaced
429:d0f0800eef0c 430:9df368d9775d
16 doReply = false; 16 doReply = false;
17 var msg = msgCache[$msgDialog.msgId]; 17 var msg = msgCache[$msgDialog.msgId];
18 $('#id_receiver').val(msg.sender); 18 $('#id_receiver').val(msg.sender);
19 $('#id_subject').val(msg.re_subject); 19 $('#id_subject').val(msg.re_subject);
20 $('#id_message').val(msg.re_content); 20 $('#id_message').val(msg.re_content);
21 $('#msg_compose_form').append('<input type="hidden" name="reply_to" value="' +
22 $msgDialog.msgId + '" />');
21 } 23 }
22 }, 24 },
23 ajaxOptions: { 25 ajaxOptions: {
24 error: function(xhr, status, index, anchor) { 26 error: function(xhr, status, index, anchor) {
25 $(anchor.hash).html( 27 $(anchor.hash).html(
138 url: '/messages/compose-tab/', 140 url: '/messages/compose-tab/',
139 type: 'POST', 141 type: 'POST',
140 data: $(form).serialize(), 142 data: $(form).serialize(),
141 dataType: 'html', 143 dataType: 'html',
142 success: function (data, textStatus) { 144 success: function (data, textStatus) {
143 $('#ui-tabs-1').html(data); 145 $(selectedTab.panel).html(data);
144 }, 146 },
145 error: function (xhr, textStatus, ex) { 147 error: function (xhr, textStatus, ex) {
146 alert('Oops, an error occurred. ' + xhr.statusText + ' - ' + 148 alert('Oops, an error occurred. ' + xhr.statusText + ' - ' +
147 xhr.responseText); 149 xhr.responseText);
148 } 150 }