disabled overview clicks on slides with disabled class

This commit is contained in:
Hakim El Hattab committed 2013-02-26 12:08:04 -05:00
1 parent 40759435e4
commit 3b822c33e4
3 files changed
+58 -8

No files matched your search

+46
View File
@@ -373,5 +373,51 @@ function linkify( selector ) {
</script> </script>
<!-- Everything below this point is unrelated to the slideshow -->
<div class="share-reveal" style="display: none; position: absolute; bottom: 10px; left: 50%; margin-left: -205px; z-index: 20;">
<a href="http://twitter.com/share" class="twitter-share-button" data-text="reveal.js - an HTML presentation framework from @hakimel." data-url="http://lab.hakim.se/reveal-js" data-count="small" data-related="hakimel"></a>
<iframe id="facebook-button" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fapp.hakim.se%2Freveal-js%2F&layout=button_count&show_faces=false&width=93&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:85px; height:24px; position: relative; top: 4px;" allowTransparency="true"></iframe>
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://lab.hakim.se/reveal-js"></a>
<a href="https://twitter.com/rvlio" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @rvlio</a>
</div>
<a class="fork-reveal" style="display: none;" href="https://github.com/hakimel/reveal.js"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/camo.github.com/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
<script>
var _gaq = [['_setAccount', 'UA-15240703-1'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<script>
if( !navigator.userAgent.match( /iphone|ipod|android|ipad|blackberry/gi ) && !!document.querySelector ) {
document.querySelector( '.share-reveal' ).style.display = 'block';
document.querySelector( '.fork-reveal' ).style.display = 'block';
}
</script>
</body> </body>
</html> </html>
+10 -6
View File
@@ -1811,19 +1811,23 @@ var Reveal = (function(){
if( eventsAreBound && isOverview() ) { if( eventsAreBound && isOverview() ) {
event.preventDefault(); event.preventDefault();
deactivateOverview();
var element = event.target; var element = event.target;
while( element && !element.nodeName.match( /section/gi ) ) { while( element && !element.nodeName.match( /section/gi ) ) {
element = element.parentNode; element = element.parentNode;
} }
if( element.nodeName.match( /section/gi ) ) { if( element && !element.classList.contains( 'disabled' ) ) {
var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),
v = parseInt( element.getAttribute( 'data-index-v' ), 10 ); deactivateOverview();
if( element.nodeName.match( /section/gi ) ) {
var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),
v = parseInt( element.getAttribute( 'data-index-v' ), 10 );
slide( h, v );
}
slide( h, v );
} }
} }
+2 -2
View File
@@ -1,8 +1,8 @@
/*! /*!
* reveal.js 2.3 (2013-02-24, 00:51) * reveal.js 2.3 (2013-02-24, 11:58)
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se * Copyright (C) 2013 Hakim El Hattab, http://hakim.se
*/ */
var Reveal=function(){"use strict";function S(e){if(!d&&!p){document.body.setAttribute("class","no-transforms");return}window.addEventListener("load",j,!1),O(i,e),T(),N()}function x(){h.theme=document.querySelector("#theme"),h.wrapper=document.querySelector(".reveal"),h.slides=document.querySelector(".reveal .slides");if(!h.wrapper.querySelector(".progress")&&i.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",h.wrapper.appendChild(e)}if(!h.wrapper.querySelector(".controls")&&i.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',h.wrapper.appendChild(t)}if(!h.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),h.wrapper.appendChild(n)}if(!h.wrapper.querySelector(".pause-overlay")){var r=document.createElement("div");r.classList.add("pause-overlay"),h.wrapper.appendChild(r)}h.progress=document.querySelector(".reveal .progress"),h.progressbar=document.querySelector(".reveal .progress span"),i.controls&&(h.controls=document.querySelector(".reveal .controls"),h.controlsLeft=M(document.querySelectorAll(".navigate-left")),h.controlsRight=M(document.querySelectorAll(".navigate-right")),h.controlsUp=M(document.querySelectorAll(".navigate-up")),h.controlsDown=M(document.querySelectorAll(".navigate-down")),h.controlsPrev=M(document.querySelectorAll(".navigate-prev")),h.controlsNext=M(document.querySelectorAll(".navigate-next")))}function T(){/iphone|ipod|android/gi.test(navigator.userAgent)&&!/crios/gi.test(navigator.userAgent)&&(window.addEventListener("load",D,!1),window.addEventListener("orientationchange",D,!1))}function N(){function o(){t.length&&head.js.apply(null,t),C()}var e=[],t=[];for(var n=0,r=i.dependencies.length;n<r;n++){var s=i.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function C(){x(),L(),k(),j(),et(),st(),setTimeout(function(){P("ready",{indexh:o,indexv:u,currentSlide:f})},1)}function k(e){h.wrapper.classList.remove(i.transition),typeof e=="object"&&O(i,e),p===!1&&(i.transition="linear"),h.wrapper.classList.add(i.transition),h.controls.style.display=i.controls&&h.controls?"block":"none",h.progress.style.display=i.progress&&h.progress?"block":"none",h.wrapper.classList.toggle("rtl",i.rtl),h.wrapper.classList.toggle("center",i.center),i.mouseWheel?(document.addEventListener("DOMMouseScroll",gt,!1),document.addEventListener("mousewheel",gt,!1)):(document.removeEventListener("DOMMouseScroll",gt,!1),document.removeEventListener("mousewheel",gt,!1)),i.rollingLinks?H():B();if(i.theme&&h.theme){var t=h.theme.getAttribute("href"),n=/[^\/]*?(?=\.css)/,r=t.match(n)[0];i.theme!==r&&(t=t.replace(n,i.theme),h.theme.setAttribute("href",t))}}function L(){w=!0,window.addEventListener("hashchange",Nt,!1),window.addEventListener("resize",Ct,!1),i.touch&&(document.addEventListener("touchstart",dt,!1),document.addEventListener("touchmove",vt,!1),document.addEventListener("touchend",mt,!1)),i.keyboard&&document.addEventListener("keydown",pt,!1),i.progress&&h.progress&&h.progress.addEventListener("click",yt,!1);if(i.controls&&h.controls){var e="ontouchstart"in window&&window.ontouchstart!=null?"touchstart":"click";h.controlsLeft.forEach(function(t){t.addEventListener(e,bt,!1)}),h.controlsRight.forEach(function(t){t.addEventListener(e,wt,!1)}),h.controlsUp.forEach(function(t){t.addEventListener(e,Et,!1)}),h.controlsDown.forEach(function(t){t.addEventListener(e,St,!1)}),h.controlsPrev.forEach(function(t){t.addEventListener(e,xt,!1)}),h.controlsNext.forEach(function(t){t.addEventListener(e,Tt,!1)})}}function A(){w=!1,document.removeEventListener("keydown",pt,!1),window.removeEventListener("hashchange",Nt,!1),window.removeEventListener("resize",Ct,!1),i.touch&&(document.removeEventListener("touchstart",dt,!1),document.removeEventListener("touchmove",vt,!1),document.removeEventListener("touchend",mt,!1)),i.progress&&h.progress&&h.progress.removeEventListener("click",yt,!1);if(i.controls&&h.controls){var e="ontouchstart"in window&&window.ontouchstart!=null?"touchstart":"click";h.controlsLeft.forEach(function(t){t.removeEventListener(e,bt,!1)}),h.controlsRight.forEach(function(t){t.removeEventListener(e,wt,!1)}),h.controlsUp.forEach(function(t){t.removeEventListener(e,Et,!1)}),h.controlsDown.forEach(function(t){t.removeEventListener(e,St,!1)}),h.controlsPrev.forEach(function(t){t.removeEventListener(e,xt,!1)}),h.controlsNext.forEach(function(t){t.removeEventListener(e,Tt,!1)})}}function O(e,t){for(var n in t)e[n]=t[n]}function M(e){return Array.prototype.slice.call(e)}function _(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function D(){window.orienLine truncated var Reveal=function(){"use strict";function S(e){if(!d&&!p){document.body.setAttribute("class","no-transforms");return}window.addEventListener("load",j,!1),O(i,e),T(),N()}function x(){h.theme=document.querySelector("#theme"),h.wrapper=document.querySelector(".reveal"),h.slides=document.querySelector(".reveal .slides");if(!h.wrapper.querySelector(".progress")&&i.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",h.wrapper.appendChild(e)}if(!h.wrapper.querySelector(".controls")&&i.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',h.wrapper.appendChild(t)}if(!h.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),h.wrapper.appendChild(n)}if(!h.wrapper.querySelector(".pause-overlay")){var r=document.createElement("div");r.classList.add("pause-overlay"),h.wrapper.appendChild(r)}h.progress=document.querySelector(".reveal .progress"),h.progressbar=document.querySelector(".reveal .progress span"),i.controls&&(h.controls=document.querySelector(".reveal .controls"),h.controlsLeft=M(document.querySelectorAll(".navigate-left")),h.controlsRight=M(document.querySelectorAll(".navigate-right")),h.controlsUp=M(document.querySelectorAll(".navigate-up")),h.controlsDown=M(document.querySelectorAll(".navigate-down")),h.controlsPrev=M(document.querySelectorAll(".navigate-prev")),h.controlsNext=M(document.querySelectorAll(".navigate-next")))}function T(){/iphone|ipod|android/gi.test(navigator.userAgent)&&!/crios/gi.test(navigator.userAgent)&&(window.addEventListener("load",D,!1),window.addEventListener("orientationchange",D,!1))}function N(){function o(){t.length&&head.js.apply(null,t),C()}var e=[],t=[];for(var n=0,r=i.dependencies.length;n<r;n++){var s=i.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function C(){x(),L(),k(),j(),et(),st(),setTimeout(function(){P("ready",{indexh:o,indexv:u,currentSlide:f})},1)}function k(e){h.wrapper.classList.remove(i.transition),typeof e=="object"&&O(i,e),p===!1&&(i.transition="linear"),h.wrapper.classList.add(i.transition),h.controls.style.display=i.controls&&h.controls?"block":"none",h.progress.style.display=i.progress&&h.progress?"block":"none",h.wrapper.classList.toggle("rtl",i.rtl),h.wrapper.classList.toggle("center",i.center),i.mouseWheel?(document.addEventListener("DOMMouseScroll",gt,!1),document.addEventListener("mousewheel",gt,!1)):(document.removeEventListener("DOMMouseScroll",gt,!1),document.removeEventListener("mousewheel",gt,!1)),i.rollingLinks?H():B();if(i.theme&&h.theme){var t=h.theme.getAttribute("href"),n=/[^\/]*?(?=\.css)/,r=t.match(n)[0];i.theme!==r&&(t=t.replace(n,i.theme),h.theme.setAttribute("href",t))}}function L(){w=!0,window.addEventListener("hashchange",Nt,!1),window.addEventListener("resize",Ct,!1),i.touch&&(document.addEventListener("touchstart",dt,!1),document.addEventListener("touchmove",vt,!1),document.addEventListener("touchend",mt,!1)),i.keyboard&&document.addEventListener("keydown",pt,!1),i.progress&&h.progress&&h.progress.addEventListener("click",yt,!1);if(i.controls&&h.controls){var e="ontouchstart"in window&&window.ontouchstart!=null?"touchstart":"click";h.controlsLeft.forEach(function(t){t.addEventListener(e,bt,!1)}),h.controlsRight.forEach(function(t){t.addEventListener(e,wt,!1)}),h.controlsUp.forEach(function(t){t.addEventListener(e,Et,!1)}),h.controlsDown.forEach(function(t){t.addEventListener(e,St,!1)}),h.controlsPrev.forEach(function(t){t.addEventListener(e,xt,!1)}),h.controlsNext.forEach(function(t){t.addEventListener(e,Tt,!1)})}}function A(){w=!1,document.removeEventListener("keydown",pt,!1),window.removeEventListener("hashchange",Nt,!1),window.removeEventListener("resize",Ct,!1),i.touch&&(document.removeEventListener("touchstart",dt,!1),document.removeEventListener("touchmove",vt,!1),document.removeEventListener("touchend",mt,!1)),i.progress&&h.progress&&h.progress.removeEventListener("click",yt,!1);if(i.controls&&h.controls){var e="ontouchstart"in window&&window.ontouchstart!=null?"touchstart":"click";h.controlsLeft.forEach(function(t){t.removeEventListener(e,bt,!1)}),h.controlsRight.forEach(function(t){t.removeEventListener(e,wt,!1)}),h.controlsUp.forEach(function(t){t.removeEventListener(e,Et,!1)}),h.controlsDown.forEach(function(t){t.removeEventListener(e,St,!1)}),h.controlsPrev.forEach(function(t){t.removeEventListener(e,xt,!1)}),h.controlsNext.forEach(function(t){t.removeEventListener(e,Tt,!1)})}}function O(e,t){for(var n in t)e[n]=t[n]}function M(e){return Array.prototype.slice.call(e)}function _(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function D(){window.orienLine truncated