Update code to make slide id's optional.

Closes issue #60.
This commit is contained in:
Oleg Roschupkin 2012-03-01 14:25:02 +09:00
parent 92ce9511ae
commit abbb7c282b
3 changed files with 10 additions and 4 deletions

4
en.htm
View File

@ -27,7 +27,7 @@
<h1>Shower Presentation Template</h1>
<p>Vadim Makeev, Opera Software</p>
</header>
<div class="slide cover" id="Cover"><div>
<div class="slide cover"><div>
<section>
<header>
<h2>Shower Presentation Template</h2>
@ -35,7 +35,7 @@
<img src="pictures/cover.jpg" alt="">
</section>
</div></div>
<div class="slide" id="Header"><div>
<div class="slide"><div>
<section>
<header>
<h2>Header</h2>

4
ru.htm
View File

@ -27,7 +27,7 @@
<h1>Шаблон презентаций Shower</h1>
<p>Вадим Макеев, Opera Software</p>
</header>
<div class="slide cover" id="Cover"><div>
<div class="slide cover"><div>
<section>
<header>
<h2>Шаблон презентации Shower</h2>
@ -35,7 +35,7 @@
<img src="pictures/cover.jpg" alt="">
</section>
</div></div>
<div class="slide" id="Header"><div>
<div class="slide"><div>
<section>
<header>
<h2>Заголовок</h2>

View File

@ -7,6 +7,12 @@
l = slides.length, i;
for (i = 0; i < l; i++) {
// Slide ID's are optional. In case of missing ID we set it to the
// slide number
if (!slides[i].id) {
slides[i].id = i + 1;
}
slideList.push({
id: slides[i].id,
hasInnerNavigation: null !== slides[i].querySelector('.next')