This commit is contained in:
Will Marshall
2014-05-09 10:16:26 +10:00
18 changed files with 10 additions and 1679 deletions

View File

@@ -69,7 +69,6 @@ group :test, :development do
gem 'shoulda-matchers'
gem 'factory_girl_rails', :require => false
gem 'capybara'
gem 'capybara-screenshot'
gem 'database_cleaner', '0.7.1', :require => false
gem 'simplecov', :require => false
gem 'awesome_print'

View File

@@ -167,9 +167,6 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-screenshot (0.3.19)
capybara (>= 1.0, < 3)
launchy
celluloid (0.15.2)
timers (~> 1.1.0)
chunky_png (1.3.0)
@@ -492,7 +489,6 @@ DEPENDENCIES
aws-sdk
bugsnag
capybara
capybara-screenshot
coffee-rails (~> 3.2.1)
comfortable_mexican_sofa
compass-rails

View File

@@ -1,9 +0,0 @@
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require ./foundation_and_overrides
*= require ./gmaps4rails
*= require_tree .
*/

View File

@@ -1,34 +0,0 @@
@import "foundation4/foundation/variables";
@import "foundation4/foundation/components/global";
ul.ui-autocomplete {
position: absolute;
list-style: none;
margin: 0;
padding: 0;
border: solid 1px #999;
cursor: default;
li {
background-color: #FFF;
border-top: solid 1px #DDD;
margin: 0;
padding: 0;
font-size: 0.7em;
a {
color: #000;
display: block;
padding: 3px;
&:visited {
color: #000;
}
&:hover {
color: $primary-color
}
}
a.ui-state-hover, a.ui-state-active {
background-color: #FFFCB2;
}
}
}

View File

@@ -1,16 +0,0 @@
@import "foundation4/foundation/variables";
@import "foundation4/foundation/components/global";
.search-result {
min-height: 3em;
padding: 15px 0;
.secondary-info {
font-size: 0.8em;
color: #b7b7b7;
}
}
.with-separator {
border-bottom: 1px solid #E0E0E0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +0,0 @@
.map_container {
padding: 6px;
border-width: 1px;
border-style: solid;
border-color: #ccc #ccc #999 #ccc;
-webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
-moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
width: 645px;
}
.gmaps4rails_map {
width: 630px;
height: 530px;
}
.map_container img {
max-width: none;
}

View File

@@ -1,125 +0,0 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
@import "foundation4/foundation/variables";
@import "foundation4/foundation/components/global";
@import "foundation4/foundation/components/buttons";
@import "foundation4/foundation/components/panels";
#postcode_select_box {
text-align: center;
padding: 18% 0;
p {
color: white;
font-size: 1.1em;
}
input {
font-size: 2em;
}
.button-huge {
$padding: emCalc(21);
$bg: $primary-color;
$radius: true;
$full-width: false;
$disabled: false;
$is-input: false;
@include button($padding, $bg, $radius, $full-width, $disabled, $is-input);
}
a {
&:link {
color: #FFF;
}
&:visited {
color: #FFF;
}
&:hover {
color: $primary-color;
}
}
}
.backstretch img {
opacity: 0.4;
filter: alpha(opacity=40);
}
.bgwidth {
width: 100%;
}
.bgheight {
height: 100%;
}
#home-page-nav
{
ul {
margin: 0;
padding: 0;
li {
list-style-type: none;
display: inline;
font-size: 1.2em;
font-weight: bold;
color: #FFF;
&:before {
content: " | ";
}
&:first-child {
&:before {
content: none;
}
}
}
}
}
#sidebar {
border: none;
}
.login-panel {
$bg: #222;
$padding: emCalc(20);
$adjust: true;
@include panel($bg, $padding, $adjust);
}
.centered {
text-align: center;
}
#logo-container {
margin-bottom: emCalc(25);
}
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}

View File

@@ -1,51 +0,0 @@
/* Off canvas layout CSS/JS provided by or adapted from work by Jason Weaver and Luke Wroblewski Requires globals.css grid.css */
body.off-canvas { padding: 0; margin: 0; overflow: hidden}
.container { width: 100%; }
.row { overflow: hidden; }
.row .row { overflow: visible; }
.paneled .container { overflow: hidden; }
.paneled .row { width: 100%; }
[role="main"]:before { content: " "; position: absolute; z-index: -1; top: 0; left: -100%; width: 100%; height: 100%; }
[role="complementary"], [role="main"] { width: 100%; padding: 0 15px; display: block; position: relative; z-index: 1; -webkit-transition: 0.25s all ease-in; -moz-transition: 0.25s all ease-in; -o-transition: 0.25s all ease-in; transition: 0.25s all ease-in; }
.paneled [role="main"] { padding: 0; }
.page-panel { width: 100%; padding: 0 15px; -webkit-transition: 0.3s margin ease-in-out; -moz-transition: 0.3s margin ease-in-out; -o-transition: 0.3s margin ease-in-out; transition: 0.3s margin ease-in-out; background: #fff; }
#switchPanels { margin: 0 -15px; }
.hide-extras [role="complementary"] { display: block; }
[role="navigation"]#topMenu { -webkit-transition: 0.25s all ease-in; -moz-transition: 0.25s all ease-in; -o-transition: 0.25s all ease-in; transition: 0.25s all ease-in; }
[role="navigation"]#topMenu ul { margin-top: 0; }
[role="complementary"] { margin-left: -100%; width: 400px; float: left; z-index: 2; }
[role="main"] { margin-left: 0; float: right; z-index: 1; position: relative; }
.paneled [role="main"] { background: #fff; width: 500%; overflow: hidden; float: none; position: relative; left: 0; -webkit-transition: 0.15s all ease-in; -moz-transition: 0.15s all ease-in; -o-transition: 0.15s all ease-in; transition: 0.15s all ease-in; }
.page-panel { min-height: 400px; float: left; margin: 0; width: 20%; }
.active [role="complementary"] { margin-left: 0; }
.active [role="main"] { margin-right: -420px; }
.active-menu [role="navigation"]#topMenu { margin-top: 0 !important; }
@media all and (min-width: 768px) { menu-button, .sidebar-button { display: none; }
/*[role="complementary"] { width: 20%; margin-left: 0; float: left; padding: 0 15px; }*/
[role="main"] { width: 100%; padding: 0 15px; }
.paneled [role="main"] { width: 100%; padding: 0; background: #f4f4f4; left: 0 !important; }
.page-panel { display: block; min-height: 800px; float: none; margin: 0; width: 100%; background: #f4f4f4; }
.hide-extras [role="main"] { width: 100%; }
.hide-extras [role="complementary"] { display: none; }
[role="navigation"]#topMenu { display: none; } }

View File

@@ -1,8 +0,0 @@
@import "foundation4/foundation/variables";
@import "foundation4/foundation/components/global";
.products {
margin: 0, emCalc(20);
border: 1px solid black;
padding: emCalc(10);
}

View File

@@ -1,65 +0,0 @@
@import "foundation4/foundation/variables";
@import "foundation4/foundation/components/global";
.landing-page-row {
padding-top: emCalc(40);
padding-bottom: emCalc(30);
#environment {
font-size: 110%;
font-weight: bold;
padding: emCalc(5);
border-radius: emCalc(5);
background-color: #98ca45;
}
}
.distributor-link-row {
padding: emCalc(5) 0;
}
.with-bottom-border {
border-bottom: 1px solid #d9d9d9;
}
.with-pin-bg {
background-image: url('../pin_bg.png');
background-repeat: no-repeat;
background-position: center;
min-height: 200px;
}
a.inactive {
color: #6a6a6a;
}
.secondary {
color: #6a6a6a;
}
.group-header {
min-height: emCalc(55);
vertical-align: top;
}
@media only screen and (max-width: 768px) {
.hub_group.landing-page-row {
padding-bottom: 0px;
&.with-bottom-border {
padding-top: 0px;
}
& > .columns {
margin-bottom: 60px;
}
}
.group-header {
min-height: 0px;
}
}
.top-bar-section ul li {
float: left;
}
.top-bar-section .divider, .top-bar-section [role="separator"] {
clear: none;
width: 0px;
}

View File

@@ -5,14 +5,6 @@ class HomeController < BaseController
@active_distributors ||= Enterprise.distributors_with_active_order_cycles
end
def new_landing_page
end
def about_us
end
def temp_landing_page
@groups = EnterpriseGroup.on_front_page.by_position
render layout: false
end
end

View File

@@ -11,4 +11,4 @@
.small-2.columns.text-center
%p.pad-top -OR-
.small-5.columns.text-center
%button.neutral-btn.dark.expand{"ng-click" => "enabled = true"} Checkout as guest
%button.neutral-btn.dark.expand{"ng-click" => "enabled = true"} Checkout as guest

View File

@@ -26,7 +26,7 @@
%li.divider
- if spree_current_user.andand.has_spree_role? 'admin'
%li
%a{href: admin_path}
%a{href: spree.admin_path}
%span.nav-primary Admin
%li.divider
%section.top-bar-section

View File

@@ -17,7 +17,7 @@
- if spree_current_user.andand.has_spree_role? 'admin'
%li
%a{href: admin_path}
%a{href: spree.admin_path}
%span.nav-primary Admin
%li
- if spree_current_user.nil?

View File

@@ -1,4 +1,9 @@
object @variant
attributes :id
node( :unit_text ) { |v| v.product.name + (v.options_text.empty? ? "" : ": " + v.options_text) }
node( :unit_text ) do |v|
options_text = v.options_text
v.product.name + (options_text.empty? ? "" : ": #{options_text}")
end
node( :unit_value ) { |v| v.unit_value }

View File

@@ -10,14 +10,6 @@ feature %q{
stub_authorization!
before :all do
@default_wait_time = Capybara.default_wait_time
Capybara.default_wait_time = 10
end
after :all do
Capybara.default_wait_time = @default_wait_time
end
context "listing orders" do
before :each do
admin_user = quick_login_as_admin

View File

@@ -11,7 +11,6 @@ ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara'
require 'capybara-screenshot/rspec'
require 'database_cleaner'
# Allow connections to phantomjs/selenium whilst raising errors
@@ -46,8 +45,7 @@ Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, options)
end
Capybara.default_wait_time = 30
Capybara.default_wait_time = 5
require "paperclip/matchers"