ref: master
plugins/display_content/public/javascripts/jstree-v.pre1.0/_docs/themes.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jsTree v.1.0 - themes documentation</title> <script type="text/javascript" src="../_lib/jquery.js"></script> <script type="text/javascript" src="../_lib/jquery.cookie.js"></script> <script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script> <script type="text/javascript" src="../jquery.jstree.js"></script> <link type="text/css" rel="stylesheet" href="syntax/!style.css"/> <link type="text/css" rel="stylesheet" href="!style.css"/> <script type="text/javascript" src="syntax/!script.js"></script> </head> <body> <div id="container"> <h1 id="dhead">jsTree v.1.0</h1> <h1>themes plugin</h1> <h2>Description</h2> <div id="description"> <p>The <code>themes</code> plugin controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list.</p> </div> <h2 id="configuration">Configuration</h2> <div class="panel configuration"> <h3>theme</h3> <p class="meta">A string. Default is <code>"default"</code>.</p> <p>The name of the theme to use to style the tree.</p> <h3>url</h3> <p class="meta">A string (or <code>false</code> if not used). Default is <code>false</code>.</p> <p>The location of the theme's CSS file, if set to <code>false</code> jstree will look for the file in <code><em>< theme folder ></em>/themes/<em>< theme name ></em>/style.css</code>. You can set the theme folder using <code>$.jstree._themes = "PATH/TO/FOLDER/";</code>, otherwise it is autodetected as <code><em><jquery.tree.js location></em>/themes/</code>.</p> <h3>dots</h3> <p class="meta">A Boolean. Default is <code>true</code>.</p> <p>Whether to show the connecting dots or not.</p> <h3>icons</h3> <p class="meta">A Boolean. Default is <code>true</code>.</p> <p>Whether to show the node icons or not.</p> </div> <h2 id="demos">Demos</h2> <div class="panel"> <h3>Using the themes plugin</h3> <input type="button" class="button" value="toggle_dots" id="toggle_dots" style="float:left;" /> <input type="button" class="button" value="toggle_icons" id="toggle_icons" style="float:left;" /> <input type="button" class="button" value="set_theme1" id="set_theme1" style="float:left;" /> <input type="button" class="button" value="set_theme2" id="set_theme2" style="" /> <div id="demo1" class="demo"> <ul> <li id="phtml_1"> <a href="#">Root node 1</a> <ul> <li id="phtml_2"> <a href="#">Child node 1</a> </li> <li id="phtml_3"> <a href="#">Child node 2</a> </li> </ul> </li> <li id="phtml_4"> <a href="#">Root node 2</a> </li> </ul> </div> <script type="text/javascript" class="source"> $(function () { $("#toggle_dots, #toggle_icons").click(function () { $("#demo1").jstree(this.value); }); $("#set_theme1").click(function () { $("#demo1").jstree("set_theme","apple"); }); $("#set_theme2").click(function () { $("#demo1").jstree("set_theme","default"); }); $("#demo1").jstree({ "themes" : { "theme" : "default", "dots" : false, "icons" : false }, "plugins" : [ "themes", "html_data" ] }); }); </script> </div> <h2 id="api">API</h2> <div class="panel api"> <h3 id="set_theme">.set_theme ( name , url )</h3> <p>Set the tree's theme. Triggers an event.</p> <ul class="arguments"> <li> <code class="tp">string</code> <strong>name</strong> <p>The name of the theme to use to style the tree.</p> </li> <li> <code class="tp">string</code> <strong>url</strong> <p>The location of the theme's CSS file, if omitted jstree will look for the file in:<br /><code><em>< theme folder ></em>/themes/<em>< name ></em>/style.css</code>.<br />You can set the theme folder using:<br /><code>$.jstree._themes = "PATH/TO/FOLDER/";</code>, otherwise it is autodetected as <code><em><jquery.tree.js location></em>/themes/</code>.</p> </li> </ul> <h3 id="get_theme">.get_theme ( )</h3> <p>Returns the name of the currently active theme.</p> <div style="height:1px; visibility:hidden;"><span id="hide_dots"> </span><span id="toggle_dots"> </span></div> <h3 id="show_dots">.show_dots ( ), .hide_dots ( ), .toggle_dots ( )</h3> <p>Show, hide or toggle the visibility of the dots connecting the tree's nodes.</p> <div style="height:1px; visibility:hidden;"><span id="hide_icons"> </span><span id="toggle_icons"> </span></div> <h3 id="show_icons">.show_icons ( ), .hide_icons ( ), .toggle_icons ( )</h3> <p>Show, hide or toggle the visibility of the icons next to the title of each the tree node.</p> </div> </div> </body> </html> |