FilterEditor: Fix css

This commit is contained in:
Johannes Meyer 2015-04-17 10:05:48 +02:00
parent 6d0870ad2e
commit b52b507134
2 changed files with 32 additions and 20 deletions

View File

@ -649,7 +649,7 @@ class FilterEditor extends AbstractWidget
public function renderSearch() public function renderSearch()
{ {
$html = ' <form method="post" class="inline dontprint" action="' $html = ' <form method="post" class="search inline dontprint" action="'
. $this->preservedUrl() . $this->preservedUrl()
. '"><input type="text" name="q" style="width: 8em" class="search" value="" placeholder="' . '"><input type="text" name="q" style="width: 8em" class="search" value="" placeholder="'
. t('Search...') . t('Search...')
@ -678,20 +678,22 @@ class FilterEditor extends AbstractWidget
public function render() public function render()
{ {
if (! $this->preservedUrl()->getParam('modifyFilter')) { if (! $this->preservedUrl()->getParam('modifyFilter')) {
return $this->renderSearch() . $this->shorten($this->filter, 50); return '<div class="filter">' . $this->renderSearch() . $this->shorten($this->filter, 50) . '</div>';
} }
return $this->renderSearch() return '<div class="filter">'
. $this->renderSearch()
. '<form action="' . '<form action="'
. Url::fromRequest() . Url::fromRequest()
. '" class="filterEditor" method="POST">' . '" class="editor" method="POST">'
. '<ul class="tree widgetFilter"><li>' . '<ul class="tree"><li>'
. $this->renderFilter($this->filter) . $this->renderFilter($this->filter)
. '</li></ul>' . '</li></ul>'
. '<div style="float: right">' . '<div class="buttons">'
. '<input type="submit" name="submit" value="Apply" />' . '<input type="submit" name="submit" value="Apply" />'
. '<input type="submit" name="cancel" value="Cancel" />' . '<input type="submit" name="cancel" value="Cancel" />'
. '</div>' . '</div>'
. '</form>'; . '</form>'
. '</div>';
} }
protected function shorten($string, $length) protected function shorten($string, $length)

View File

@ -48,8 +48,22 @@ table.multiselect tr[href] td {
-ms-user-select: none; -ms-user-select: none;
} }
#main form.filterEditor input[type=text], #main form.filterEditor select { #main div.filter {
margin-top: 1em;
form.editor {
input[type=text], select {
width: 12em; width: 12em;
}
ul.tree li.active {
background-color: #eee;
}
div.buttons {
float: right;
}
}
} }
ul.datafilter li { ul.datafilter li {
@ -281,10 +295,6 @@ li li .badge {
background-color: @colorUnknown; background-color: @colorUnknown;
} }
.widgetFilter li.active {
background-color: #eee;
}
.sparkline-box { .sparkline-box {
position: relative; position: relative;
top: -3px; top: -3px;