lib/sproutcore/helpers/static_helper.rb
# This method will return the HTML to link to all the javascripts
# required by the client.  If you pass no options, the current client
# will be used.
#
# client_name = the name of the client to render or nil to use the
# current :language => the language to render. defaults to @language.
#
This method will return the HTML to link to all the javascripts
required by the client.  If you pass no options, the current client
will be used.

client_name = the name of the client to render or nil to use the
current :language => the language to render. defaults to @language.
This method will return the HTML to link to all the javascripts required by the client . If you pass no options the current client will be used . client_name = the name of the client to render or nil to use the current : language = > the language to render . defaults to @language .
def javascripts_for_client(bundle_name = nil, opts = {})
        opts[:language] ||= language
        opts[:platform] ||= platform
        cur_bundle = bundle_name.nil? ? bundle : library.bundle_for(bundle_name)
        all_bundles = cur_bundle.all_required_bundles
        urls = []
        all_bundles.each do |b|
          urls += b.sorted_javascript_entries(opts).map { |x| x.cacheable_url }
        end
        all_bundles.each do |b|
          urls += b.javascript_libs.reject { |lib| urls.include? lib } if b.javascript_libs
        end
        urls = urls.map do |url|
          %(  <script type="text/javascript" src="#{url}"></script>)
        end
        urls << %(<script type="text/javascript">String.preferredLanguage = "#{language}";</script>)
        urls.join("\n")
      end
def javascripts_for_client ( bundle_name = nil , opts = { } ) opts [ :language ] ||= language opts [ :platform ] ||= platform cur_bundle = bundle_name . nil? ? bundle : library . bundle_for ( bundle_name ) all_bundles = cur_bundle . all_required_bundles urls = [ ] all_bundles . each do | b | urls += b . sorted_javascript_entries ( opts ) . map { | x | x . cacheable_url } end all_bundles . each do | b | urls += b . javascript_libs . reject { | lib | urls . include? lib } if b . javascript_libs end urls = urls . map do | url | %(  <script type="text/javascript" src="#{url}"></script>) end urls << %(<script type="text/javascript">String.preferredLanguage = "#{language}";</script>) urls . join ( "\n" ) end
This method will return the HTML to link to all the javascripts
required by the client.
This method will return the HTML to link to all the javascripts required by the client .
# Get bundle # Convert to a list of required bundles # For each bundle, get the ordered list of stylsheet urls # Convert to HTML and return # Add preferred language definition...
bundle_name
<not_specific>
opts
<not_specific>