Populat notices and some css cleanup

This commit is contained in:
sarven 2009-01-22 21:03:59 +00:00
parent 0e69402394
commit 785ffd5b9b
4 changed files with 45 additions and 26 deletions

View File

@ -184,7 +184,7 @@ $(document).ready(function(){
$("#form_notice").ajaxForm(PostNotice);
$("#form_notice").each(addAjaxHidden);
$(".notice").hover(
$("#content .notice").hover(
function () {
$(this).addClass('hover');
},

View File

@ -54,13 +54,13 @@ class NoticeSection extends Section
$cnt = 0;
$this->out->elementStart('table', 'notices');
$this->out->elementStart('ul', 'notices');
while ($notices->fetch() && ++$cnt <= NOTICES_PER_SECTION) {
$this->showNotice($notices);
}
$this->out->elementEnd('table');
$this->out->elementEnd('ul');
return ($cnt > NOTICES_PER_SECTION);
}
@ -73,9 +73,15 @@ class NoticeSection extends Section
function showNotice($notice)
{
$profile = $notice->getProfile();
$this->out->elementStart('tr');
$this->out->elementStart('td');
$this->out->elementStart('li', 'hentry notice');
$this->out->elementStart('div', 'entry-title');
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
$this->out->elementStart('span', 'vcard author');
$this->out->elementStart('a', array('title' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname,
'href' => $profile->noticeurl,
'class' => 'url'));
$this->out->element('img', array('src' => (($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_MINI_SIZE)),
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
@ -83,25 +89,19 @@ class NoticeSection extends Section
'alt' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname));
$this->out->elementEnd('a');
$this->out->elementEnd('td');
$this->out->elementStart('td');
$this->out->elementStart('a', array('title' => ($profile->fullname) ?
$profile->fullname :
$profile->nickname,
'href' => $profile->noticeurl,
'rel' => 'contact member',
'class' => 'url'));
$this->out->element('span', 'fn nickname', $profile->nickname);
$this->out->elementEnd('td');
$this->out->elementStart('td');
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$this->out->elementStart('p', 'entry-content');
$this->out->raw($notice->rendered);
$this->out->elementEnd('td');
$this->out->elementEnd('p');
if ($notice->value) {
$this->out->elementStart('td');
$this->out->elementStart('p');
$this->out->text($notice->value);
$this->out->elementEnd('td');
$this->out->elementEnd('p');
}
$this->out->elementEnd('tr');
$this->out->elementEnd('div');
$this->out->elementEnd('li');
}
}

View File

@ -799,7 +799,7 @@ display:inline;
#laconicat .notice p.entry-content {
/*margin-left:199px;*/
}
.notice p.entry-content a:visited {
#content .notice p.entry-content a:visited {
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
@ -1061,7 +1061,6 @@ background-color:#fff;
text-align:left;
text-transform:uppercase;
}
#top_posters thead {
display:none;
}
@ -1071,15 +1070,30 @@ width:199px;
#top_poster_number-of-notices {
width:123px;
}
#top_posters tbody td {
.section tbody td {
padding-right:11px;
padding-bottom:4px;
padding-bottom:11px;
}
#top_posters img {
.section .vcard .photo {
margin-right:7px;
margin-bottom:0;
}
.section .notice {
padding-top:11px;
padding-bottom:11px;
}
.section .notice:first {
border-top:0;
}
/* tagcloud */
.tag-cloud {
list-style-type:none;

View File

@ -49,7 +49,12 @@ div.notice-options input,
color:#002E6E;
}
.notice p.entry-content a:visited {
.notice,
.profile {
border-top-color:#97BFD1;
}
#content .notice p.entry-content a:visited {
background-color:#fcfcfc;
}
.notice p.entry-content .vcard a {