diff messages/static/js/tabbed_messages.js @ 711:c09ed90c891b

Fix regression in messages that efb525863a75 broke. Changeset efb525863a75 broke the feature that auto-populated the To: field in a private message when you clicked on a user's PM button.
author Brian Neal <bgneal@gmail.com>
date Tue, 17 Sep 2013 18:17:28 -0500
parents efb525863a75
children 796103a2215b
line wrap: on
line diff
--- a/messages/static/js/tabbed_messages.js	Sun Sep 15 17:00:52 2013 -0500
+++ b/messages/static/js/tabbed_messages.js	Tue Sep 17 18:17:28 2013 -0500
@@ -18,7 +18,13 @@
       },
       load: function(event, ui) {
          selectedTab = ui;
-         if (doReply && ui.tab.index() == 1)
+
+         if (ui.tab.index() == 1 && receiver && !doReply)
+         {
+            $('#id_receiver').val(receiver);
+            receiver = '';
+         }
+         else if (doReply && ui.tab.index() == 1)
          {
             doReply = false;
             var msg = msgCache[$msgDialog.msgId];