'
. PHP_EOL;
} else {
if ($this->position == 'relative') {
$html = '
'
. PHP_EOL;
}
}
$html .= '
'.PHP_EOL;
foreach ($this->label as $name => $data) {
$style_lbl = 'position:absolute;'
. 'top:' . $data['top'] . 'px;'
. 'left:' . $data['left'] . 'px;'
. 'text-align:' . $data['align'] . ';';
if ($data['width'] > 0) {
$style_lbl .= 'width:' . $data['width'] . 'px;';
}
if ($data['height'] > 0) {
$style_lbl .= 'height:' . $data['height'] . 'px;';
}
$style_lbl .= 'color:' . $data['color'] .';'
. 'font-size:' . $data['font-size'] . 'px;'
. 'font-family:' . $data['font-family'] . ';'
. 'font-weight:' . $data['font-weight'] . ';';
if ($data['background-color'] != '') {
$style_lbl .= 'background-color:' . $data['background-color'] . ';';
}
switch($data['type']) {
case 'button':
$html .= '
'
. PHP_EOL;
break;
case 'step':
$html .= '
'
. $this->_step
. '
'
. PHP_EOL;
break;
case 'percent':
$html .= '
'
. $this->_computePercent() . '%'
. '
'
. PHP_EOL;
break;
case 'text':
case 'crossbar':
$html .= '
'
. $data['value']
. '
'
. PHP_EOL;
if ($data['type'] == 'crossbar') {
$js .= 'function setRotaryCross'; ;
$js .= $name.$this->_ident.'() {' . PHP_EOL;
$js .= ' cross = document.getElementById("plbl';
$js .= $name.$this->_ident.'").firstChild.nodeValue;'.PHP_EOL;
$js .= ' switch(cross) {'.PHP_EOL;
$js .= ' case "--": cross = "\\\\"; break;'.PHP_EOL;
$js .= ' case "\\\\": cross = "|"; break;'.PHP_EOL;
$js .= ' case "|": cross = "/"; break;'.PHP_EOL;
$js .= ' default: cross = "--"; break;'.PHP_EOL;
$js .= ' }'.PHP_EOL;
$js .= ' document.getElementById("plbl'.$name.$this->_ident;
$js .= '").firstChild.nodeValue = cross;'.PHP_EOL;
$js .= '}'.PHP_EOL;
}
break;
}
}
if (count($this->label) > 0) {
$js .= 'function setLabelText'.$this->_ident.'(name,text) {'.PHP_EOL;
$js .= ' name = "plbl" + name + "'.$this->_ident.'";'.PHP_EOL;
$js .= ' document.getElementById(name).firstChild.nodeValue=text;';
$js .= PHP_EOL;
$js .= '}'.PHP_EOL;
}
$js .= 'function setElementStyle'.$this->_ident.'(prefix,name,styles) {';
$js .= PHP_EOL;
$js .= ' name = prefix + name + "'.$this->_ident.'";'.PHP_EOL;
$js .= ' styles = styles.split(";");'.PHP_EOL;
$js .= ' styles.pop();'.PHP_EOL;
$js .= ' for(var i=0; i
frame['show']) {
$html .= ''.PHP_EOL;
}
if ($this->position == 'relative') {
$html .= '