Minimised form_notice markup by removing unordered lists. There is a minor CSS
rule reassignment done by changing the selectors. There is no visual
change in the final result.
This commit is contained in:
Sarven Capadisli 2009-03-25 18:16:20 +00:00
parent 66a2f4c64b
commit a13bfa5848
3 changed files with 9 additions and 61 deletions

View File

@ -132,20 +132,14 @@ class MessageForm extends Form
$mutual_users->free(); $mutual_users->free();
unset($mutual_users); unset($mutual_users);
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li', array('id' => 'notice_to'));
$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->elementEnd('li');
$this->out->elementStart('li', array('id' => 'notice_text'));
$this->out->element('textarea', array('id' => 'notice_data-text', $this->out->element('textarea', array('id' => 'notice_data-text',
'cols' => 35, 'cols' => 35,
'rows' => 4, 'rows' => 4,
'name' => 'content'), 'name' => 'content'),
($this->content) ? $this->content : ''); ($this->content) ? $this->content : '');
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
} }
/** /**
@ -156,14 +150,10 @@ class MessageForm extends Form
function formActions() function formActions()
{ {
$this->out->elementStart('ul', 'form_actions');
$this->out->elementStart('li', array('id' => 'notice_submit'));
$this->out->element('input', array('id' => 'notice_action-submit', $this->out->element('input', array('id' => 'notice_action-submit',
'class' => 'submit', 'class' => 'submit',
'name' => 'message_send', 'name' => 'message_send',
'type' => 'submit', 'type' => 'submit',
'value' => _('Send'))); 'value' => _('Send')));
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
} }
} }

View File

@ -134,9 +134,6 @@ class NoticeForm extends Form
function formData() function formData()
{ {
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li', array('id' => 'notice_text'));
$this->out->element('label', array('for' => 'notice_data-text'), $this->out->element('label', array('for' => 'notice_data-text'),
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
@ -145,8 +142,6 @@ class NoticeForm extends Form
'rows' => 4, 'rows' => 4,
'name' => 'status_textarea'), 'name' => 'status_textarea'),
($this->content) ? $this->content : ''); ($this->content) ? $this->content : '');
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
$this->out->elementStart('dl', 'form_note'); $this->out->elementStart('dl', 'form_note');
$this->out->element('dt', null, _('Available characters')); $this->out->element('dt', null, _('Available characters'));
@ -168,14 +163,10 @@ class NoticeForm extends Form
function formActions() function formActions()
{ {
$this->out->elementStart('ul', 'form_actions');
$this->out->elementStart('li', array('id' => 'notice_submit'));
$this->out->element('input', array('id' => 'notice_action-submit', $this->out->element('input', array('id' => 'notice_action-submit',
'class' => 'submit', 'class' => 'submit',
'name' => 'status_submit', 'name' => 'status_submit',
'type' => 'submit', 'type' => 'submit',
'value' => _('Send'))); 'value' => _('Send')));
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
} }
} }

View File

@ -421,6 +421,7 @@ padding:0;
display:none; display:none;
} }
#form_notice textarea { #form_notice textarea {
float:left;
border-radius:7px; border-radius:7px;
-moz-border-radius:7px; -moz-border-radius:7px;
-webkit-border-radius:7px; -webkit-border-radius:7px;
@ -431,30 +432,19 @@ padding:7px 7px 16px 7px;
} }
#form_notice label { #form_notice label {
display:block; display:block;
float:left;
font-size:1.3em; font-size:1.3em;
margin-bottom:7px; margin-bottom:7px;
} }
#form_notice .form_data li {
float:left;
}
#form_notice #notice_attach_file label,
#form_notice #notice_submit label { #form_notice #notice_submit label {
display:none; display:none;
} }
#form_notice #notice_attachment {
margin-top:25px;
margin-left:4px;
}
#form_notice .form_note { #form_notice .form_note {
position:absolute; position:absolute;
top:99px; top:99px;
right:98px; right:98px;
z-index:9; z-index:9;
} }
#form_notice .form_note dt { #form_notice .form_note dt {
font-weight:bold; font-weight:bold;
display:none; display:none;
@ -464,42 +454,19 @@ font-weight:bold;
line-height:1.15; line-height:1.15;
padding:1px 2px; padding:1px 2px;
} }
#form_notice #notice_action-submit {
#form_notice #notice_data-attach_view { width:60px;
position:absolute; padding:8px;
top:25px;
right:30px;
margin-left:4px;
padding:0;
width:16px;
height:16px;
border:0;
text-indent:-9999px;
}
#form_notice .form_actions {
position:absolute; position:absolute;
bottom:0; bottom:0;
right:0; right:0;
} }
#form_notice .form_actions input.submit { #form_notice label[for=to] {
width:60px;
padding:8px;
}
#form_notice li {
margin-bottom:0;
}
#form_notice #notice_to {
margin-bottom:7px;
}
#notice_to label {
float:left;
margin-right:18px;
margin-top:11px; margin-top:11px;
} }
#notice_to select { #form_notice select[id=to] {
margin-bottom:7px;
margin-left:18px;
float:left; float:left;
} }
/*end FORM NOTICE*/ /*end FORM NOTICE*/