mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Add listRefresh() method, add table row colors
This commit is contained in:
parent
3fa68a142e
commit
728de3ba18
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user