# HG changeset patch # User Brian Neal # Date 1378776613 18000 # Node ID efb525863a75bd105d740b682591ecf319be7f73 # Parent d84aaf2391825b2e653838f965db809e4e1eac05 jQuery UI Tabs were changed quite a bit, which broke private messages. Here is a fix. Upgrade notes are found here: http://jqueryui.com/upgrade-guide/1.9/#tabs diff -r d84aaf239182 -r efb525863a75 messages/static/js/tabbed_messages.js --- a/messages/static/js/tabbed_messages.js Fri Sep 06 21:50:53 2013 -0500 +++ b/messages/static/js/tabbed_messages.js Mon Sep 09 20:30:13 2013 -0500 @@ -12,18 +12,13 @@ })); $tabs = $('#tabs').tabs({ - selected: initialTab, - select: function(event, ui) { + active: initialTab, + activate: function(event, ui) { $(ui.panel).html(''); }, load: function(event, ui) { selectedTab = ui; - if (ui.index == 1 && receiver && !doReply) - { - $('#id_receiver').val(receiver); - receiver = ''; - } - else if (doReply && ui.index == 1) + if (doReply && ui.tab.index() == 1) { doReply = false; var msg = msgCache[$msgDialog.msgId]; @@ -34,11 +29,11 @@ $msgDialog.msgId + '" />'); } }, - ajaxOptions: { - error: function(xhr, status, index, anchor) { + beforeLoad: function(event, ui) { + ui.jqXHR.error(function(xhr, status, index, anchor) { $(anchor.hash).html( "Oops, we couldn't load this tab. We'll try to fix this as soon as possible."); - } + }); } }); $msgDialog = $('#msgDialog').dialog({ @@ -53,7 +48,7 @@ click: function() { doReply = true; $(this).dialog('close'); - $tabs.tabs("select", 1); + $tabs.tabs("option", "active", 1); } }, { @@ -183,7 +178,7 @@ data: $(form).serialize(), dataType: 'text', success: function (data, textStatus) { - $tabs.tabs("load", selectedTab.index); + $tabs.tabs("load", selectedTab.tab.index()); }, error: function (xhr, textStatus, ex) { alert('Oops, an error occurred. ' + xhr.statusText + ' - ' +