Class: ActiveScaffold::Bridges::DatePicker

Inherits:
DataStructures::Bridge show all
Defined in:
lib/active_scaffold/bridges/date_picker.rb,
lib/active_scaffold/bridges/date_picker/helper.rb

Defined Under Namespace

Modules: Helper

Class Method Summary collapse

Methods inherited from DataStructures::Bridge

install?, javascripts, run, stylesheets

Class Method Details

.installObject



5
6
7
# File 'lib/active_scaffold/bridges/date_picker.rb', line 5

def self.install
  require File.join(File.dirname(__FILE__), "date_picker/ext.rb")
end

.localizationObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/active_scaffold/bridges/date_picker.rb', line 9

def self.localization
    "jQuery(function($){
  if (typeof($.datepicker) === 'object') {
#{Helper.date_options_for_locales}
$.datepicker.setDefaults($.datepicker.regional['#{::I18n.locale}']);
  }
  if (typeof($.timepicker) === 'object') {
#{Helper.datetime_options_for_locales}
$.timepicker.setDefaults($.timepicker.regional['#{::I18n.locale}']);
  }
});\n"        
end