PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/public/assets/bigbox/plugins/fancytree-master/demo/sample-iframe.html

https://bitbucket.org/mad3linux/bigbox
HTML | 133 lines | 119 code | 8 blank | 6 comment | 0 complexity | e3af20c29f32084b11542fc8456ab4c5 MD5 | raw file
  1<!DOCTYPE html>
  2<html>
  3<head>
  4	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  5	<title>Fancytree - Example</title>
  6
  7	<script src="../lib/jquery.js"></script>
  8	<script src="../lib/jquery-ui.custom.js"></script>
  9
 10	<link href="../src/skin-win8/ui.fancytree.css" rel="stylesheet">
 11	<script src="../src/jquery.fancytree.js"></script>
 12
 13	<!-- Start_Exclude: This block is not part of the sample code -->
 14	<link href="../lib/prettify.css" rel="stylesheet">
 15	<script src="../lib/prettify.js"></script>
 16	<link href="sample.css" rel="stylesheet">
 17	<script src="sample.js"></script>
 18	<!-- End_Exclude -->
 19
 20   <style type="text/css">
 21		#tree {
 22			vertical-align: top;
 23			width: 250px;
 24		}
 25		iframe {
 26			border: 1px dotted gray;
 27		}
 28	</style>
 29	<!-- Add code to initialize the tree when the document is loaded: -->
 30	<script type="text/javascript">
 31	$(function(){
 32		// Attach the dynatree widget to an existing <div id="tree"> element
 33		// and pass the tree options as an argument to the dynatree() function:
 34		$("#tree").fancytree({
 35//          autoCollapse: true,
 36			minExpandLevel: 1,
 37			postinit: function(isReloading, isError) {
 38				this.reactivate();
 39			},
 40			focus: function(event, data) {
 41				// Auto-activate focused node after 2 seconds
 42				data.node.scheduleAction("activate", 2000);
 43			},
 44			activate: function(event, data) {
 45				var node = data.node;
 46				// Use <a> href and target attributes to load the content:
 47				if( node.data.href ){
 48					// Open target
 49					window.open(node.data.href, node.data.target);
 50					// or open target in iframe
 51//                $("[name=contentFrame]").attr("src", node.data.href);
 52				}
 53			}
 54		});
 55	});
 56	</script>
 57</head>
 58<body class="example">
 59	<h1>Example: URL navigation and iframes</h1>
 60	<p class="description">
 61		Use Fancytree as a navigation menu.
 62		<br>
 63		The tree initialization uses <code>&lt;a href='URL', target='TARGET'>title&lt;/a></code>
 64		tags.<br>
 65		The <code>activate</code> handler then uses <code>node.data.href</code>
 66		to open the the pages in the embedded iframe.<br>
 67		Note that the navigation will fallback to standard HTML links,
 68		when JavaScript is disabled.<br>
 69		A focused node will automatically be activated after 2 seconds (use the
 70		keyboard to try this out).<br>
 71		<br>
 72		The <kbd>Toggle tree</kbd> button in the embedded welcome page also gives
 73		an example on how to access a tree that exists outside the own frame.
 74	</p>
 75	<div>
 76		<label for="skinswitcher">Skin:</label> <select id="skinswitcher"></select>
 77	</div>
 78
 79	<table>
 80	<colgroup>
 81		<col width="300px" valign="top">
 82		<col width="90%">
 83	</colgroup>
 84	<tr>
 85		<td valign="top">
 86			<!-- Add a <div> element where the tree should appear: -->
 87			<div id="tree">
 88			<ul>
 89				<li class="expanded folder">Search engines
 90				<ul>
 91					<li><a href="//duckduckgo.com" target="contentFrame">DuckDuckGo</a>
 92					<li><a href="//duckduckgo.com" target="_self">DuckDuckGo (target='_self')</a>
 93					<li><a href="http://duckduckgo.com" target="_top" title="This link replaces the current page">DuckDuckGo (target='_top')</a>
 94					<li><a href="//www.bing.com" target="contentFrame">Bing</a>
 95					<li><a href="//www.wolframalpha.com/" target="contentFrame">WolframAlpha</a>
 96				</ul>
 97				<li class="expanded folder">jQuery
 98				<ul>
 99					<li><a href="//www.jquery.com/" target="contentFrame">jQuery</a>
100					<li><a href="//ui.jquery.com/" target="contentFrame">jQuery UI</a>
101					<li><a href="//api.jquery.com/" target="contentFrame">API browser</a>
102					<li><a href="//wwwendt.de/tech/fancytree/doc/jsdoc/index.html" target="contentFrame">Fancytree</a>
103				</ul>
104				<li class="expanded folder">Misc
105				<ul>
106					<li><a href="sample-iframe-1.html" target="contentFrame">Welcome</a>
107				</ul>
108			</ul>
109			</div>
110		</td>
111
112		<td>
113			<iframe src="sample-iframe-1.html" name="contentFrame" width="100%" height="500"
114					scrolling="yes" marginheight="0" marginwidth="0" frameborder="0">
115			  <p>Your browser does not support iframes</p>
116			</iframe>
117		</td>
118	</tr>
119	</table>
120
121
122	<!-- Start_Exclude: This block is not part of the sample code -->
123	<hr>
124	<p class="sample-links  no_code">
125		<a class="hideInsideFS" href="https://github.com/mar10/fancytree/">Fancytree project home</a>
126		<a class="hideOutsideFS" href="#">Link to this page</a>
127		<a class="hideInsideFS" href="index.html">Example Browser</a>
128		<a href="#" id="codeExample">View source code</a>
129	</p>
130	<pre id="sourceCode" class="prettyprint" style="display:none"></pre>
131	<!-- End_Exclude -->
132</body>
133</html>