Files
smarty/docs/en/designers/language-custom-functions/language-function-popup.xml
2004-04-18 17:23:26 +00:00

430 lines
19 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.function.popup">
<title>popup</title>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
<colspec colname="type" align="center" />
<colspec colname="required" align="center" />
<colspec colname="default" align="center" />
<colspec colname="desc" />
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Type</entry>
<entry>Required</entry>
<entry>Default</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>text</entry>
<entry>string</entry>
<entry>Yes</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>the text/html to display in the popup window</entry>
</row>
<row>
<entry>trigger</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>onMouseOver</emphasis></entry>
<entry>What is used to trigger the popup window. Can be
one of onMouseOver or onClick</entry>
</row>
<row>
<entry>sticky</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>Makes the popup stick around until closed</entry>
</row>
<row>
<entry>caption</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the caption to title</entry>
</row>
<row>
<entry>fgcolor</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>color of the inside of the popup box</entry>
</row>
<row>
<entry>bgcolor</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>color of the border of the popup box</entry>
</row>
<row>
<entry>textcolor</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the color of the text inside the box</entry>
</row>
<row>
<entry>capcolor</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets color of the box's caption</entry>
</row>
<row>
<entry>closecolor</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the color of the close text</entry>
</row>
<row>
<entry>textfont</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the font to be used by the main text</entry>
</row>
<row>
<entry>captionfont</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the font of the caption</entry>
</row>
<row>
<entry>closefont</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the font for the "Close" text</entry>
</row>
<row>
<entry>textsize</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the size of the main text's font</entry>
</row>
<row>
<entry>captionsize</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the size of the caption's font</entry>
</row>
<row>
<entry>closesize</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the size of the "Close" text's font</entry>
</row>
<row>
<entry>width</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the width of the box</entry>
</row>
<row>
<entry>height</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the height of the box</entry>
</row>
<row>
<entry>left</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>makes the popups go to the left of the mouse</entry>
</row>
<row>
<entry>right</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>makes the popups go to the right of the mouse</entry>
</row>
<row>
<entry>center</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>makes the popups go to the center of the mouse</entry>
</row>
<row>
<entry>above</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>makes the popups go above the mouse. NOTE: only
possible when height has been set</entry>
</row>
<row>
<entry>below</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>false</emphasis></entry>
<entry>makes the popups go below the mouse</entry>
</row>
<row>
<entry>border</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>makes the border of the popups thicker or thinner</entry>
</row>
<row>
<entry>offsetx</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>how far away from the pointer the popup will show
up, horizontally</entry>
</row>
<row>
<entry>offsety</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>how far away from the pointer the popup will show
up, vertically</entry>
</row>
<row>
<entry>fgbackground</entry>
<entry>url to image</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>defines a picture to use instead of color for the
inside of the popup.</entry>
</row>
<row>
<entry>bgbackground</entry>
<entry>url to image</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>defines a picture to use instead of color for the
border of the popup. NOTE: You will want to set bgcolor
to "" or the color will show as well. NOTE: When having
a Close link, Netscape will re-render the table cells,
making things look incorrect</entry>
</row>
<row>
<entry>closetext</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the "Close" text to something else</entry>
</row>
<row>
<entry>noclose</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>does not display the "Close" text on stickies
with a caption</entry>
</row>
<row>
<entry>status</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the text in the browsers status bar</entry>
</row>
<row>
<entry>autostatus</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the status bar's text to the popup's text.
NOTE: overrides status setting</entry>
</row>
<row>
<entry>autostatuscap</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets the status bar's text to the caption's text.
NOTE: overrides status and autostatus settings</entry>
</row>
<row>
<entry>inarray</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>tells overLib to read text from this index in
the ol_text array, located in overlib.js. This
parameter can be used instead of text</entry>
</row>
<row>
<entry>caparray</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>tells overLib to read the caption from this index
in the ol_caps array</entry>
</row>
<row>
<entry>capicon</entry>
<entry>url</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>displays the image given before the popup caption</entry>
</row>
<row>
<entry>snapx</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>snaps the popup to an even position in a
horizontal grid</entry>
</row>
<row>
<entry>snapy</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>snaps the popup to an even position in a
vertical grid</entry>
</row>
<row>
<entry>fixx</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>locks the popups horizontal position Note:
overrides all other horizontal placement</entry>
</row>
<row>
<entry>fixy</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>locks the popups vertical position Note:
overrides all other vertical placement</entry>
</row>
<row>
<entry>background</entry>
<entry>url</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>sets image to be used instead of table box
background</entry>
</row>
<row>
<entry>padx</entry>
<entry>integer,integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>pads the background image with horizontal
whitespace for text placement. Note: this is a two
parameter command</entry>
</row>
<row>
<entry>pady</entry>
<entry>integer,integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>pads the background image with vertical
whitespace for text placement. Note: this is a two
parameter command</entry>
</row>
<row>
<entry>fullhtml</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>allows you to control the html over a background
picture completely. The html code is expected in the "text"
attribute</entry>
</row>
<row>
<entry>frame</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>controls popups in a different frame. See the
overlib page for more info on this function</entry>
</row>
<row>
<entry>timeout</entry>
<entry>string</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>calls the specified javascript function and takes
the return value as the text that should be displayed in
the popup window</entry>
</row>
<row>
<entry>delay</entry>
<entry>integer</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>makes that popup behave like a tooltip. It will
popup only after this delay in milliseconds</entry>
</row>
<row>
<entry>hauto</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>automatically determine if the popup should be to
the left or right of the mouse.</entry>
</row>
<row>
<entry>vauto</entry>
<entry>boolean</entry>
<entry>No</entry>
<entry><emphasis>n/a</emphasis></entry>
<entry>automatically determine if the popup should be
above or below the mouse.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
popup is used to create javascript popup windows.
</para>
<example>
<title>popup</title>
<programlisting>
{* popup_init must be called once at the top of the page *}
{popup_init src="/javascripts/overlib.js"}
{* create a link with a popup window when you move your mouse over *}
&lt;A href="mypage.html" {popup text="This link takes you to my page!"}&gt;mypage&lt;/A&gt;
{* you can use html, links, etc in your popup text *}
&lt;A href="mypage.html" {popup sticky=true caption="mypage contents"
text="&lt;UL&gt;&lt;LI&gt;links&lt;LI&gt;pages&lt;LI&gt;images&lt;/UL&gt;" snapx=10 snapy=10}&gt;mypage&lt;/A&gt;</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->