Pickdate and some better general foundation styling
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
base_dir = File.dirname(File.expand_path(__FILE__))
|
||||
Dir.glob(File.join(base_dir, 'original','*.js.orig')).each do |orig_file|
|
||||
content = File.read(orig_file)
|
||||
locale = File.basename(orig_file)[0,2]
|
||||
content.gsub!(/^ /, ' ')
|
||||
content.sub!(/(jQuery|\$).extend\( (jQuery|\$).fn.pickadate.defaults, /, "$pickadate_translations['#{locale}'] = ")
|
||||
content.sub!(/format: '([^']+)',$/){ "format: 'yyyy-mm-dd',\n displayFormat: '#{Regexp.last_match[1]}',"}
|
||||
content.sub! '});', '};'
|
||||
content.sub! "formatSubmit: 'yyyy/mm/dd'", "formatSubmit: 'yyyy-mm-dd'"
|
||||
File.open(File.join(base_dir, "#{locale}.js"), 'w+'){|f| f.puts content}
|
||||
end
|
||||
Reference in New Issue
Block a user