annotate static/js/sat_website.js @ 43:c86737a3af94

update French language files
author souliane <souliane@mailoo.org>
date Tue, 03 Feb 2015 15:17:07 +0100
parents 9d553570cc61
children d54f2f09a73a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
1 $(document).ready(function() {
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
2
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
3 // language selector
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
4 $('#language_select').change(function() {
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
5 $('#language_form').submit();
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
6 });
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
7
34
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
8 // registration form
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
9 $('#id_subscription_amount').change(function() {
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
10 if ($(this).val() > 0) {
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
11 $('#id_payment_method_group').show();
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
12 } else {
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
13 $('#id_payment_method_group').hide();
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
14 }
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
15 });
9d553570cc61 add adhesion_form.html and thank_you.html
souliane <souliane@mailoo.org>
parents: 29
diff changeset
16
29
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
17 // open the big gallery when a thumbnail is clicked
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
18 $('#carousel-screenshots .thumbnail').click(function() {
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
19 $('#modal-screenshots').modal('show');
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
20 index = parseInt($(this).attr('index'));
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
21 $('#carousel-screenshots-modal').carousel(index);
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
22 // start playing the big video
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
23 if ($(this)[0].tagName == 'VIDEO') {
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
24 $('#carousel-screenshots-modal img, #carousel-screenshots-modal video')[index].play();
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
25 }
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
26 });
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
27
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
28 // thumbail's video starts playing when clicked, pause it
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
29 $('#carousel-screenshots video.thumbnail').each(function(index) {
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
30 $(this).on('play', function(e) { $(this)[0].pause(); });
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
31 });
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
32
b45621706d83 use Bootstrap carousels to display images and videos galeries:
souliane <souliane@mailoo.org>
parents:
diff changeset
33 });