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