Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

217 linhas
8.8 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Dialog Boxes &mdash; Documentation</title>
  7. <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '',
  12. VERSION: '',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/doctools.js"></script>
  20. <link rel="top" title="Documentation" href="index.html" />
  21. <link rel="up" title="4. Client Side API" href="client_side_widgets.html" />
  22. <link rel="next" title="Listing" href="listing.html" />
  23. <link rel="prev" title="Report Builder" href="report_builder.html" />
  24. </head>
  25. <body>
  26. <div style="background-color: #FFF; text-align: left; padding: 8px 0px"><img src="_static/banner300910.gif"></div>
  27. <div class="related">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="modindex.html" title="Global Module Index"
  35. accesskey="M">modules</a> |</li>
  36. <li class="right" >
  37. <a href="listing.html" title="Listing"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="report_builder.html" title="Report Builder"
  41. accesskey="P">previous</a> |</li>
  42. <li><a href="index.html">Documentation</a> &raquo;</li>
  43. <li><a href="client_side_widgets.html" accesskey="U">4. Client Side API</a> &raquo;</li>
  44. </ul>
  45. </div>
  46. <div class="sphinxsidebar">
  47. <div class="sphinxsidebarwrapper">
  48. <h3><a href="index.html">Table Of Contents</a></h3>
  49. <ul>
  50. <li><a class="reference external" href="">Dialog Boxes</a><ul>
  51. <li><a class="reference external" href="#dialog-class">Dialog Class</a></li>
  52. <li><a class="reference external" href="#example">Example</a></li>
  53. </ul>
  54. </li>
  55. </ul>
  56. <h4>Previous topic</h4>
  57. <p class="topless"><a href="report_builder.html"
  58. title="previous chapter">Report Builder</a></p>
  59. <h4>Next topic</h4>
  60. <p class="topless"><a href="listing.html"
  61. title="next chapter">Listing</a></p>
  62. <h3>This Page</h3>
  63. <ul class="this-page-menu">
  64. <li><a href="_sources/dialog.txt"
  65. rel="nofollow">Show Source</a></li>
  66. </ul>
  67. <div id="searchbox" style="display: none">
  68. <h3>Quick search</h3>
  69. <form class="search" action="search.html" method="get">
  70. <input type="text" name="q" size="18" />
  71. <input type="submit" value="Go" />
  72. <input type="hidden" name="check_keywords" value="yes" />
  73. <input type="hidden" name="area" value="default" />
  74. </form>
  75. <p class="searchtip" style="font-size: 90%">
  76. Enter search terms or a module, class or function name.
  77. </p>
  78. </div>
  79. <script type="text/javascript">$('#searchbox').show(0);</script>
  80. </div>
  81. </div>
  82. <div class="document">
  83. <div class="documentwrapper">
  84. <div class="bodywrapper">
  85. <div class="body">
  86. <div class="section" id="dialog-boxes">
  87. <h1>Dialog Boxes<a class="headerlink" href="#dialog-boxes" title="Permalink to this headline">¶</a></h1>
  88. <p>This document outlines the basic API of the Dialog widget. Dialog boxes are DIV Elements with a border
  89. and are placed at a higher z-index. There is also a basic Form API within the Dialog boxes</p>
  90. <div class="section" id="dialog-class">
  91. <h2>Dialog Class<a class="headerlink" href="#dialog-class" title="Permalink to this headline">¶</a></h2>
  92. <dl class="class">
  93. <dt id="Dialog">
  94. <em class="property">class </em><tt class="descname">Dialog</tt><big>(</big><em>w</em>, <em>h</em>, <em>title</em>, <em>content</em><big>)</big><a class="headerlink" href="#Dialog" title="Permalink to this definition">¶</a></dt>
  95. <dd><p>To create a basic Dialog box, specify its width, height and title. Optionally, <cite>content</cite> is a list of
  96. form input widgets. For more info, see <cite>make_body</cite></p>
  97. <dl class="attribute">
  98. <dt id="Dialog.wrapper">
  99. <tt class="descname">wrapper</tt><a class="headerlink" href="#Dialog.wrapper" title="Permalink to this definition">¶</a></dt>
  100. <dd>Enclosing outer DIV element</dd></dl>
  101. <dl class="attribute">
  102. <dt id="Dialog.head">
  103. <tt class="descname">head</tt><a class="headerlink" href="#Dialog.head" title="Permalink to this definition">¶</a></dt>
  104. <dd>Element containing the head of the Dialog which contains the title and close btn</dd></dl>
  105. <dl class="attribute">
  106. <dt id="Dialog.body">
  107. <tt class="descname">body</tt><a class="headerlink" href="#Dialog.body" title="Permalink to this definition">¶</a></dt>
  108. <dd>Element containing the body of the Dialog</dd></dl>
  109. <dl class="attribute">
  110. <dt id="Dialog.widgets">
  111. <tt class="descname">widgets</tt><a class="headerlink" href="#Dialog.widgets" title="Permalink to this definition">¶</a></dt>
  112. <dd>Dictionary containing the form widgets. These can be accessed by their labels</dd></dl>
  113. <dl class="method">
  114. <dt id="Dialog.make_body">
  115. <tt class="descname">make_body</tt><big>(</big><em>content</em><big>)</big><a class="headerlink" href="#Dialog.make_body" title="Permalink to this definition">¶</a></dt>
  116. <dd><p>content is the list of form input widgets that are to be created. The structure of the <cite>content</cite>
  117. list is a list-in-a-list.</p>
  118. <p>Field widget types are:</p>
  119. <ul class="simple">
  120. <li>HTML</li>
  121. <li>Check</li>
  122. <li>Data</li>
  123. <li>Select</li>
  124. <li>Password</li>
  125. <li>Text</li>
  126. <li>Button</li>
  127. </ul>
  128. <p>The widgets are declared as [<cite>type</cite>, <cite>label</cite>, <cite>comment or HTML content</cite>]</p>
  129. </dd></dl>
  130. <dl class="method">
  131. <dt id="Dialog.show">
  132. <tt class="descname">show</tt><big>(</big><big>)</big><a class="headerlink" href="#Dialog.show" title="Permalink to this definition">¶</a></dt>
  133. <dd>Show the Dialog</dd></dl>
  134. <dl class="method">
  135. <dt id="Dialog.hide">
  136. <tt class="descname">hide</tt><big>(</big><big>)</big><a class="headerlink" href="#Dialog.hide" title="Permalink to this definition">¶</a></dt>
  137. <dd>Hide the Dialog</dd></dl>
  138. <dl class="method">
  139. <dt id="Dialog.set_title">
  140. <tt class="descname">set_title</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#Dialog.set_title" title="Permalink to this definition">¶</a></dt>
  141. <dd>Set the Dialog title</dd></dl>
  142. <dl class="method">
  143. <dt id="Dialog.no_cancel">
  144. <tt class="descname">no_cancel</tt><big>(</big><big>)</big><a class="headerlink" href="#Dialog.no_cancel" title="Permalink to this definition">¶</a></dt>
  145. <dd>Stop the user from cancelling the Dialog. (The closing of this Dialog must be scripted)</dd></dl>
  146. </dd></dl>
  147. </div>
  148. <div class="section" id="example">
  149. <h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
  150. <p>Example showing creation of a Email Dialog:</p>
  151. <div class="highlight-python"><pre>var d = new Dialog(440, 440, "Send Email");
  152. d.make_body([
  153. ['Data','To','Example: abc@hotmail.com, xyz@yahoo.com']
  154. ,['Select','Format']
  155. ,['Data','Subject']
  156. ,['Data','From','Optional']
  157. ,['Check','Send With Attachments','Will send all attached documents (if any)']
  158. ,['Text','Message']
  159. ,['Button','Send',email_go]]
  160. );
  161. // Reference to a form widget
  162. var emailfrom = d.widgets['From'].value;
  163. // show the dialog
  164. d.show()</pre>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="clearer"></div>
  172. </div>
  173. <div class="related">
  174. <h3>Navigation</h3>
  175. <ul>
  176. <li class="right" style="margin-right: 10px">
  177. <a href="genindex.html" title="General Index"
  178. >index</a></li>
  179. <li class="right" >
  180. <a href="modindex.html" title="Global Module Index"
  181. >modules</a> |</li>
  182. <li class="right" >
  183. <a href="listing.html" title="Listing"
  184. >next</a> |</li>
  185. <li class="right" >
  186. <a href="report_builder.html" title="Report Builder"
  187. >previous</a> |</li>
  188. <li><a href="index.html">Documentation</a> &raquo;</li>
  189. <li><a href="client_side_widgets.html" >4. Client Side API</a> &raquo;</li>
  190. </ul>
  191. </div>
  192. <div class="footer">
  193. &copy; Copyright 2010, Rushabh Mehta.
  194. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
  195. </div>
  196. </body>
  197. </html>