19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/orange-sparkles/sparkles_app.rb', line 19
def stack_init
@core.template_chooser do |packet|
if [:admin, :orange].include?(packet['route.context'])
packet.add_css('sparkles-admin.css', :position => 0, :module => '_sparkles_')
packet.add_css('colorbox.css', :module => '_sparkles_')
packet.add_css('smoothness/jquery-ui-1.7.2.custom.css', :module => '_sparkles_')
packet.add_js('markitup/sets/markdown/set.js', :module => '_sparkles_')
packet.add_js('markitup/jquery.markitup.pack.js', :module => '_sparkles_')
packet.add_js('autoresize.jquery.min.js', :module => '_sparkles_')
packet.add_js('jquery-ui-1.7.2.custom.min.js', :module => '_sparkles_')
%w(form colorbox tools.min tablesorter tablesorter.pager).each do |js|
packet.add_js("jquery.#{js}.js", :module => '_sparkles_')
end
packet.add_js('admin.js', :module => '_sparkles_')
orange.fire(:view_admin, packet)
'sparkles-admin.haml'
elsif(packet['route.path'] == '/')
['reset', 'text'].each{|c| packet.add_css("#{c}.css", :module => '_sparkles_')}
['main'].each{|c| packet.add_css("#{c}.css", :module => '_sparkles_')} if orange[:sparkles].default_style?
'home.haml'
else
['reset', 'text'].each{|c| packet.add_css("#{c}.css", :module => '_sparkles_')}
['main'].each{|c| packet.add_css("#{c}.css", :module => '_sparkles_')} if orange[:sparkles].default_style?
'subpage.haml'
end
end end
|