Skip to main content

Bug Tracker

Side navigation

Ticket #2654: ui.dialog.html


File ui.dialog.html, 2.7 KB (added by anmic, April 04, 2008 08:58PM UTC)
<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dialog Demo</title>
<link rel="stylesheet" href="../themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)" />
<link rel="stylesheet" href="css/style.css" type="text/css" />

<script src="../jquery-1.2.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../jquery.dimensions.js"></script>
<script type="text/javascript" src="../ui.dialog.js"></script>
<script type="text/javascript" src="../ui.mouse.js"></script>
<script type="text/javascript" src="../ui.resizable.js"></script>
<script type="text/javascript" src="../ui.draggable.js"></script>

<style type="text/css">
.hover { background: #000; }
//#example1, #example2, #example3 { display: none; }
</style>
</head>
<body class="flora">

<h2>1. Default, no options</h2>
<div class="playground">
	<div id="example1">Hello, World!</div>
	<br />
	<button onclick="$('#example1').dialog();$(this).hide().next().show();">Create Dialog</button>
	<button onclick="$('#example1').dialog('open')" style="display:none;">Open</button>
	<button onclick="$('#example1').dialog('close')">Close</button>
</div>

<h2>2. Title, Width &amp; Height</h2>
<div class="playground">
	<div id="example2" title="dialog title">I have a title and I'm big</div>
	<br />
	<button onclick="$('#example2').dialog({width: 600, height: 300});$(this).hide().next().show();">Create Dialog</button>
	<button onclick="$('#example2').dialog('open')" style="display:none;">Open</button>
	<button onclick="$('#example2').dialog('close')">Close</button>
</div>

<h2>3. Buttons</h2>
<div class="playground">
	<div id="example3">Please select an option below.</div>
	<br />
	<button onclick="$('#example3').dialog({
		title: 'Are you sure?',
		modal: true,
		overlay: {
      'backgroundColor': 'black',
      'opacity': 0.7
    }
		buttons: {
			'Yes': function() { $(this).dialog('close'); alert('You clicked \'Yes\''); },
			'No': function() { $(this).dialog('close'); alert('You clicked \'No\''); }
		},
		draggable: true,
		resizable: true
	});$(this).hide().next().show();">Create Dialog</button>
	<button onclick="$('#example3').dialog('open')" style="display:none;">Open</button>
	<button onclick="$('#example3').dialog('close')">Close</button>
</div>

<script type="text/javascript">
if(!window.console) {
 	window.console = {
 		log: function() {
 			alert(arguments[0]);	
 		}
	}	
}

</script>
</body>
</html>

Download in other formats:

Original Format