Sha256: 49144b35b1e81f0f3f59374f5a2cc346f5f68d03391f73aac6ae453582d2f8b2

Contents?: true

Size: 1.67 KB

Versions: 13

Compression:

Stored size: 1.67 KB

Contents

I"¦(function() {
  var loadDatePicker, loadDatetimePicker, loadTimePicker, setDatePickerOptions, setPickerOptions;

  loadDatePicker = function() {
    return $("input.datepicker").each(function(i) {
      var defOpts;
      defOpts = {
        altFormat: "yy-mm-dd",
        altField: $(this).next(),
        changeYear: true,
        changeMonth: true
      };
      return setDatePickerOptions(this, defOpts);
    });
  };

  loadTimePicker = function() {
    return $("input.timepicker").each(function(i) {
      var defOpts;
      defOpts = {
        timeOnly: true,
        altField: $(this).next(),
        altFieldTimeOnly: false,
        defaultValue: this.value
      };
      return setPickerOptions(this, defOpts);
    });
  };

  loadDatetimePicker = function() {
    return $("input.datetimepicker").each(function(i) {
      var defOpts;
      defOpts = {
        altField: $(this).next(),
        altFieldTimeOnly: false,
        altFormat: "yy-mm-dd",
        altTimeFormat: "HH:mm"
      };
      return setPickerOptions(this, defOpts);
    });
  };

  Window.bindHDPickers = function() {
    loadDatePicker();
    loadTimePicker();
    return loadDatetimePicker();
  };

  $(document).on('ready page:load', function() {
    return Window.bindHDPickers();
  });

  setPickerOptions = function(input, defOpts) {
    var allOpts, userOpts;
    userOpts = $(input).data();
    allOpts = $.extend({}, defOpts, userOpts);
    return $(input).datetimepicker(allOpts);
  };

  setDatePickerOptions = function(input, defOpts) {
    var allOpts, userOpts;
    userOpts = $(input).data();
    allOpts = $.extend({}, defOpts, userOpts);
    return $(input).datepicker(allOpts);
  };

}).call(this);
:ET

Version data entries

13 entries across 5 versions & 1 rubygems

Version Path
hot_date_rails-1.5.7 spec/dummy/tmp/cache/assets/sprockets/v3.0/Bh/bHr1Gb1-PMXEOPqc_mktuLBpJL7qq4HWdlEfJFvZIuU.cache
hot_date_rails-1.5.7 spec/dummy/tmp/cache/assets/sprockets/v3.0/SO/SOmuRfc7eSjSuewShhCwtZ5ibVhetbRl-jdB8_wXvd4.cache
hot_date_rails-1.5.7 spec/dummy/tmp/cache/assets/sprockets/v3.0/Mg/Mg_Eiq_vV_id6PDAQKbU-FJOlUQt2EjwHpEeKt1dXEw.cache
hot_date_rails-1.5.6 spec/dummy/tmp/cache/assets/sprockets/v3.0/SO/SOmuRfc7eSjSuewShhCwtZ5ibVhetbRl-jdB8_wXvd4.cache
hot_date_rails-1.5.6 spec/dummy/tmp/cache/assets/sprockets/v3.0/Bh/bHr1Gb1-PMXEOPqc_mktuLBpJL7qq4HWdlEfJFvZIuU.cache
hot_date_rails-1.5.6 spec/dummy/tmp/cache/assets/sprockets/v3.0/Mg/Mg_Eiq_vV_id6PDAQKbU-FJOlUQt2EjwHpEeKt1dXEw.cache
hot_date_rails-1.5.5 spec/dummy/tmp/cache/assets/sprockets/v3.0/bH/bHr1Gb1-PMXEOPqc_mktuLBpJL7qq4HWdlEfJFvZIuU.cache
hot_date_rails-1.5.5 spec/dummy/tmp/cache/assets/sprockets/v3.0/Mg/Mg_Eiq_vV_id6PDAQKbU-FJOlUQt2EjwHpEeKt1dXEw.cache
hot_date_rails-1.5.5 spec/dummy/tmp/cache/assets/sprockets/v3.0/SO/SOmuRfc7eSjSuewShhCwtZ5ibVhetbRl-jdB8_wXvd4.cache
hot_date_rails-1.5.4 spec/dummy/tmp/cache/assets/sprockets/v3.0/SO/SOmuRfc7eSjSuewShhCwtZ5ibVhetbRl-jdB8_wXvd4.cache
hot_date_rails-1.5.4 spec/dummy/tmp/cache/assets/sprockets/v3.0/Mg/Mg_Eiq_vV_id6PDAQKbU-FJOlUQt2EjwHpEeKt1dXEw.cache
hot_date_rails-1.5.4 spec/dummy/tmp/cache/assets/sprockets/v3.0/Bh/bHr1Gb1-PMXEOPqc_mktuLBpJL7qq4HWdlEfJFvZIuU.cache
hot_date_rails-1.5.3 spec/dummy/tmp/cache/assets/sprockets/v3.0/Mg/Mg_Eiq_vV_id6PDAQKbU-FJOlUQt2EjwHpEeKt1dXEw.cache