Add listRefresh() method, add table row colors

This commit is contained in:
Sam Georges 2014-05-28 21:34:54 +10:00
parent 3fa68a142e
commit 728de3ba18
3 changed files with 101 additions and 0 deletions

View File

@ -7972,6 +7972,54 @@ table.table.data tbody tr:not(.no-data):hover td a,
table.table.data tbody tr:not(.no-data):hover td span {
color: white;
}
table.table.data tbody tr.error td,
table.table.data tbody tr.error th,
table.table.data tbody tr.error td a,
table.table.data tbody tr.error th a {
color: #b2341c;
}
table.table.data tbody tr.processing td,
table.table.data tbody tr.processing th,
table.table.data tbody tr.processing td a,
table.table.data tbody tr.processing th a {
color: #666666;
}
table.table.data tbody tr.success td,
table.table.data tbody tr.success th,
table.table.data tbody tr.success td a,
table.table.data tbody tr.success th a {
color: #278731;
}
table.table.data tbody tr.disabled td,
table.table.data tbody tr.deleted td,
table.table.data tbody tr.disabled th,
table.table.data tbody tr.deleted th,
table.table.data tbody tr.disabled td a,
table.table.data tbody tr.deleted td a,
table.table.data tbody tr.disabled th a,
table.table.data tbody tr.deleted th a {
color: #888888;
}
table.table.data tbody tr.new td,
table.table.data tbody tr.important td,
table.table.data tbody tr.new th,
table.table.data tbody tr.important th,
table.table.data tbody tr.new td a,
table.table.data tbody tr.important td a,
table.table.data tbody tr.new th a,
table.table.data tbody tr.important th a {
font-weight: bold;
}
table.table.data tbody tr.safe td,
table.table.data tbody tr.special td,
table.table.data tbody tr.safe th,
table.table.data tbody tr.special th,
table.table.data tbody tr.safe td a,
table.table.data tbody tr.special td a,
table.table.data tbody tr.safe th a,
table.table.data tbody tr.special th a {
font-style: italic;
}
table.table.data tfoot a {
color: #666666;
text-decoration: none;

View File

@ -205,6 +205,42 @@ table.table.data {
color: white;
}
}
tr.error {
td, th, td a, th a {
color: #b2341c;
}
}
tr.processing {
td, th, td a, th a {
color: #666666;
}
}
tr.success {
td, th, td a, th a {
color: #278731;
}
}
tr.disabled, tr.deleted {
td, th, td a, th a {
color: #888888;
}
}
tr.new, tr.important {
td, th, td a, th a {
font-weight: bold;
}
}
tr.safe, tr.special {
td, th, td a, th a {
font-style: italic;
}
}
}
tfoot {

View File

@ -190,6 +190,7 @@ class ListController extends ControllerBehavior
/**
* Renders the widget collection.
* @param string $definition Optional list definition.
* @return string Rendered HTML for the list.
*/
public function listRender($definition = null)
@ -210,6 +211,22 @@ class ListController extends ControllerBehavior
return implode(PHP_EOL, $collection);
}
/**
* Refreshes the list container only, useful for returning in custom AJAX requests.
* @param string $definition Optional list definition.
* @return array The list element selector as the key, and the list contents are the value.
*/
public function listRefresh($definition = null)
{
if (!count($this->listWidgets))
$this->makeLists();
if (!$definition || !isset($this->listDefinitions[$definition]))
$definition = $this->primaryDefinition;
return $this->listWidgets[$definition]->onRender();
}
//
// Overrides
//