Fixes for direct message form for JS changes to the main form

This commit is contained in:
Brion Vibber 2011-03-09 16:55:52 -08:00
parent e74590d414
commit cecc2576a5
4 changed files with 7 additions and 7 deletions

View File

@ -104,7 +104,7 @@ var SN = { // StatusNet
SN.U.Counter(form); SN.U.Counter(form);
NDT = form.find('[name=status_textarea]'); NDT = form.find('.notice_data-text:first');
NDT.bind('keyup', function(e) { NDT.bind('keyup', function(e) {
SN.U.Counter(form); SN.U.Counter(form);
@ -183,7 +183,7 @@ var SN = { // StatusNet
* @return number of chars * @return number of chars
*/ */
CharacterCount: function(form) { CharacterCount: function(form) {
return form.find('[name=status_textarea]').val().length; return form.find('.notice_data-text:first').val().length;
}, },
/** /**
@ -327,7 +327,7 @@ var SN = { // StatusNet
dataType: 'xml', dataType: 'xml',
timeout: '60000', timeout: '60000',
beforeSend: function(formData) { beforeSend: function(formData) {
if (form.find('[name=status_textarea]').val() == '') { if (form.find('.notice_data-text:first').val() == '') {
form.addClass(SN.C.S.Warning); form.addClass(SN.C.S.Warning);
return false; return false;
} }

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -96,7 +96,7 @@ class MessageForm extends Form
function formClass() function formClass()
{ {
return 'form_notice'; return 'form_notice ajax-notice';
} }
/** /**
@ -153,7 +153,7 @@ class MessageForm extends Form
$this->out->dropdown('to', _('To'), $mutual, null, false, $this->out->dropdown('to', _('To'), $mutual, null, false,
($this->to) ? $this->to->id : null); ($this->to) ? $this->to->id : null);
$this->out->element('textarea', array('id' => 'notice_data-text', $this->out->element('textarea', array('class' => 'notice_data-text',
'cols' => 35, 'cols' => 35,
'rows' => 4, 'rows' => 4,
'name' => 'content'), 'name' => 'content'),

View File

@ -170,7 +170,7 @@ class NoticeForm extends Form
// TRANS: Title for notice label. %s is the user's nickname. // TRANS: Title for notice label. %s is the user's nickname.
sprintf(_('What\'s up, %s?'), $this->user->nickname)); sprintf(_('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size // XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text', $this->out->element('textarea', array('class' => 'notice_data-text',
'cols' => 35, 'cols' => 35,
'rows' => 4, 'rows' => 4,
'name' => 'status_textarea'), 'name' => 'status_textarea'),