Make it so input forms that don't have navigation don't accidentally get hidden. Add a "nonav" class to them.

This commit is contained in:
Zach Copley 2011-04-12 14:20:19 -07:00
parent 5454d22b79
commit 03de85ed46
4 changed files with 13 additions and 3 deletions

View File

@ -331,6 +331,8 @@ class NewnoticeAction extends Action
}
/**
* // XXX: Should we be showing the notice form with microapps here?
*
* Overload for replies or bad results
*
* We show content in the notice form if there were replies or results.
@ -357,7 +359,7 @@ class NewnoticeAction extends Action
'div',
array(
'id' => 'input_form_status',
'class' => 'input_form current'
'class' => 'input_form current nonav'
)
);

View File

@ -1389,6 +1389,14 @@ var SN = { // StatusNet
$('#input_form_nav_'+tag).addClass('current');
}
// Don't remove 'current' if we also have the "nonav" class.
// An example would be the message input form. removing
// 'current' will cause the form to vanish from the page.
var nonav = $('.input_form.current.nonav');
if (nonav.length > 0) {
return;
}
$('.input_form.current').removeClass('current');
$('#input_form_'+tag)
.addClass('current')

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -196,7 +196,7 @@ class MessageForm extends Form
'div',
array(
'id' => 'input_form_direct',
'class' => 'input_form current'
'class' => 'input_form current nonav'
)
);