43 $r.=sprintf(
'<span id="%s" class=" smallbutton icon" style="%s" onclick="%s"></span>',
44 $id, $p_style, $p_javascript);
57 $r.=sprintf(
'<input type="button" id="%s" class=" smallbutton icon" style="%s" onclick="%s" value="">',
58 $id, $p_style, $p_javascript);
71 $r=sprintf(
'<input class="smallbutton icon" onclick="%s" id="%s" type="button" %s value="">',
72 $p_javascript,
$id, $p_style);
85 $r=sprintf(
'<input class="smallbutton " onclick="%s" id="%s" value="X" %s type="button" style="">',
86 $p_javascript,
$id, $p_style
99 $r=
'<span tabindex="-1" class="icon" style="cursor:pointer;display:inline;text-decoration:none;" onmouseover="showBulle(\''.$p_comment.
'\')
" onclick="showBulle(\
''.$p_comment.
'\')
" onmouseout="hideBulle(0)
">';
111 static function tips($p_comment)
113 $p_comment=noalyss_str_replace("
'",' ',$p_comment);
114 $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)">
';
126 static function comment($p_comment)
128 $p_comment=noalyss_str_replace("'
",' ',$p_comment);
129 $js=sprintf("displayBulle(
'%s')
",$p_comment);
131 $r=sprintf('<span tabindex="-1
" class="icon
" style="cursor:pointer;
display:
inline;text-decoration:none;
" onmouseover="%s
" onclick="%s
" onmouseout="hideBulle(0)
">',
145 static function iconon($p_id, $p_javascript, $p_style="
")
147 $r=sprintf('<span style="color:green;cursor:pointer
" id="%s
" class="icon
" style="%s
" onclick="%s
"></span>',
148 $p_id, $p_style, $p_javascript);
159 static function iconoff($p_id, $p_javascript, $p_style="
")
161 $r=sprintf('<span style="color:red;cursor:pointer
" id="%s
" class="icon
" style="%s
" onclick="%s
"></span>',
162 $p_id, $p_style, $p_javascript);
170 static function close($p_div)
173 $r.=sprintf('<A class="icon text-danger
" onclick="removeDiv(\
'%s\')"></A>',
186 $drag=sprintf(
'<span id="pin_%s" style="" class="icon " onclick="pin(\'%s\')" >'.
UNPINDG.
'</span>',
197 static function zoom($p_div, $p_javascript)
199 $r=sprintf(
'<span id="span_%s" class="icon" onclick="%s">
200 </span>', $p_div, $p_javascript);
212 $r=sprintf(
'<span tabindex="-1" onmouseover="showBulle(\'%s\')" onclick="showBulle(\'%s\')" onmouseout="hideBulle(0)" style="color:red" class="icon"></span>',
213 $p_comment, $p_comment);
228 $r.=
'<span id="hide" style="" class="icon text-danger" onclick="'.$javascript.
'">'.
$action.
'</span>';
241 $r.=
'<span id="'.$p_id.
'" class="icon" onclick="'.$javascript.
'">'.
"".
'</span>';
251 $r.=
'<span id="'.$p_id.
'" class="icon" onclick="'.$javascript.
'"></span>';
263 $r=
'<span id="'.$p_id.
'" onclick="'.$p_javascript.
'" class="smallicon icon"></span>';
274 $r=
'<span id="'.$p_id.
'" onclick="'.$p_javascript.
'" class="smallicon icon" style="margin-left:5px"></span>';
286 $r=
'<span id="'.$p_id.
'" onclick="'.$p_javascript.
'" class="smallicon icon" style="background-color:lightgrey; border:1px solid blue;padding:2px;margin:0px 1px 0px 1px" ></span>';
298 $r=
'<span id="'.$p_id.
'" onclick="'.$p_javascript.
'" style="background-color:lightgrey; border:1px solid blue;padding:2px;margin:0px 1px 0px 1px" class="smallicon icon" ></span>';
304 $r=sprintf(
'<span id="%s" onclick="%s" class="smallicon icon" style="margin-left:5px"></span>',
314 <span id="%s" class="smallicon icon" style="margin-left:5px"></span></A>',
322 $r=sprintf(
'<span id="%s" onclick="%s" class="smallicon icon" style="margin-left:5px"></span>',
329 $r=sprintf(
'<span id="%s" onclick="%s" class="smallicon icon" style="margin-left:5px"></span>',
343 $r=sprintf(
'<input type="button" id="%s" onclick="%s" class="smallbutton icon" value="" style="font-weigth:bolder">',
356 $lock_cur=
"";
357 $lock_next=
"";
359 $r=sprintf(
'<span id="%s" is_locked="1" onclick="toggle_lock(\'%s\');%s" class="icon smallicon">%s</span>',
375 $lock_cur=
"";
377 $r=sprintf(
'<span id="%s" is_locked="0" onclick="toggle_lock(\'%s\');%s" class="icon smallicon">%s</span>',
393 $lock_cur=
"";
395 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallicon">%s</span>',
412 if ( $p_value == 1 ) { return \Icon_Action::iconon(
$p_id, $p_javascript,$p_style);}
413 if ( $p_value == 0 ) { return \Icon_Action::iconoff(
$p_id, $p_javascript,$p_style);}
417 $lock_cur=
"";
418 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallicon %s" >%s</span>',
428 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallicon %s" >%s</span>',
435 static function checkbox (
$p_id,$p_javascript=
"",$p_value=0,$p_classrange=
"") {
436 if ( $p_value == 0 ) { return \Icon_Action::checked(
$p_id, $p_javascript,$p_classrange); }
437 if ( $p_value == 1 ) { return \Icon_Action::unchecked(
$p_id, $p_javascript,$p_classrange);}
440 $js=sprintf(
"full_size('%s')",$p_div);
442 $r=sprintf(
'<span id="size_%s" onclick="%s" class="icon smallicon">%s</span>',
447 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallicon">%s</span>',
448 uniqid(),$p_js,
"");
452 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallbutton">%s</span>',
453 uniqid(),$p_js,
"");
457 $r=sprintf(
'<span id="%s" onclick="%s" class="icon smallicon">%s</span>',
458 uniqid(),$p_js,
"");
468 static function longer($p_domid,$p_size) {
469 $r=sprintf(
'<span id="%s_longer" '.
470 ' onclick="enlarge_text(\'%s\',\'%s\') "'.
471 ' class="icon smallicon">%s</span>',
472 $p_domid,$p_domid,$p_size,
"");
482 $r=
'<span id="'.uniqid().
'" class="smallicon icon" style="background-color:yellow" onclick="document.getElementById(\''.$p_domid.
'\').show()
"></span>';
492 static function toggle_hide($p_id,$p_id_to_hide)
494 $javascript=sprintf("toggleHideShow(
'%s',
'%s',
true)
",$p_id_to_hide,$p_id);
495 $r=sprintf('<i id="%s
" onclick="%s
" class="smallicon icon icon-down-open-2
" style="margin-
left:5px
"></i>',
span($p_string, $p_extra='')
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
Utility , library of icon with javascript.
static slider($p_id, $p_javascript)
Display the icon of a slider.
static unlock($p_id, $p_javascript)
Display the icon of a trashbin.
static menu_click($p_id, $p_javascript)
When a mouse is over this or if you click on it , it will trigger the javascript.
static warnbulle($p_comment)
Display a warning in a bubble, text is in message_javascript.
static modify($p_id, $p_javascript)
Display the icon to modify a idem.
static clean_zone($id, $p_javascript, $p_style="")
static more($p_id, $p_javascript)
static draggable($p_div)
Display a icon for fix or move a div.
static hide_icon( $p_id, $javascript)
Return a html string with an anchor to hide a div, put it in the right corner.
static checked($p_id, $p_javascript="", $p_classrange="")
static less($p_id, $p_javascript)
static icon_magnifier($id, $p_javascript, $p_style="")
Display a icon with a magnify glass.
static icon_onoff($p_id, $p_javascript, $p_style, $p_value)
Display a icon ON is $p_value == 1 otherwise OFF.
static zoom($p_div, $p_javascript)
Display a icon for zooming.
static hide($action, $javascript)
Return a html string with an anchor to hide a div, put it in the right corner.
static icon_add($id, $p_javascript, $p_style="")
static longer($p_domid, $p_size)
Increase size of input_text (p_domid) with p_domid.
static show_icon($p_id, $javascript)
Return a html string with an eye.
static detail_anchor($p_id, $url)
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
static detail($p_id, $p_javascript)
static show_note($p_domid)
Increase size of input_text (p_domid) with p_domid.
static checkbox($p_id, $p_javascript="", $p_value=0, $p_classrange="")
static validate($p_id, $p_javascript)
Display the icon to modify a idem.
static unchecked($p_id, $p_javascript="", $p_classrange="")
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
static lock($p_id, $p_javascript)
Display the icon of a padlock to lock or unlock element.
static cancel($p_id, $p_javascript)
Display the icon to modify a idem.
static button_magnifier($id, $p_javascript, $p_style="")
Display a icon with a magnify glass.