Clean up how we deal with the message type tabs

(imported from commit 429e055d3eca65af8bc0fe58481a7becf9ced66a)
This commit is contained in:
Keegan McAllister
2012-11-02 16:54:09 -04:00
parent 02f7ac42e7
commit 477bad9536
4 changed files with 12 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ exports.show = function (tabname, focus_area) {
$('#compose').css({visibility: "visible"});
$("#new_message_content").trigger("autosize");
$('.message_comp').slideDown(100);
$('#message-type-tabs a[href="#' + tabname + '-message"]').tab('show');
$('#compose-' + tabname).tab('show');
focus_area.focus();
focus_area.select();
};
@@ -147,7 +147,7 @@ exports.set_message_type = function (tabname) {
exports.toggle_mode = function () {
if ($("#message-type-tabs li.active").find("a[href=#stream-message]").length !== 0) {
if ($('#compose-stream').parent().hasClass('active')) {
// In stream tab, switch to personals.
exports.show('personal', $("#huddle_recipient"));
} else {