From 040baf291d031b20723ec5455e120b3e40c98a49 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 9 Mar 2011 13:05:12 -0800 Subject: [PATCH] Fix for input tab selection --- js/util.js | 7 +++++++ lib/action.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/util.js b/js/util.js index 6bba34fae6..6bd5d668a9 100644 --- a/js/util.js +++ b/js/util.js @@ -1280,6 +1280,13 @@ var SN = { // StatusNet return false; }, + /** + * Switch to another active input sub-form. + * This will hide the current form (if any), show the new one, and + * update the input type tab selection state. + * + * @param {String} tag + */ switchInputFormTab: function(tag) { // The one that's current isn't current anymore $('.input_form_nav_tab.current').removeClass('current'); diff --git a/lib/action.php b/lib/action.php index 2b237118af..0ba4b8b8ff 100644 --- a/lib/action.php +++ b/lib/action.php @@ -602,7 +602,7 @@ class Action extends HTMLOutputter // lawsuit 'class' => 'input_form_nav_tab'); if ($tag == 'status') { - $attrs['class'] = 'current'; + $attrs['class'] .= ' current'; } $this->elementStart('li', $attrs);