You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							148 lines
						
					
					
						
							6.0 KiB
						
					
					
				
			
		
		
	
	
							148 lines
						
					
					
						
							6.0 KiB
						
					
					
				 | 
						|
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8"> | 
						|
<!-- | 
						|
<!DOCTYPE html | 
						|
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 
						|
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 
						|
--> | 
						|
 | 
						|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | 
						|
<head> | 
						|
<title>TabContainer Demo</title> | 
						|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> | 
						|
 | 
						|
<script type="text/javascript"> | 
						|
	var djConfig = { isDebug: true }; | 
						|
</script> | 
						|
<script type="text/javascript" src="../../dojo.js"></script> | 
						|
<script type="text/javascript"> | 
						|
	dojo.require("dojo.widget.TabContainer"); | 
						|
	dojo.require("dojo.widget.Tooltip"); | 
						|
	dojo.require("dojo.widget.LinkPane"); | 
						|
	dojo.require("dojo.widget.ContentPane"); | 
						|
	dojo.require("dojo.widget.Button"); | 
						|
</script> | 
						|
 | 
						|
<style type="text/css"> | 
						|
body { | 
						|
	font-family : sans-serif; | 
						|
} | 
						|
 | 
						|
/* add padding to each contentpane inside the tab container, and scrollbar if necessary */ | 
						|
.dojoTabPane { | 
						|
  padding : 10px 10px 10px 10px; | 
						|
  overflow: auto; | 
						|
} | 
						|
 | 
						|
</style> | 
						|
<script type="text/javascript"> | 
						|
function boo(panel, node) { | 
						|
	node.innerHTML = "Handlers override grabbing from URLs. They run in context of the widget, so 'this' refers to the tab widget."; | 
						|
} | 
						|
function testClose(pane,tab) { | 
						|
  return confirm("Please confirm that you want tab "+tab.label+" closed"); | 
						|
} | 
						|
</script> | 
						|
</head> | 
						|
 | 
						|
<body> | 
						|
	<p>These tabs are made up of local and external content. Tab 1 and Tab 2 are loading | 
						|
	files tab1.html and tab2.html. Tab 3 and Another Tab are using content that is already | 
						|
	part of this page.   Tab2 is initially selected.</p> | 
						|
 | 
						|
	<div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; height: 20em;" selectedChild="tab2"> | 
						|
	 | 
						|
		<div id="tab1" dojoType="ContentPane" href="tab1.html" label="Tab 1"></div> | 
						|
		 | 
						|
		<div id="tab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" label="Tab 2"></div> | 
						|
		 | 
						|
		<div dojoType="ContentPane" label="Tab 3"> | 
						|
			<h1>I am tab 3</h1> | 
						|
			<p>And I was already part of the page! That's cool, no?</p> | 
						|
			<p id="foo">tooltip on this paragraph</p> | 
						|
			<div dojoType="Tooltip" connectId="foo">I'm a tooltip!</div> | 
						|
			<button dojoType="Button">I'm a button</button> | 
						|
			<br> | 
						|
			<button dojoType="Button">So am I!</button> | 
						|
			<p> | 
						|
			Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean | 
						|
			semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin | 
						|
			porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi. | 
						|
			Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis. | 
						|
			Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae | 
						|
			risus. | 
						|
			</p> | 
						|
			<p>Aliquam vitae enim. Duis scelerisque metus auctor est venenatis | 
						|
			imperdiet. Fusce dignissim porta augue. Nulla vestibulum. Integer lorem | 
						|
			nunc, ullamcorper a, commodo ac, malesuada sed, dolor. Aenean id mi in | 
						|
			massa bibendum suscipit. Integer eros. Nullam suscipit mauris. In | 
						|
			pellentesque. Mauris ipsum est, pharetra semper, pharetra in, viverra | 
						|
			quis, tellus. Etiam purus. Quisque egestas, tortor ac cursus lacinia, | 
						|
			felis leo adipiscing nisi, et rhoncus elit dolor eget eros. Fusce ut | 
						|
			quam. Suspendisse eleifend leo vitae ligula. Nulla facilisi. Nulla | 
						|
			rutrum, erat vitae lacinia dictum, pede purus imperdiet lacus, ut | 
						|
			semper velit ante id metus. Praesent massa dolor, porttitor sed, | 
						|
			pulvinar in, consequat ut, leo. Nullam nec est. Aenean id risus blandit | 
						|
			tortor pharetra congue. Suspendisse pulvinar. | 
						|
			</p> | 
						|
		</div> | 
						|
		 | 
						|
		<div dojoType="LinkPane" label="Handler tab" handler="boo"></div> | 
						|
 | 
						|
		<div dojoType="ContentPane" label="Another Tab"> | 
						|
			<h1>I love local content</h1> | 
						|
			<p>And I'm not ashamed to admit it.</p> | 
						|
			<p>venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga | 
						|
			venga venga venga venga venga venga venga venga venga venga venga venga</p> | 
						|
		</div> | 
						|
 | 
						|
		<div id="subTabContainer" dojoType="TabContainer" label="Sub TabContainer">	 | 
						|
			<a dojoType="LinkPane" href="tab1.html">SubTab 1</a>		 | 
						|
			<a dojoType="LinkPane" href="tab2.html" selected="true">SubTab 2</a> | 
						|
		</div> | 
						|
 | 
						|
	</div> | 
						|
 | 
						|
	<p> | 
						|
		The next example is with closable tabs. | 
						|
		Tab 1 and Tab 3 can be closed; Tab 3 has a confirm box. | 
						|
	</p> | 
						|
 | 
						|
	<div id="ttabs" dojoType="TabContainer" labelPosition="top" style="width: 100%; height: 10em;"> | 
						|
		<div id="ttab1" dojoType="ContentPane" href="tab1.html" label="Tab 1" closable="true"></div> | 
						|
		<div id="ttab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" label="Tab 2"></div> | 
						|
		<div dojoType="ContentPane" label="Tab 3" onClose="testClose" closable="true"> | 
						|
			<h1>I am tab 3</h1> | 
						|
			<p>And I was already part of the page! That's cool, no?</p> | 
						|
			<p>If you try to close me there should be a confirm dialog.</p> | 
						|
		</div> | 
						|
	</div> | 
						|
	 | 
						|
	<p>Tabs with labels on the bottom:</p> | 
						|
 | 
						|
	<div id="btabs" dojoType="TabContainer" labelPosition="bottom" style="width: 100%; height: 10em;"> | 
						|
		<div id="btab1" dojoType="ContentPane" href="tab1.html" label="Tab 1"></div> | 
						|
		<div id="btab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" onLoad="dojo.debug('Tab2 onLoad');" label="Tab 2"></div> | 
						|
	</div> | 
						|
	 | 
						|
	<p>Tabs with labels on the left:</p> | 
						|
 | 
						|
	<div id="lhtabs" dojoType="TabContainer" labelPosition="left-h" style="width: 100%; height: 10em;"> | 
						|
		<div id="lhtab1" dojoType="ContentPane" href="tab1.html" label="Tab 1"></div> | 
						|
		<div id="lhtab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" label="Tab 2"></div> | 
						|
	</div> | 
						|
	 | 
						|
	<p>Tabs with labels on the right:</p> | 
						|
 | 
						|
	<div id="lrtabs" dojoType="TabContainer" labelPosition="right-h" style="width: 100%; height: 10em;"> | 
						|
		<div id="rhtab1" dojoType="ContentPane" href="tab1.html" label="Tab 1"></div> | 
						|
		<div id="rhtab2" dojoType="ContentPane" href="tab2.html" refreshOnShow="true" label="Tab 2"></div> | 
						|
	</div> | 
						|
 | 
						|
</body> | 
						|
</html> |