Keep 'Status' tab current while showing the placeholder -- pretend like it's a mini version of the status notice form :D

This commit is contained in:
Brion Vibber 2011-03-10 18:01:40 -08:00
parent 17dc1c8703
commit 0f3af3e3b7
3 changed files with 14 additions and 2 deletions

View File

@ -1290,7 +1290,13 @@ var SN = { // StatusNet
switchInputFormTab: function(tag) { switchInputFormTab: function(tag) {
// The one that's current isn't current anymore // The one that's current isn't current anymore
$('.input_form_nav_tab.current').removeClass('current'); $('.input_form_nav_tab.current').removeClass('current');
$('#input_form_nav_'+tag).addClass('current'); if (tag == 'placeholder') {
// Hack: when showing the placeholder, mark the tab
// as current for 'Status'.
$('#input_form_nav_status').addClass('current');
} else {
$('#input_form_nav_'+tag).addClass('current');
}
$('.input_form.current').removeClass('current'); $('.input_form.current').removeClass('current');
$('#input_form_'+tag) $('#input_form_'+tag)

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -601,6 +601,12 @@ class Action extends HTMLOutputter // lawsuit
$attrs = array('id' => 'input_form_nav_'.$tag, $attrs = array('id' => 'input_form_nav_'.$tag,
'class' => 'input_form_nav_tab'); 'class' => 'input_form_nav_tab');
if ($tag == 'status') {
// We're actually showing the placeholder form,
// but we special-case the 'Status' tab as if
// it were a small version of it.
$attrs['class'] .= ' current';
}
$this->elementStart('li', $attrs); $this->elementStart('li', $attrs);
$this->element('a', $this->element('a',