Widgets
Modules |
| toolbar |
| statusbar |
| listview |
| treeview |
| helpers functions |
Functions |
| uty_icon ($src, $onclick="", $tip="", $style="", $class="utyicon") |
| uty_imgsubmit ($id, $src, $onclick, $disabled=FALSE, $tip="", $style="", $class="utyimgsubmit") |
| uty_button ($id, $type='button', $text="", $icon="", $imgalign='left', $onclick="", $disabled=false, $tip="", $style="", $class="utybutton") |
| uty_imgbutton ($id, $src, $onclick, $disabled=false, $tip="", $style="", $class="utyimgbutton") |
| uty_msgbox ($level, $title, $message) |
| uty_msgstrip ($level, $message) |
Variables |
| $_UTY_LISTVIEW = NULL |
| $_UTY_TREEVIEW = "" |
Detailed Description
Simple widgets are rendered by a single function (e.g.:uty_button). More complex widget may require more *_start; *_close calls.
- Note:
- all html attributes values are rendered enclosed in double quotes;
- javascript expression (used for events) are also enclosed in double quotes, so you should use single quotes if necessary, e.g.:
uty_icon("icon1", "do_somethig('some value');");
- See also:
- Javascript Widgets (utywidgets.js)
Function Documentation
uty_button |
( |
$ |
id, |
|
|
$ |
type = 'button' , |
|
|
$ |
text = "" , |
|
|
$ |
icon = "" , |
|
|
$ |
imgalign = 'left' , |
|
|
$ |
onclick = "" , |
|
|
$ |
disabled = false , |
|
|
$ |
tip = "" , |
|
|
$ |
style = "" , |
|
|
$ |
class = "utybutton" | |
|
) |
| | |
html button with an inner table to align text and img (javascript object: utyButton). Outputs a button containing a text and an img
- Parameters:
-
| id | (string) button element id,name and javascript variable |
| [type] | (string) button type attribute: 'button'|'submit'|'reset', default='button' |
| [text] | (string) text element inner html, default="" |
| [icon] | (string) img element src attribute, default="" (don't output img element) |
| [imgalign] | (string) where the image is positioned respect to text: 'left'|'right'|'top'|'bottom', default='left' |
| [onclick] | (string) button onclick attribute: javascript expression |
| [disabled] | (bool) if TRUE outputs button disabled attribute, default=FALSE |
| [tip] | (string) button title attribute, default="" |
| [style] | (string) button style, default="" |
| [class] | (string) button class attribute, default="utybutton" |
uty_icon |
( |
$ |
src, |
|
|
$ |
onclick = "" , |
|
|
$ |
tip = "" , |
|
|
$ |
style = "" , |
|
|
$ |
class = "utyicon" | |
|
) |
| | |
html img (no javascript widget associated)
- Parameters:
-
| src | (string) img src attribute |
| [onclick] | (string) img onclick attribute, default="" |
| [tip] | (string) img title attribute: javascript expression, default="" |
| [style] | (string) img style attribute, default="" |
| [class] | (string) img class attribute, default="utyicom" |
- Note:
- If the onclick attribute is set, the $class."_clickable" css class is used
uty_imgbutton |
( |
$ |
id, |
|
|
$ |
src, |
|
|
$ |
onclick, |
|
|
$ |
disabled = false , |
|
|
$ |
tip = "" , |
|
|
$ |
style = "" , |
|
|
$ |
class = "utyimgbutton" | |
|
) |
| | |
html button[type='button'] with img background (javascript object: utyButtonBase)
- Parameters:
-
| id | (string) button element id and javascript variable |
| src | (string) button style background-img property |
| onclick | (string) button onclick attribute: javascript expression |
| [disabled] | (bool) if TRUE outputs button disabled attribute, default=FALSE |
| [tip] | (string) button title attribute, default="" |
| [style] | (string) button style attribute, default="". CSS-RESERVED-PROPERTIES: background-img:url($src) |
| [class] | (string) button class attribute, default="utyimgbutton" |
uty_imgsubmit |
( |
$ |
id, |
|
|
$ |
src, |
|
|
$ |
onclick, |
|
|
$ |
disabled = FALSE , |
|
|
$ |
tip = "" , |
|
|
$ |
style = "" , |
|
|
$ |
class = "utyimgsubmit" | |
|
) |
| | |
html input[type="image"] (javascript object: utyButtonBase)
- Parameters:
-
| id | (string) input element id,name and javascript variable |
| src | (string) input src attribute |
| onclick | (string) input onclick attribute: javascript expression |
| [disabled] | (bool) if TRUE outputs input disabled attribute, default=FALSE |
| [tip] | (string) input title attribute, default="" |
| [style] | (string) input style attribute, default="" |
| [class] | (string) input class attribute, default="utyimgsubmit" |
uty_msgbox |
( |
$ |
level, |
|
|
$ |
title, |
|
|
$ |
message | |
|
) |
| | |
uty_msgstrip |
( |
$ |
level, |
|
|
$ |
message | |
|
) |
| | |
A strip containing the message html and an icon representing the level
- Parameters:
-
| level | (UTY_ERR_*) one of the UTY_ERR_* error level constants. |
- See also:
- DOC_COMMON_ERR
- Parameters:
-
| message | (string) the message (text can contain html tags) to display. |
Variable Documentation
Current uty_listview output status info. NB: The uty_listview_* functions family relies on this global variable to know current table status
Current uty_tree id. NB: The uty_tree_* functions family relies on this global variable to know current table status