/**
* @file
* @brief Utility , library of icon with javascript
*/
/**
* @brief Utility , library of icon with javascript
*/
class Icon_Action
{
/**
* Display a icon with a magnify glass
* @param string $id id of element
* @param string $p_javascript
* @param string $p_style optionnal HTML code
* @return type
*/
static function icon_magnifier($id, $p_javascript, $p_style="")
{
$r="";
$r.=sprintf('',
$id, $p_style, $p_javascript);
return $r;
}
/**
*
* @param type $id
* @param type $p_javascript
* @param type $p_style
* @return type
*/
static function icon_add($id, $p_javascript, $p_style="")
{
$r=sprintf('',
$p_javascript, $id, $p_style);
return $r;
}
/**
*
* @param string $id
* @param string $p_javascript
* @param string opt $p_style
* @return html string
*/
static function clean_zone($id, $p_javascript, $p_style="")
{
$r=sprintf('',
$p_javascript, $id, $p_style
);
return $r;
}
/**
* Display a info in a bubble, text is in message_javascript
* @param integer $p_comment
* @see message_javascript.php
* @return html string
*/
static function infobulle($p_comment)
{
$r='';
$r.="";
$r.='';
return $r;
}
/**
* Display a icon ON
* @param string $p_div id of element
* @param string $p_javascript
* @param string $p_style optionnal HTML code
* @return html string
*/
static function iconon($p_id, $p_javascript, $p_style="")
{
$r=sprintf('',
$p_id, $p_style, $p_javascript);
return $r;
}
/**
* Display a icon OFF
* @param string $p_div id of element
* @param string $p_javascript
* @param string $p_style optionnal HTML code
* @return html string
*/
static function iconoff($p_id, $p_javascript, $p_style="")
{
$r=sprintf('',
$p_id, $p_style, $p_javascript);
return $r;
}
/**
* Return a html string with an anchor which close the inside popup. (top-right corner)
* @param name of the DIV to close
*/
static function close($p_div)
{
$r='';
$r.=sprintf('⨉',
$p_div);
return $r;
}
/**
* Display a icon for fix or move a div
* @param string $p_div id of the div to fix/move
* @param string $p_javascript
* @return html string
*/
static function draggable($p_div)
{
$drag=sprintf(''.UNPINDG.'',
$p_div, $p_div);
return $drag;
}
/**
* Display a icon for zooming
* @param string $p_div id of the div to zoom
* @param string $p_javascript
* @return html string
*/
static function zoom($p_div, $p_javascript)
{
$r=sprintf('
', $p_div, $p_javascript);
return $r;
}
/**
* Display a warning in a bubble, text is in message_javascript
* @param integer $p_comment
* @see message_javascript.php
* @return html string
*/
static function warnbulle($p_comment)
{
$r=sprintf('',
$p_comment, $p_comment);
return $r;
}
/**
* Return a html string with an anchor to hide a div, put it in the right corner
* @param $action action action to perform (message)
* @param $javascript javascript
* @note not protected against html
* @see Acc_Ledger::display_search_form
*/
static function hide($action, $javascript)
{
$r='';
$r.=''.$action.'';
return $r;
}
/**
* Display the icon of a trashbin
* @param string $p_id DOMid
* @param string $p_javascript
* @return htmlString
*/
static function trash($p_id,$p_javascript)
{
$r='';
return $r;
}
}