Pickdate and some better general foundation styling

This commit is contained in:
2014-04-16 14:13:05 +02:00
parent ed27574b77
commit 3ef888a30a
100 changed files with 5429 additions and 31 deletions
@@ -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