1_files.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>jsTree &raquo; Documentation </title>
  8. <link rel="stylesheet" type="text/css" href="../media/style.css" />
  9. <link rel="shortcut icon" href="../media/favicon.ico" />
  10. <link rel="stylesheet" type="text/css" href="../media/prettify.css" />
  11. <script type="text/javascript" src="../media/prettify.js"></script>
  12. <script type="text/javascript" src="../media/iepngfix_tilebg.js"></script>
  13. <script type="text/javascript">window.onload = function() { prettyPrint(); }</script>
  14. </head>
  15. <body>
  16. <div id="container">
  17. <div id="head">
  18. <h1>jsTree</h1>
  19. <h2>javascript tree component</h2>
  20. <h3>Documentation</h3>
  21. </div>
  22. <div id="sidebar">
  23. <h3 style="margin-top:0;">Documentation</h3>
  24. <ul>
  25. <li class="page_item current_page_item"><a href="1_files.html" title="Required &amp; optional files">Required &#038; optional files</a></li>
  26. <li class="page_item"><a href="2_creation.html" title="Instance creation">Instance creation</a></li>
  27. <li class="page_item"><a href="3_configuration.html" title="Configuration">Configuration</a></li>
  28. <li class="page_item"><a href="4_data.html" title="Data sources">Data sources</a></li>
  29. <li class="page_item"><a href="5_customize.html" title="Customization">Customization</a></li>
  30. <li class="page_item"><a href="6_output.html" title="Output">Output</a></li>
  31. <li class="page_item"><a href="7_api.html" title="API">API&nbsp;</a></li>
  32. </ul>
  33. <h3>Examples</h3>
  34. <ul>
  35. <li class="page_item"><a href="../_examples/1_datasources.html" title="Data sources">Data sources</a></li>
  36. <li class="page_item"><a href="../_examples/2_operations.html" title="Operations">Operations</a></li>
  37. <li class="page_item"><a href="../_examples/3_callbacks.html" title="Callbacks">Callbacks</a></li>
  38. <li class="page_item"><a href="../_examples/4_themes.html" title="Themes">Themes</a></li>
  39. <li class="page_item"><a href="../_examples/5_others.html" title="Others">Other examples</a></li>
  40. <li class="page_item important"><a href="../_examples/7_full.html" title="Full example">Full PHP &amp; mySQL example&nbsp;</a></li>
  41. </ul>
  42. </div>
  43. <div id="data" style="margin-top:-45px;">
  44. <div id="content">
  45. <ul class='nav'>
  46. <li>&nbsp;</li>
  47. <li><a href="../index.html">Up to Reference</a></li>
  48. <li><a href="2_creation.html" title="Instance creation">Instance creation&nbsp;&raquo;</a></li>
  49. </ul>
  50. <h2 style="margin-top:25px;">Required &#038; optional files</h2>
  51. <div class="entry"><div id="documentation">
  52. <p>Note, that you could use the minified version along with the <span class="file">lib.js</span> file, which means you only have to include <span class="file">lib.js</span>, <span class="file">tree_component.js</span> and <span class="file">tree_component.css</span> - see <a href="#minified">below</a>.</p>
  53. <p>Otherwise: only four files are <strong>required</strong>:</p>
  54. <ul>
  55. <li><span class="file">source/_lib/jquery.js</span> - the <a href="http://jquery.com">jQuery</a> library.</li>
  56. <li><span class="file">source/_lib/css.js</span> - a small collection of usefull css commands (those enable fast language switching, themes, etc).</li>
  57. <li><span class="file">source/tree_component.js</span></li>
  58. <li><span class="file">source/tree_component.css</span></li>
  59. </ul>
  60. <p class="note">NOTE: Once loaded jsTree also includes the CSS file of the theme you specified.</p>
  61. <p style="margin-top: 1em;">All other files are <strong>optional</strong> and needed only in certain scenarios:</p>
  62. <ol>
  63. <li>XML data source. I will also need to include:
  64. <ul>
  65. <li><span class="file">source/_lib/sarissa.js</span> - part of the <a href="http://dev.abiss.gr/sarissa/">Sarissa</a> library (used for xsl transformations).</li>
  66. <li><span class="file">source/_lib/sarissa_ieemu_xpath.js</span> - same as above.</li>
  67. <li><span class="file">source/_lib/jquery.xslt.js</span> - <a href="http://jquery.glyphix.com/">jQuery XSLT plugin</a> - a jQuery wrapper for Sarissa.</li>
  68. </ul>
  69. </li>
  70. <li>Metadata stored inside nodes. If you don’t know what this is - check out the examples.
  71. <ul>
  72. <li><span class="file">source/_lib/jquery.metadata.js</span> - <a href="http://plugins.jquery.com/project/metadata">jQuery metadata plugin</a></li>
  73. </ul>
  74. </li>
  75. <li>Cookie functionality needed. Also include:
  76. <ul>
  77. <li><span class="file">source/_lib/jquery.cookie.js</span> - <a href="http://plugins.jquery.com/project/cookie">jQuery cookie plugin</a></li>
  78. </ul>
  79. </li>
  80. </ol>
  81. <div class="source">Example source</div>
  82. <pre><span class="com">&lt;!-- REQUIRED SCRIPTS AND STYLES --&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">link</span><span class="pln"> </span><span class="atn">rel</span><span class="pun">=</span><span class="atv">"stylesheet"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/css"</span><span class="pln"> </span><span class="atn">href</span><span class="pun">=</span><span class="atv">"path-to-jsTree/tree_component.css"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln"><br><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/css.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/jquery.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/tree_component.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br><br></span><span class="com">&lt;!-- required for xml data type --&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/sarissa.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/sarissa_ieemu_xpath.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/jquery.xslt.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="com">&lt;!-- required for metadata rule definitions --&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/jquery.metadata.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br><br></span><span class="com">&lt;!-- required for cookie functionality --&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib/jquery.cookie.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span></pre>
  83. <div class="source" id="minified">Example source - minified</div>
  84. <pre><span class="pun">&lt;</span><span class="tag">link</span><span class="pln"> </span><span class="atn">rel</span><span class="pun">=</span><span class="atv">"stylesheet"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/css"</span><span class="pln"> </span><span class="atn">href</span><span class="pun">=</span><span class="atv">"path-to-jsTree/tree_component.css"</span><span class="pln"> </span><span class="pun">/&gt;</span><span class="pln"><br><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/_lib.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span><span class="pln"><br></span><span class="pun">&lt;</span><span class="tag">script</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"text/javascript"</span><span class="pln"> </span><span class="atn">src</span><span class="pun">=</span><span class="atv">"path-to-jsTree/tree_component.min.js"</span><span class="pun">&gt;&lt;/</span><span class="tag">script</span><span class="pun">&gt;</span></pre>
  85. </div></div>
  86. </div>
  87. </div>
  88. </div>
  89. </body>
  90. </html>