![Obihai Technology OBi1032 Скачать руководство пользователя страница 160](http://html2.mh-extra.com/html/obihai-technology/obi1032/obi1032_administration-manual_3151346160.webp)
Copyright 2010-2017 Obihai Technology, Inc.
160
It is optional to include a notification element for a built-in notification element (such as <dnd> or <net>) inside
<Notifications>. But if you do explicitly include one, you can overwrite the display properties of the built-in notification
element (for instance, to change the icon to display for the <dnd> element when the dnd feature is enabled or
disabled). You can add additional user-defined notification elements with unique names that do not conflict with the
built-in notification elements.
Each notification element may contain the following optional attributes:
<Notifications >
Child Element
Attributes
Description
icon
This value is prepended with the value of base-url to form the URL or file path of the icon image to display. It can be an
external (http:// or https:// URL) or an internal path (filename). If not specified, the default icon will be shown for the built-in
notification element, but no icon will be shown for user-defined notification element.
xspace
The width of the holding box that holds the icon of this element. For left aligned <Notififications>, the icon is drawn with its
bounding box aligned with the left edge of the holding box. Otherwise, the icons is drawn with its bounding box aligned with
the right edge of the holding box
base-url
Overwrites the base-url value inherited from the parent
ypos
Y pixel-position of the upper left corner of the icon to display
width
Pixel width of the bounding box of the icon
height
Pixel height of the bounding box of the icon
resize
Whether to resize ("1") or truncate ("0") the icon to fit the given bounding box
aspect
Whether to maintain aspect ratio ("1") or not ("0") when resizing the icon to fit the given bounding box
align
Horizontal alignment w.r.t. its bouding box to draw the icon
valign
Vertical alignment w.r.t. its bounding box to draw the icon
border
Whether to draw a border around the bounding box of the icon
bordercolor
The color of the border to draw around the bounding box of the icon
refresh-id
Reference ID to use to trigger a redraw of the icon by an external Obihai IP Phone XML application
As hinted above, you can use the $state variable inside an $eval macro to conditional set the icon of a built-in
notification element. For example, you can overwrite the icon for the <dnd> element by specifying the icon attribute in
that element as:
<
dnd
icon="
$eval
((
$state
==
Enabled
)?{
my-dnd-on.png
}:{
my-dnd-off.png
})" xspace="
36
" width="
32
" height="
32
"/>
The <LineKeyTabs> Element
This element is for the customization of the Line Key Tabs area of the Title Bar (which holds all of the 1, 2 or 4 tabs
depending on the user setting, skin, and phone model). In the following example, we replace the default background
picture of the tab area (which is a single picture) with a simple gradient color, and highlight the tab number of the
current tab.
<
LineKeyTabs
bgimg
=
''
bgcolor
=
'
white,red
'
>
<
tab-style
valign
=
'
top
'
border
=
'
1
'
bordercolor
=
'
black
'
font
=
'
$eval(($lkeys.page==@p)?{@gfont-bold}:{@gfont})
'
textcolor
=
'
white
'
size
=
'
$eval(($lkeys.page==@p)?16:12)
'
/>
</
LineKeyTabs
>
The result of rendering the above example is shown below (with 4 Line Key Tabs and the the
Tomáš
skin):
Here is a description of the elements/attributes used in the last example:
Element
Description
<LineKeyTabs>
Attributes used:
-
bgimg: An empty value is used to clear the background image (so that background color can be shown)
-
bgcolor: Specifies the background color as a gradient color that varies from white to red vertically (default)
-
<tab-style>
Attributes used:
-
valign: Align the text in each tab (the tab number) to the top edge of the bounding box