forked from GNUsocial/gnu-social
CSS can handle alternating row colouring now
This commit is contained in:
parent
65f1f74f2b
commit
9b8ac2d404
@ -41,10 +41,6 @@ table.profile_list tr {
|
|||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.profile_list tr.alt {
|
|
||||||
background-color: #def; /* zebra stripe */
|
|
||||||
}
|
|
||||||
|
|
||||||
table.profie_list td {
|
table.profie_list td {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET')) {
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once INSTALLDIR . '/lib/subscriptionlist.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Widget to show a sortable list of subscriptions
|
* Widget to show a sortable list of subscriptions
|
||||||
@ -128,32 +124,9 @@ class SortableSubscriptionList extends SubscriptionList
|
|||||||
$this->out->elementEnd('table');
|
$this->out->elementEnd('table');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showProfiles()
|
function newListItem($profile)
|
||||||
{
|
{
|
||||||
// Note: we don't use fetchAll() because it's borked with query()
|
return new SortableSubscriptionListItem($profile, $this->owner, $this->action);
|
||||||
|
|
||||||
$profiles = array();
|
|
||||||
|
|
||||||
while ($this->profile->fetch()) {
|
|
||||||
$profiles[] = clone($this->profile);
|
|
||||||
}
|
|
||||||
|
|
||||||
$cnt = count($profiles);
|
|
||||||
|
|
||||||
$max = min($cnt, $this->maxProfiles());
|
|
||||||
|
|
||||||
for ($i = 0; $i < $max; $i++) {
|
|
||||||
$odd = ($i % 2 == 0); // for zebra striping
|
|
||||||
$pli = $this->newListItem($profiles[$i], $odd);
|
|
||||||
$pli->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $cnt;
|
|
||||||
}
|
|
||||||
|
|
||||||
function newListItem($profile, $odd)
|
|
||||||
{
|
|
||||||
return new SortableSubscriptionListItem($profile, $this->owner, $this->action, $odd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,11 +135,10 @@ class SortableSubscriptionListItem extends SubscriptionListItem
|
|||||||
/** Owner of this list */
|
/** Owner of this list */
|
||||||
var $owner = null;
|
var $owner = null;
|
||||||
|
|
||||||
function __construct($profile, $owner, $action, $alt)
|
function __construct($profile, $owner, $action)
|
||||||
{
|
{
|
||||||
parent::__construct($profile, $owner, $action);
|
parent::__construct($profile, $owner, $action);
|
||||||
|
|
||||||
$this->alt = $alt; // is this row alternate?
|
|
||||||
$this->owner = $owner;
|
$this->owner = $owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,10 +149,6 @@ class SortableSubscriptionListItem extends SubscriptionListItem
|
|||||||
'id' => 'profile-' . $this->profile->id
|
'id' => 'profile-' . $this->profile->id
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->alt) {
|
|
||||||
$attr['class'] .= ' alt';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->out->elementStart('tr', $attr);
|
$this->out->elementStart('tr', $attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1622,6 +1622,11 @@ ul.profile_list li {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.profile_list tbody tr:nth-child(2n+1) {
|
||||||
|
background-color: #fafafa !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.entity_profile .entity_nickname,
|
.entity_profile .entity_nickname,
|
||||||
.entity_profile .entity_fn {
|
.entity_profile .entity_fn {
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
|
@ -1141,11 +1141,6 @@ table.profile_list {
|
|||||||
background: url(../images/bluearrow_up.png) no-repeat top right;
|
background: url(../images/bluearrow_up.png) no-repeat top right;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.profile_list tr.alt {
|
|
||||||
background-color: #fafafa !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.entity_profile {
|
td.entity_profile {
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 250px;
|
min-width: 250px;
|
||||||
|
@ -938,11 +938,6 @@ table.profile_list {
|
|||||||
background: url(../images/bluearrow_up.png) no-repeat top right;
|
background: url(../images/bluearrow_up.png) no-repeat top right;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.profile_list tr.alt {
|
|
||||||
background-color: #fafafa !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.entity_profile {
|
td.entity_profile {
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 250px;
|
min-width: 250px;
|
||||||
|
Loading…
Reference in New Issue
Block a user