Sha256: b3ee5dd241d3810959c99666bb79dc6f26ea0f9ac203f599f6f946f4d079623c

Contents?: true

Size: 1.44 KB

Versions: 48

Compression:

Stored size: 1.44 KB

Contents

<%# encoding: utf-8 %>
<%= ActiveScaffold::Bridges[:date_picker].localization %>
Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker_without_inlineSettings = Object.getPrototypeOf(jQuery.datepicker)._attachDatepicker;
jQuery.extend(Object.getPrototypeOf(jQuery.datepicker), {
  _attachDatepicker: function(target, settings) {
    var inlineSettings = {}, $target = jQuery(target);
    for (var attrName in this._defaults) {
      if(this._defaults.hasOwnProperty(attrName)){
        var attrValue = $target.data(attrName.toLowerCase());
        if (attrValue) {
          try {
            inlineSettings[attrName] = eval(attrValue);
          } catch (err) {
            inlineSettings[attrName] = attrValue;
          }
        }
      }
    }
    this._attachDatepicker_without_inlineSettings(target, jQuery.extend({}, settings || {}, inlineSettings));
  }
});
jQuery(document).on("focus", "input.date_picker", function(){
  var date_picker = jQuery(this);
  if (typeof(date_picker.datepicker) == 'function') {
    if (!date_picker.hasClass('hasDatepicker')) {
      date_picker.datepicker();
      date_picker.trigger('focus');
    }
  }
  return true;
});

jQuery(document).on("focus", "input.datetime_picker", function(){
  var date_picker = jQuery(this);
  if (typeof(date_picker.datetimepicker) == 'function') {
    if (!date_picker.hasClass('hasDatepicker')) {
      date_picker.datetimepicker();
      date_picker.trigger('focus');
    }
  }
  return true;
});

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
active_scaffold-3.5.0 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.43 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.42 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.41.1 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.41 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.40 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.39 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.38 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.37 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.36 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.35 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.34 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.33 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.32 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.31 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.30 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.29 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.28 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.27 app/assets/javascripts/jquery/date_picker_bridge.js.erb
active_scaffold-3.4.26 app/assets/javascripts/jquery/date_picker_bridge.js.erb