CSS class support for responsive row and width selection for responsive
table
This commit is contained in:
parent
ecdd731b3a
commit
e949577727
|
@ -3647,7 +3647,8 @@ class htmlResponsiveRow extends htmlElement {
|
||||||
*/
|
*/
|
||||||
public function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
|
public function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
|
||||||
$return = array();
|
$return = array();
|
||||||
echo '<div class="row">';
|
$cssClasses = implode(' ', $this->cssClasses);
|
||||||
|
echo '<div class="row ' . $cssClasses . '">';
|
||||||
foreach ($this->cells as $cell) {
|
foreach ($this->cells as $cell) {
|
||||||
$return = array_merge($return, $cell->generateHTML($module, $input, $values, $restricted, $tabindex, $scope));
|
$return = array_merge($return, $cell->generateHTML($module, $input, $values, $restricted, $tabindex, $scope));
|
||||||
}
|
}
|
||||||
|
@ -4109,6 +4110,9 @@ class htmlResponsiveTable extends htmlElement {
|
||||||
/** htmlElement[][] data rows */
|
/** htmlElement[][] data rows */
|
||||||
private $data;
|
private $data;
|
||||||
|
|
||||||
|
/** widthes of the columns */
|
||||||
|
private $widths = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the table.
|
* Creates the table.
|
||||||
*
|
*
|
||||||
|
@ -4129,8 +4133,14 @@ class htmlResponsiveTable extends htmlElement {
|
||||||
echo '<table class="responsive-table">';
|
echo '<table class="responsive-table">';
|
||||||
echo '<thead>';
|
echo '<thead>';
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
|
$counter = 0;
|
||||||
foreach ($this->titles as $title) {
|
foreach ($this->titles as $title) {
|
||||||
echo '<th>' . htmlspecialchars($title) . '</th>';
|
$width = '';
|
||||||
|
if (isset($this->widths[$counter])) {
|
||||||
|
$width = 'width="' . $this->widths[$counter] . '"';
|
||||||
|
}
|
||||||
|
echo '<th ' . $width . '>' . htmlspecialchars($title) . '</th>';
|
||||||
|
$counter++;
|
||||||
}
|
}
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo '</thead>';
|
echo '</thead>';
|
||||||
|
@ -4151,7 +4161,9 @@ class htmlResponsiveTable extends htmlElement {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setWidths($widths) {
|
||||||
|
$this->widths = $widths;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -389,6 +389,11 @@ div.ui-progressbar-value {
|
||||||
background-image: url(images/pbar-ani.gif);
|
background-image: url(images/pbar-ani.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.jobList {
|
||||||
|
overflow: scroll;
|
||||||
|
max-height: 50rem;
|
||||||
|
}
|
||||||
|
|
||||||
.fullwidth {
|
.fullwidth {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,10 @@ table.padding5 td {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.maxrow {
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
table.responsive-table {
|
table.responsive-table {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
|
@ -74,6 +78,7 @@ table.responsive-table th {
|
||||||
|
|
||||||
table.responsive-table td {
|
table.responsive-table td {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mobile */
|
/* mobile */
|
||||||
|
|
Loading…
Reference in New Issue