Sha256: caf2044b9dbbced4dc518952afb1f53dd064534e99d082cde7b13d07f02ae9b6

Contents?: true

Size: 856 Bytes

Versions: 9

Compression:

Stored size: 856 Bytes

Contents

function showRelevantSection (){
    active_rule = $('input.event-schedule-rule:checked').first();
    value = active_rule.val();
    $('.event-schedule-rule-section').html(sections[value]);
}


$(function (){
    var rules = $('.event-schedule-rule');
    rules.on('change', function (e){
        showRelevantSection();
    }).trigger('change');

    $('.input-group .all-day').on('change', function(){
        associated_time = $(this).parents('.input-group').find('.time-picker');
        if ($(this).is(':checked') == true) {
            associated_time.prop('disabled', true);
            associated_time.val('');
        } else {
            associated_time.prop('disabled', false);
        }
    });

    $('.date-picker').datetimepicker({
        format: 'YYYY-MM-DD'
    });

    $('.time-picker').datetimepicker({
        format: 'LT'
    });
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
date_book-0.1.4 app/assets/javascripts/date_book/event_form.js
date_book-0.1.3 app/assets/javascripts/date_book/event_form.js
date_book-0.1.1 app/assets/javascripts/date_book/event_form.js
date_book-0.1.0 app/assets/javascripts/date_book/event_form.js
date_book-0.0.6 app/assets/javascripts/date_book/event_form.js
date_book-0.0.5 app/assets/javascripts/date_book/event_form.js
date_book-0.0.3 app/assets/javascripts/date_book/event_form.js
date_book-0.0.2 app/assets/javascripts/date_book/event_form.js
date_book-0.0.1 app/assets/javascripts/date_book/event_form.js