Permalink
Browse files

embed theme name in environment

  • Loading branch information...
1 parent f74121b commit 280910d81d6376f759d9329757fc6f6ca8dc4037 Charles Jolley committed Jan 12, 2010
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/sproutcore/helpers/static_helper.rb
@@ -151,12 +151,13 @@ def bootstrap(opts = {})
opts[:env].each { |k,v| env[k.to_s] = v }
end
- env['mode'] ||= builder_mode
- env['app'] ||= target.target_name.to_s[1..-1]
- env['lang'] ||= self.manifest.language
-
+ env['mode'] ||= builder_mode
+ env['app'] ||= target.target_name.to_s[1..-1]
+ env['lang'] ||= self.manifest.language
+ env['theme'] ||= theme_name(:default => 'sc-theme')
+
env = env.to_json
- ret << %(<script type="text/javascript">\nENV = #{env};\n</script>)
+ ret << %(<script type="text/javascript">\nvar ENV = #{env};\n</script>)
end
return ret * "\n"

0 comments on commit 280910d

Please sign in to comment.