CODE STYLE class.toolBar.php
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.toolBar.php
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
@@ -26,6 +28,7 @@
|
||||
|
||||
/**
|
||||
* ToolBar - ToolBar class
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*/
|
||||
class ToolBar extends form
|
||||
@@ -36,6 +39,7 @@ class ToolBar extends form
|
||||
|
||||
/**
|
||||
* XmlForm_Field_ToolBar - XmlForm_Field_ToolBar class
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*/
|
||||
class XmlForm_Field_ToolBar extends XmlForm_Field
|
||||
@@ -48,6 +52,7 @@ class XmlForm_Field_ToolBar extends XmlForm_Field
|
||||
|
||||
/**
|
||||
* Constructor of the class XmlForm_Field_ToolBar
|
||||
*
|
||||
* @param string $xmlNode
|
||||
* @param string $lang
|
||||
* @param string $home
|
||||
@@ -62,6 +67,7 @@ class XmlForm_Field_ToolBar extends XmlForm_Field
|
||||
|
||||
/**
|
||||
* Prints the ToolBar
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
@@ -79,6 +85,7 @@ class XmlForm_Field_ToolBar extends XmlForm_Field
|
||||
|
||||
/**
|
||||
* XmlForm_Field_toolButton - XmlForm_Field_toolButton class
|
||||
*
|
||||
* @package workflow.engine.ProcessMaker
|
||||
*/
|
||||
class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
@@ -103,6 +110,7 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
|
||||
/**
|
||||
* Prints the components of the toolBar
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
@@ -126,37 +134,26 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
case 'image':
|
||||
$html = '';
|
||||
if ($this->hoverMethod === 'back') {
|
||||
$html='<img src="'.htmlentities( $url, ENT_QUOTES, 'utf-8').'"'.
|
||||
(($this->style)?' style="'.$this->style.'"':'').' onmouseover=\'backImage(this,"url('.htmlentities( $urlAlt, ENT_QUOTES, 'utf-8').') no-repeat")\' onmouseout=\'backImage(this,"")\' title=\'' . addslashes($this->label) . '\' />';
|
||||
}
|
||||
elseif($this->hoverMethod==='switch'){
|
||||
$html='<img src="'.htmlentities( $url, ENT_QUOTES, 'utf-8').'"'.
|
||||
(($this->style)?' style="'.$this->style.'"':'').' onmouseover=\'switchImage(this,"'.htmlentities( $url, ENT_QUOTES, 'utf-8').'","'.htmlentities( $urlAlt, ENT_QUOTES, 'utf-8').'")\' onmouseout=\'switchImage(this,"'.htmlentities( $url, ENT_QUOTES, 'utf-8').'","'.htmlentities( $urlAlt, ENT_QUOTES, 'utf-8').'")\'/>';
|
||||
}
|
||||
else {
|
||||
$html='<img src="'.htmlentities( $url, ENT_QUOTES, 'utf-8').'"'.
|
||||
(($this->style)?' style="'.$this->style.'"':'').'/>';
|
||||
$html = '<img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . ' onmouseover=\'backImage(this,"url(' . htmlentities( $urlAlt, ENT_QUOTES, 'utf-8' ) . ') no-repeat")\' onmouseout=\'backImage(this,"")\' title=\'' . addslashes( $this->label ) . '\' />';
|
||||
} elseif ($this->hoverMethod === 'switch') {
|
||||
$html = '<img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . ' onmouseover=\'switchImage(this,"' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '","' . htmlentities( $urlAlt, ENT_QUOTES, 'utf-8' ) . '")\' onmouseout=\'switchImage(this,"' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '","' . htmlentities( $urlAlt, ENT_QUOTES, 'utf-8' ) . '")\'/>';
|
||||
} else {
|
||||
$html = '<img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . '/>';
|
||||
}
|
||||
break;
|
||||
case 'text':
|
||||
$html = $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' );
|
||||
break;
|
||||
case 'html':
|
||||
$html='<div '.
|
||||
' onmouseover=\'backImage(this,"url('.htmlentities( $urlAlt, ENT_QUOTES, 'utf-8').') no-repeat")\' onmouseout=\'backImage(this,"")\' style="width:25px;height:25px;margin-bottom:3px">'.
|
||||
$this->label.'</div>';
|
||||
$html = '<div ' . ' onmouseover=\'backImage(this,"url(' . htmlentities( $urlAlt, ENT_QUOTES, 'utf-8' ) . ') no-repeat")\' onmouseout=\'backImage(this,"")\' style="width:25px;height:25px;margin-bottom:3px">' . $this->label . '</div>';
|
||||
|
||||
//$html=$this->label;
|
||||
break;
|
||||
case 'image/text':
|
||||
$html='<img src="'.htmlentities( $url, ENT_QUOTES, 'utf-8').'"'.
|
||||
(($this->style)?' style="'.$this->style.'"':'').'/><br/>'.
|
||||
$this->htmlentities($this->label, ENT_QUOTES,'utf-8');
|
||||
$html = '<img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . '/><br/>' . $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' );
|
||||
break;
|
||||
case 'text/image':
|
||||
$html=$this->htmlentities($this->label, ENT_QUOTES,'utf-8').
|
||||
'<br/><img src="'.htmlentities( $url, ENT_QUOTES, 'utf-8').'"'.
|
||||
(($this->style)?' style="'.$this->style.'"':'').'/>';
|
||||
$html = $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' ) . '<br/><img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . '/>';
|
||||
break;
|
||||
case 'class':
|
||||
$html = '<a href="#" onclick="' . $this->onclick . '" onmouseover="backImage(this, \'url(/images/dynamicForm/hover.gif) no-repeat\')" onmouseout="backImage(this, \'\')" style="width:25px;height:25px;margin-bottom:3px">
|
||||
@@ -165,10 +162,7 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
return $html;
|
||||
|
||||
}
|
||||
return '<a class="toolButton" '.
|
||||
(($this->buttonStyle)?' style="'.$this->buttonStyle.'"':'').
|
||||
(($this->onclick)?' onclick="'. htmlentities($this->onclick, ENT_QUOTES,'utf-8').'"':'').
|
||||
'>'.$html.'</a>';
|
||||
return '<a class="toolButton" ' . (($this->buttonStyle) ? ' style="' . $this->buttonStyle . '"' : '') . (($this->onclick) ? ' onclick="' . htmlentities( $this->onclick, ENT_QUOTES, 'utf-8' ) . '"' : '') . '>' . $html . '</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user