view 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
line wrap: on
line source

$(document).ready(function() {

    // language selector
    $('#language_select').change(function() {
        $('#language_form').submit();
    });
    
    // registration form
    $('#id_subscription_amount').change(function() {
        if ($(this).val() > 0) {
            $('#id_payment_method_group').show();
        } else {
            $('#id_payment_method_group').hide();
        }
    });

    // open the big gallery when a thumbnail is clicked
    $('#carousel-screenshots .thumbnail').click(function() {
        $('#modal-screenshots').modal('show');
        index = parseInt($(this).attr('index'));
        $('#carousel-screenshots-modal').carousel(index);
        // start playing the big video
        if ($(this)[0].tagName == 'VIDEO') {
           $('#carousel-screenshots-modal img, #carousel-screenshots-modal video')[index].play();
        }
    });
    
    // thumbail's video starts playing when clicked, pause it
    $('#carousel-screenshots video.thumbnail').each(function(index) {
        $(this).on('play', function(e) { $(this)[0].pause(); });
    });

});