Skip to content

Commit

Permalink
updated demo to use HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jlong committed Mar 2, 2011
1 parent a2fdcf7 commit f4b0a45
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 67 deletions.
9 changes: 9 additions & 0 deletions demo/ajax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="popup" id="just_a_test">
<h3 class="title">AJAX Popup</h3>
<div class="popup_content">
<p>Hello from the AJAX world!</p>
<p>
<a href="javascript: Element.closePopup('just_a_test')">Close</a>
</p>
</div>
</div>
File renamed without changes
9 changes: 9 additions & 0 deletions demo/draggable_ajax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="popup draggable" id="another_test">
<h3 class="title">Draggable AJAX Popup</h3>
<div class="popup_content">
<p>Try to drag me!</p>
<p>
<a href="javascript: Element.closePopup('another_test')">Close</a>
</p>
</div>
</div>
2 changes: 1 addition & 1 deletion stylesheets/facebook.css → demo/facebook.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
body {
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
font-size: 80%;
background: url(/test/checkered.png);
background: url(checkered.png);
}
.popup {
padding: 10px
Expand Down
79 changes: 79 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test</title>
<link href="facebook.css" rel="stylesheet" type="text/css" />
<script src="../javascripts/prototype.js" type="text/javascript"></script>
<script src="../javascripts/effects.js" type="text/javascript"></script>
<!-- dragdrop.js is required if you want draggable windows -->
<script src="../javascripts/dragdrop.js" type="text/javascript"></script>
<script src="../javascripts/lowpro.js" type="text/javascript"></script>
<script src="../javascripts/popup.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[

// We need to tell Popup.js where our images are:
Popup.BorderImage = '../images/popup_border_background.png';
Popup.BorderTopLeftImage = '../images/popup_border_top_left.png';
Popup.BorderTopRightImage = '../images/popup_border_top_right.png';
Popup.BorderBottomLeftImage = '../images/popup_border_bottom_left.png';
Popup.BorderBottomRightImage = '../images/popup_border_bottom_right.png';

// Add trigger behavior
Event.addBehavior({ 'a.popup': Popup.TriggerBehavior() });

//]]>
</script>
</head>
<body>
<p>
<a class="popup" href="#test">Popup</a>
</p>
<p>
<a class="popup" href="ajax.html">Ajax Popup</a>
</p>
<p>
<a class="popup" href="#search">Popup Input</a>
</p>
<p>
<a class="popup" href="#dragme">Draggable</a>
</p>
<p>
<a class="popup" href="draggable_ajax.html">Draggable Ajax Popup</a>
</p>
<div class="popup" id="test" style="display: none; width: 20em;">
<h3 class="title">Popup Window</h3>
<div class="popup_content">
<p>
This little javascript library allows you to create Facebook-style
popup windows with LowPro and Prototype.
</p>
<p>
<a href="javascript: Element.closePopup('test')">Close</a>
</p>
</div>
</div>
<div class="popup" id="search" style="display: none">
<h3 class="title">Search</h3>
<div class="popup_content">
<form>
<p>
<input id="query" name="query" type="text" value="" />
</p>
<p>
<a href="javascript: Element.closePopup('search')">Close</a>
</p>
</form>
</div>
</div>
<div class="popup draggable" id="dragme" style="display: none">
<h3 class="title">Drag Me</h3>
<div class="popup_content">
<p>Try dragging me around by my title.</p>
<p>
<a href="javascript: Element.closePopup('dragme')">Close</a>
</p>
</div>
</div>
</body>
</html>
6 changes: 0 additions & 6 deletions test/ajax.haml

This file was deleted.

6 changes: 0 additions & 6 deletions test/draggable_ajax.haml

This file was deleted.

54 changes: 0 additions & 54 deletions test/index.haml

This file was deleted.

0 comments on commit f4b0a45

Please sign in to comment.