Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1417 | Rev 1419 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1410 aurelien 1
$(document).ready(function() {
990 isa 2
 
1410 aurelien 3
	$('#smartflore-illustrations-galerie-carousel').carousel()
4
	$('#smartflore-footer-button-sources').click(function() {
5
		voirSources();
6
	});
990 isa 7
 
1410 aurelien 8
	function voirSources() {
9
		var w = window.open();
10
		var html = $("#smartflore-sources").html();
11
 
12
	    $(w.document.body).html(html);
990 isa 13
	}
14
 
1418 aurelien 15
	toggleFullScreen();
1413 aurelien 16
 
1410 aurelien 17
	//TODO gérer la fonction de swipe sur le téléphone
990 isa 18
	// Slider images : bootstrap
1410 aurelien 19
	/*if (document.getElementById('slider-pictures')) {
990 isa 20
		$('#slider-pictures').hide();
21
		$('#slider-pictures').swiperight(function() {
22
			$('#slider-pictures').carousel('prev');
23
		});
24
		$('#slider-pictures').swipeleft(function() {
25
			$('#slider-pictures').carousel('next');
26
		});
1410 aurelien 27
	}*/
1418 aurelien 28
});
29
 
30
// http://www.html5rocks.com/en/mobile/fullscreen/?redirect_from_locale=fr
31
function toggleFullScreen() {
32
	var doc = window.document;
33
	var docEl = doc.documentElement;
34
 
35
	var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
36
	var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;
37
 
38
	if(!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
39
		requestFullScreen.call(docEl);
40
	}
41
	else {
42
		cancelFullScreen.call(doc);
43
	}
44
}