Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Carousel: Fixing maths for deciding how many pages there are
- Loading branch information
Jake Archibald
committed
Jun 11, 2010
1 parent
fa9a9ad
commit cecf714
Showing
4 changed files
with
202 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | ||
"http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
<title>Manual Test: glow.ui.Carousel</title> | ||
|
||
<script type="text/javascript" src="../../../lib/manualtest.js"></script> | ||
<link type="text/css" rel="stylesheet" media="screen" href="../../../lib/style.css" /> | ||
<script src="../../../../unit/lib/testhelper.js?base=../../../../../" type="text/javascript"></script> | ||
|
||
<script type="text/javascript"> | ||
testHelper.addScript('core.js'); | ||
testHelper.addScript('ui.js'); | ||
testHelper.addCss('ui.css'); | ||
</script> | ||
|
||
<style type="text/css"> | ||
#carousel1Outer, #carousel2Outer { | ||
width: 550px; | ||
font-size: small; | ||
} | ||
#carousel1, #carousel2 { | ||
margin: 0; padding: 0; | ||
list-style: none; | ||
|
||
} | ||
#carousel1 img, | ||
#carousel2 img { | ||
display: block; | ||
} | ||
.itemTitle { | ||
padding: 5px 0; | ||
background: #ccc; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1>glow.ui.Carousel</h1> | ||
|
||
<h2>Basic carousel</h2> | ||
|
||
<ol> | ||
<li>Below should be a carousel showing 4 items, with one image partially visible behind the next (right) button.</li> | ||
<li>Below each of the 4 fully visible images should be a title.</li> | ||
</ol> | ||
|
||
<div class="testarea" id="carousel1Outer"> | ||
<ol id="carousel1"> | ||
<li> | ||
<img src="../CarouselPane/images/1.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Leonardo</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/2.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Michelangelo</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/3.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Donatello</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/4.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Raphael</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/5.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Master Splinter</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/6.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Shredder</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/7.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">April O'Neil</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/8.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Krang</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/9.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Technodrome</div> | ||
</li> | ||
</ol> | ||
</div> | ||
|
||
<script type="text/javascript" class="showSrc"> | ||
glow.ready(function() { | ||
window.myCarousel = new glow.ui.Carousel('#carousel1', { | ||
itemTitles: '.itemTitle' | ||
}); | ||
}); | ||
</script> | ||
|
||
<div class="testarea" id="carousel2Outer"> | ||
<ol id="carousel2"> | ||
<li> | ||
<img src="../CarouselPane/images/1.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Leonardo</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/2.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Michelangelo</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/3.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Donatello</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/4.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Raphael</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/5.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Master Splinter</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/6.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Shredder</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/7.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">April O'Neil</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/8.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Krang</div> | ||
</li> | ||
<li> | ||
<img src="../CarouselPane/images/9.jpg" alt="" width="150" height="150" /> | ||
<div class="itemTitle">Technodrome</div> | ||
</li> | ||
</ol> | ||
</div> | ||
|
||
<script type="text/javascript" class="showSrc"> | ||
glow.ready(function() { | ||
window.myCarousel2 = new glow.ui.Carousel('#carousel2'); | ||
}); | ||
</script> | ||
|
||
|
||
<script type="text/javascript"> | ||
// make scripts visible in the page... | ||
manualTests.showSrc(); | ||
</script> | ||
</body> | ||
</html> |