\n";
for ($i = 0; $i < sizeof($this->cells); $i++) {
// check if alignment option was given
$align = $this->cells[$i]->getAlignmentString();
@@ -342,15 +348,6 @@ class htmlTableRow extends htmlElement {
return $types;
}
- /**
- * Sets the CSS classes for the table.
- *
- * @param String $CSSClasses CSS class names (e.g. "userlist smallPadding")
- */
- public function setCSSClasses($CSSClasses) {
- $this->CSSClasses = 'class="' . htmlspecialchars($CSSClasses) . '"';
- }
-
}
/**
@@ -437,7 +434,10 @@ class htmlInputField extends htmlElement {
// print input field
$class = '';
if (sizeof($validators) > 0) {
- $class = ' class="validate[' . implode(',', $validators) . ']"';
+ $class = ' class="validate[' . implode(',', $validators) . '] ' . implode(' ', $this->cssClasses) . '"';
+ }
+ elseif (sizeof($this->cssClasses) > 0) {
+ $class = ' class="' . implode(' ', $this->cssClasses) . '"';
}
$name = ' name="' . $this->fieldName . '"';
$id = ' id="' . $this->fieldName . '"';
@@ -449,7 +449,10 @@ class htmlInputField extends htmlElement {
if ($this->fieldMaxLength != null) {
$maxLength = ' maxlength="' . $this->fieldMaxLength . '"';
}
- $size = ' size="' . $this->fieldSize . '"';
+ $size = '';
+ if ($this->fieldSize != null) {
+ $size = ' size="' . $this->fieldSize . '"';
+ }
$fieldTabIndex = ' tabindex="' . $tabindex . '"';
$tabindex++;
$inputType = 'text';
@@ -2315,8 +2318,6 @@ class htmlLink extends htmlElement {
private $onClick = null;
/** show as button */
private $showAsButton = false;
- /** CSS classes */
- private $cssClasses = array();
/**
* Constructor.
@@ -2408,15 +2409,6 @@ class htmlLink extends htmlElement {
$this->onClick = htmlspecialchars($event);
}
- /**
- * Adds CSS classes to this link.
- *
- * @param array $classes CSS class names
- */
- public function setCSSClasses($classes) {
- $this->cssClasses = $classes;
- }
-
}
/**
@@ -2498,8 +2490,6 @@ class htmlDiv extends htmlElement {
private $id = null;
/** htmlElement that generates inner content */
private $content = null;
- /** CSS classes */
- private $classes = array();
/**
* Constructor.
@@ -2508,10 +2498,9 @@ class htmlDiv extends htmlElement {
* @param htmlElement $content inner content
* @param array $classes CSS classes
*/
- function __construct($id, $content, $classes = array()) {
+ function __construct($id, $content) {
$this->id = htmlspecialchars($id);
$this->content = $content;
- $this->classes = $classes;
}
/**
@@ -2532,12 +2521,8 @@ class htmlDiv extends htmlElement {
$idValue = ' id="' . $this->id . '"';
}
$classesValue = '';
- if (($this->classes != null) && (sizeof($this->classes) > 0)) {
- $classesValue = ' class="';
- for ($i = 0; $i < sizeof($this->classes); $i++) {
- $classesValue .= htmlspecialchars($this->classes[$i]) . ' ';
- }
- $classesValue .= '"';
+ if (($this->cssClasses != null) && (sizeof($this->cssClasses) > 0)) {
+ $classesValue = ' class="' . implode(' ', $this->cssClasses) . '"';
}
echo '';
if ($this->content != null) {
diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css
index 93fbb097..c9a3c1d0 100644
--- a/lam/style/500_layout.css
+++ b/lam/style/500_layout.css
@@ -217,6 +217,10 @@ div.ui-progressbar-value {
background-image: url(images/pbar-ani.gif);
}
+.fullwidth {
+ width: 100%;
+}
+
/**
* table style for delete.php
*
diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php
index 6fdd68c8..fb0a0305 100644
--- a/lam/templates/masscreate.php
+++ b/lam/templates/masscreate.php
@@ -194,7 +194,8 @@ for ($i = 0; $i < sizeof($types); $i++) {
}
$innerTable->addElement(new htmlSpacer('10px', null));
}
- $typeDiv = new htmlDiv($types[$i], $innerTable, $divClasses);
+ $typeDiv = new htmlDiv($types[$i], $innerTable);
+ $typeDiv->setCSSClasses($divClasses);
$moduleGroup->addElement($typeDiv);
}
$table->addElement($moduleGroup, true);
@@ -273,7 +274,7 @@ function showMainPage($scope, $selectedModules) {
$columnSpacer = new htmlSpacer('10px', null);
$container->addElement(new htmlTitle(_("Columns")), true);
$columnContainer = new htmlTable();
- $columnContainer->setCSSClasses($scope . 'list');
+ $columnContainer->setCSSClasses(array($scope . 'list'));
// DN options
$dnTitle = new htmlSubTitle(_("DN settings"), '../graphics/logo32.png');
$dnTitle->colspan = 20;
@@ -315,7 +316,7 @@ function showMainPage($scope, $selectedModules) {
$dnSuffixRowCells[] = new htmlOutputText('');
$dnSuffixRowCells[] = new htmlSpacer(null, '25px');
$dnSuffixRow = new htmlTableRow($dnSuffixRowCells);
- $dnSuffixRow->setCSSClasses($scope . 'list-dark');
+ $dnSuffixRow->setCSSClasses(array($scope . 'list-dark'));
$columnContainer->addElement($dnSuffixRow);
$dnRDNRowCells = array();
$dnRDNRowCells[] = $columnSpacer;
@@ -335,7 +336,7 @@ function showMainPage($scope, $selectedModules) {
$dnRDNRowCells[] = new htmlOutputText(implode(", ", $rdnAttributes));
$dnRDNRowCells[] = new htmlSpacer(null, '25px');
$dnRDNRow = new htmlTableRow($dnRDNRowCells);
- $dnRDNRow->setCSSClasses($scope . 'list-bright');
+ $dnRDNRow->setCSSClasses(array($scope . 'list-bright'));
$columnContainer->addElement($dnRDNRow);
// module options
for ($m = 0; $m < sizeof($modules); $m++) {
@@ -414,10 +415,10 @@ function showMainPage($scope, $selectedModules) {
$rowCells[] = new htmlSpacer(null, '25px');
$row = new htmlTableRow($rowCells);
if ($odd) {
- $row->setCSSClasses($scope . 'list-dark');
+ $row->setCSSClasses(array($scope . 'list-dark'));
}
else {
- $row->setCSSClasses($scope . 'list-bright');
+ $row->setCSSClasses(array($scope . 'list-bright'));
}
$odd = !$odd;
$columnContainer->addElement($row);