New :: function Icon_Action::tips for short comment
New : Icon_Action::unlock
This commit is contained in:
parent
78155161c1
commit
ae1725f955
2 changed files with 27 additions and 3 deletions
|
|
@ -88,7 +88,21 @@ class Icon_Action
|
|||
|
||||
return $r;
|
||||
}
|
||||
/**
|
||||
* Display a info in a bubble, text is given as parameter
|
||||
* @param string $p_comment
|
||||
*
|
||||
* @return html string
|
||||
*/
|
||||
static function tips($p_comment)
|
||||
{
|
||||
$p_comment=htmlentities($p_comment);
|
||||
$r='<span tabindex="-1" class="icon" style="cursor:pointer;display:inline;text-decoration:none;" onmouseover="displayBulle(\''.$p_comment.'\')" onclick="displayBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">';
|
||||
$r.="";
|
||||
$r.='</span>';
|
||||
|
||||
return $r;
|
||||
}
|
||||
/**
|
||||
* Display a icon ON
|
||||
* @param string $p_div id of element
|
||||
|
|
@ -283,5 +297,14 @@ class Icon_Action
|
|||
*/
|
||||
static function unlock($p_id,$p_javascript)
|
||||
{
|
||||
|
||||
$lock_cur="";
|
||||
|
||||
$r=sprintf( '<span id="%s" is_locked="0" onclick="toggle_lock(\'%s\');%s" class="icon smallicon">%s</span>',
|
||||
$p_id,
|
||||
$p_id,
|
||||
$p_javascript,
|
||||
$lock_cur);
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,12 +68,13 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";
|
|||
<p>
|
||||
more <?php echo Icon_Action::more(uniqid(), "alert('test')");?>
|
||||
</p>
|
||||
<p>
|
||||
menu <?php echo Icon_Action::menu(uniqid(), "alert('test')");?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Lock <?php echo Icon_Action::lock(uniqid(), "alert('test')");?>
|
||||
</p>
|
||||
<p>
|
||||
Unlock <?php echo Icon_Action::unlock(uniqid(), "alert('test')");?>
|
||||
</p>
|
||||
<p>
|
||||
Tips <?php echo Icon_Action::tips("Allo ?")?>
|
||||
</p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue