more things

Oleg committed May 24, 2011
commit 0dda25e52708c4c67f195257036b12b12bead261
Showing 5 changed files with 8 additions and 10 deletions
app/assets/javascripts/comfortable_mexican_sofa/application.js +1 -0
@@ @@ -1,4 +1,5 @@
//= require jquery
+ //= require jquery_ujs
//= require jquery-ui
$.CMS = function(){
app/assets/stylesheets/comfortable_mexican_sofa/structure.css +2 -4
@@ @@ -84,8 +84,7 @@ input[type='button'],
input[type='submit'],
input[type='reset'],
input[type='file'],
- ul.list .action_links a,
- table.formatted td.action_links a {
+ .action_links a {
margin-left: 3px;
background-color: #b4b4b4;
color: #1b1b1b;
@@ @@ -105,8 +104,7 @@ input[type='button']:hover,
input[type='submit']:hover,
input[type='reset']:hover,
input[type='file']:hover,
- ul.list .action_links a:hover,
- table.formatted td.action_links a:hover {
+ .action_links a:hover {
box-shadow: inset 0px 0px 5px #aaa;
-moz-box-shadow: inset 0px 0px 5px #aaa;
-webkit-box-shadow: inset 0px 0px 5px #aaa;
app/controllers/cms_admin/base_controller.rb +3 -1
@@ @@ -36,6 +36,8 @@ protected
def load_fixtures
return unless ComfortableMexicanSofa.config.enable_fixtures
ComfortableMexicanSofa::Fixtures.import_all(@cms_site.hostname)
- flash.now[:error] = 'CMS Fixtures are enabled. All changes done here will be discarded.'
+ if %w(cms_admin/layouts cms_admin/pages cms_admin/snippets).member?(params[:controller])
+ flash.now[:error] = 'CMS Fixtures are enabled. All changes done here will be discarded.'
+ end
end
end
app/views/layouts/cms_admin/_head.html.erb +1 -4
@@ @@ -7,9 +7,6 @@
<%= stylesheet_link_tag 'comfortable_mexican_sofa/application' %>
<%= javascript_include_tag 'comfortable_mexican_sofa/application' %>
-
- <%= javascript_include_tag :tiny_mce %>
-
<%= yield :head %>
<%= cms_hook :html_head %>
- </head>
+ </head>
\ No newline at end of file
comfortable_mexican_sofa/form_builder.rb b/lib/comfortable_mexican_sofa/form_builder.rb +1 -1
@@ @@ -16,7 +16,7 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder
end
def default_field(type, field, options = {}, &block)
- errors = if object.errors[field].present?
+ errors = if object.respond_to?(:errors) && object.errors[field].present?
"<div class='errors'>#{[object.errors[field]].flatten.first}</div>"
end
if desc = options.delete(:desc)