Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
fixed a bug with the theme repository, updated themes to all use a un…
Browse files Browse the repository at this point in the history
…iform js/stylesheet include method (that needs to be beefed up to not be wasteful)
  • Loading branch information
Josh Adams committed Dec 26, 2008
1 parent 70a9da8 commit dd6e59b
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 2 deletions.
8 changes: 8 additions & 0 deletions app/helpers/application_helper.rb
@@ -1,5 +1,13 @@
module ApplicationHelper

def manage_ansuz_javascripts
render :partial => 'shared/javascripts'
end

def manage_ansuz_stylesheets
render :partial => 'shared/stylesheets'
end

def current_database
begin
ActiveRecord::Base.connection().current_database
Expand Down
6 changes: 6 additions & 0 deletions app/views/shared/_javascripts.html.erb
@@ -0,0 +1,6 @@
<%= javascript_include_tag :defaults, 'effects', 'builder', 'lightbox', 'niftycube', 'handle_rounded_corners', 'jquery', 'jquery.scrollable.js', 'jquery.cycle.all.pack.js', 'fckeditor/fckeditor', 'jquery.jsgal.js', 'jquery.popeye-0.2.1.js' -%>
<%= javascript_include_tag "jquery.lightbox-0.5.js", "jquery.lightbox.handler.js" %>
<%= javascript_tag "jQuery.noConflict();" -%>
<%= javascript_include_tag 'jqModal', 'jquery.growl.js', 'ansuz/growls', 'jquery.feedreader.js', 'jquery.cycle.all.pack.js' -%>
<!--[if lt IE 7.]><%= javascript_include_tag 'pngfix.js' %><![endif]-->
<%= handle_forum_header %>
8 changes: 8 additions & 0 deletions app/views/shared/_stylesheets.html.erb
@@ -0,0 +1,8 @@
<%= stylesheet_link_tag 'yui-reset-fonts' -%>
<%= stylesheet_link_tag 'sprite' -%>
<%= stylesheet_link_tag 'lightbox' -%>
<%= stylesheet_link_tag 'scrollable-view' %>
<%= stylesheet_link_tag 'grid-lists' %>
<%= stylesheet_link_tag 'jquery.lightbox-0.5.css' %>
<%= stylesheet_link_tag 'jquery.popeye.css' %>
<%= stylesheet_link_tag 'galimg' %>
2 changes: 1 addition & 1 deletion public/themes/isotope11/stylesheets/base.css
Expand Up @@ -299,7 +299,7 @@ ul#top-nav{
}

.testimonial .content{
font-size: 1.3em;
font-size: 1.1em;
}
.testimonial .attributed_to{
font-style: oblique;
Expand Down
@@ -0,0 +1,21 @@
require 'ansuz/j_adams/theme_repository_manager'

module Ansuz
module JAdams
class AnsuzTheme < ActiveRecord::Base
validates_uniqueness_of :name

before_save :clean_up_name
after_save :update_theme_repository_xml
# FIXME: The theme installer and repository plugins are intermingled and gross

def update_theme_repository_xml
Ansuz::JAdams::ThemeRepositoryManager.write_file
end

def clean_up_name
self.name = self.name.gsub(/ /, '_')
end
end
end
end
Expand Up @@ -2,7 +2,7 @@ class Admin::AnsuzThemesController < Admin::BaseController
unloadable # This is required if you subclass a controller provided by the base rails app

layout 'admin'
before_filter :load_ansuz_theme, :only => [:show, :edit, :update]
before_filter :load_ansuz_theme, :only => [:show, :edit, :update, :destroy]
before_filter :load_new_ansuz_theme, :only => [:new, :create]
before_filter :load_ansuz_themes, :only => [:index]

Expand Down

0 comments on commit dd6e59b

Please sign in to comment.