Removed <dl> structure from NoticeListItem::showDeleteLink. Reason:
To speed up DOM load by cutting down 3 nodes in each notice list item. Generally each notice option should be a list item in a <ul>, however, there is no tangible benefit for the user using this approach. In this case, minimalism is favoured. Similarly, the new approach will make 5 fewer function calls on the server side.
This commit is contained in:
parent
f86faaf341
commit
e0b877b26c
|
@ -479,13 +479,9 @@ class NoticeListItem extends Widget
|
||||||
if ($user && $this->notice->profile_id == $user->id) {
|
if ($user && $this->notice->profile_id == $user->id) {
|
||||||
$deleteurl = common_local_url('deletenotice',
|
$deleteurl = common_local_url('deletenotice',
|
||||||
array('notice' => $this->notice->id));
|
array('notice' => $this->notice->id));
|
||||||
$this->out->elementStart('dl', 'notice_delete');
|
|
||||||
$this->out->element('dt', null, _('Delete this notice'));
|
|
||||||
$this->out->elementStart('dd');
|
|
||||||
$this->out->element('a', array('href' => $deleteurl,
|
$this->out->element('a', array('href' => $deleteurl,
|
||||||
|
'class' => 'notice_delete',
|
||||||
'title' => _('Delete this notice')), _('Delete'));
|
'title' => _('Delete this notice')), _('Delete'));
|
||||||
$this->out->elementEnd('dd');
|
|
||||||
$this->out->elementEnd('dl');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -937,22 +937,18 @@ display:block;
|
||||||
border:0;
|
border:0;
|
||||||
}
|
}
|
||||||
.notice-options .notice_reply a,
|
.notice-options .notice_reply a,
|
||||||
.notice-options .notice_delete a {
|
.notice-options .notice_delete {
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
padding-left:16px;
|
padding-left:16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-options form input.submit {
|
.notice-options form input.submit {
|
||||||
width:16px;
|
width:16px;
|
||||||
padding:2px 0;
|
padding:2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-options .notice_delete dt,
|
|
||||||
.notice-options .form_favor legend,
|
.notice-options .form_favor legend,
|
||||||
.notice-options .form_disfavor legend {
|
.notice-options .form_disfavor legend {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
.notice-options .notice_delete fieldset,
|
|
||||||
.notice-options .form_favor fieldset,
|
.notice-options .form_favor fieldset,
|
||||||
.notice-options .form_disfavor fieldset {
|
.notice-options .form_disfavor fieldset {
|
||||||
border:0;
|
border:0;
|
||||||
|
|
|
@ -227,7 +227,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
|
||||||
.notice-options form.form_disfavor input.submit {
|
.notice-options form.form_disfavor input.submit {
|
||||||
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
|
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
|
||||||
}
|
}
|
||||||
.notice-options .notice_delete a {
|
.notice-options .notice_delete {
|
||||||
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
|
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
|
||||||
.notice-options form.form_disfavor input.submit {
|
.notice-options form.form_disfavor input.submit {
|
||||||
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
|
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
|
||||||
}
|
}
|
||||||
.notice-options .notice_delete a {
|
.notice-options .notice_delete {
|
||||||
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
|
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user