restore production settings + fix broken tests + apply the coding convention on the recently modified haml file

This commit is contained in:
did 2011-07-23 01:26:16 +02:00
parent 13e247691f
commit e2b68ba861
13 changed files with 112 additions and 108 deletions

View File

@ -11,7 +11,7 @@
- if can? :create, Page
- content_for :buttons do
= admin_button_tag :new, new_admin_page_url, :class => 'new', :id => "newpage"
= admin_button_tag :new, new_admin_page_url, :class => 'new', :id => 'newpage'
%p!= t('.help')

View File

@ -4,12 +4,12 @@
#global-actions-bar
!= t('.welcome', :name => link_to(current_admin.name, edit_admin_my_account_url))
%span= '|'
= link_to t('.see'), current_site_url, :id => "viewsite_ele", :target => "_blank"
= link_to t('.see'), current_site_url, :id => 'viewsite', :target => '_blank'
- if multi_sites? && current_admin.sites.size > 1
%span= '|'
= link_to t('.switch'), '#', :id => 'sites-picker-link'
%span= '|'
= link_to 'Help', '#', :class => "tutorial", :id => "help"
= link_to 'Help', '#', :class => 'tutorial', :id => 'help'
%span= '|'
= link_to t('.logout'), destroy_admin_session_url, :confirm => t('admin.messages.confirm')

View File

@ -1,10 +1,10 @@
embed_assets: off
# compress_assets: off
# package_assets: off
s3_bucket: <%= ENV['S3_BUCKET'] %>
s3_access_key_id: <%= ENV['S3_KEY_ID'] %>
s3_secret_access_key: <%= ENV['S3_SECRET_KEY'] %>
# compress_assets: off
# package_assets: off
javascripts:
box:

View File

@ -7,7 +7,7 @@ Locomotive::Application.configure do
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = false
config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
@ -29,7 +29,7 @@ Locomotive::Application.configure do
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = true
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"

View File

@ -15,8 +15,8 @@ Background:
Scenario: I do not want my content form to have n duplicated fields if I submit n times the content type form with errors (bug)
When I go to the "Projects" model edition page
And I fill in "Name" with ""
And I press "Update"
And I press "Update"
And I press "Update"
And I press "Save"
And I press "Save"
And I press "Save"
When I follow "new item"
Then I should see once the "Name" field

View File

@ -42,7 +42,7 @@ Scenario: Update an existing entry
When I go to the "Projects" model list page
And I follow "My sexy project"
When I fill in "Name" with "My other sexy project (UPDATED)"
And I press "Update"
And I press "Save"
Then I should see "Content was successfully updated."
When I go to the "Projects" model list page
Then I should see "My other sexy project (UPDATED)"
@ -51,7 +51,7 @@ Scenario: Update an invalid entry
When I go to the "Projects" model list page
And I follow "My sexy project"
When I fill in "Name" with ""
And I press "Update"
And I press "Save"
Then I should not see "Content was successfully updated."
Scenario: Destroy an entry

View File

@ -28,6 +28,6 @@ Scenario: Updating a valid page
And I follow "Home page"
And I fill in "page_title" with "Home page !"
And I fill in "Raw template" with "My new content is here"
And I press "Update"
And I press "Save"
Then I should see "Page was successfully updated."
And I should have "My new content is here" in the index page

View File

@ -34,6 +34,6 @@ Scenario: Updating a Snippet that includes another snippet
When I go to theme assets
And I follow "yield"
And I fill in "snippet_template" with "{% include 'other' %}"
And I press "Update"
And I press "Save"
Then I should see "Snippet was successfully updated."
And I should have "{% include 'other' %}" in the yield snippet

View File

@ -35,7 +35,7 @@ Scenario: Updating a stylesheet
When I go to theme assets
And I follow "stylesheets/application.css"
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
And I press "Update"
And I press "Save"
Then I should see "File was successfully updated."
And I should see "Editing application.css"
And I should see "application.css"
@ -56,7 +56,7 @@ Scenario: Updating a javascript
When I go to theme assets
And I follow "javascripts/application.js"
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
And I press "Update"
And I press "Save"
Then I should see "File was successfully updated."
Scenario: Uploading an image which already exists

View File

@ -319,7 +319,7 @@ $(document).ready(function(){
}
guiders.createGuider({
attachTo: "#viewsite_ele",
attachTo: "#viewsite",
buttons: [],
description: "This will open a new tab in your browser and take you to the 'frontend' of your site. The frontend is what other visitors to your site will see. Come back to this tab in your browser to continue the guide.",
id: "viewsite2",
@ -328,8 +328,8 @@ $(document).ready(function(){
width: 280,
title: "Click Here To View Your Site",
onShow: function(){
console.log("binding click for view site", $('#viewsite_ele'));
$('#viewsite_ele').bind('click', viewSiteClick);
console.log("binding click for view site", $('#viewsite'));
$('#viewsite').bind('click', viewSiteClick);
}
});
@ -561,7 +561,7 @@ $(document).ready(function(){
});
guiders.createGuider({
attachTo: "#viewsite_ele",
attachTo: "#viewsite",
buttons: [{name: "Close", onclick: guiders.hideAll}],
description: "This will take you to the 'frontend' of your site. Where you can see what users visiting your site see.",
id: "viewsite",

View File

@ -1,3 +1,7 @@
if (typeof window.console === 'undefined') {
window.console = { log: function() { return false; } };
}
function makeSlug(val, sep) { // code largely inspired by http://www.thewebsitetailor.com/jquery-slug-plugin/
if (typeof val == 'undefined') return('');
if (typeof sep == 'undefined') sep = '_';