Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Legacy Admin Layout #2127

Merged
merged 7 commits into from
Aug 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

- The all configuration objects now use static preferences by default. It's no longer necessary to call `use_static_preferences!`, as that is the new default. For the old behaviour of loading preferences from the DB, call `config.use_legacy_db_preferences!`. [\#2112](https://github.com/solidusio/solidus/pull/2112) ([jhawthorn](https://github.com/jhawthorn))

- Remove Skeleton Grid CSS from the admin and complete its transition to Bootstrap. [\#2127](https://github.com/solidusio/solidus/pull/2127) ([graygilmore](https://github.com/graygilmore))

## Solidus 2.3.0 (unreleased)

- Rails 5.1 [\#1895](https://github.com/solidusio/solidus/pull/1895) ([jhawthorn](https://github.com/jhawthorn))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,18 @@
body:not(.new-layout) #sidebar {
overflow: visible;
margin-top: 1.5rem;
.content-sidebar {
padding-top: 0.65rem;

.sidebar-title {
color: $color-2;
text-align: center;
font-size: 16px;
font-weight: $font-weight-bold;
border-top: 1px solid $color-border;

> span {
display: inline;
background: #fff;
padding: 5px 10px;
position: relative;
top: -14px;

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}

dl {
dt, dd {
min-height: 3em;
}
.has-tabs & {
padding-top: 3.25rem;
}

@media print { display: none }
}

body.new-layout .content-sidebar {
ul {
padding-left: 0;
}
}

body.new-layout .sidebar-title {
@include line-through();
.sidebar-title {
@include line-through($color: $color-border);
color: $color-2;
font-size: 14px;
font-weight: $font-weight-normal;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.style-guide {
padding-left: 0; // override regular admin layout
display: flex;

&-sidebar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
border-bottom: 1px solid $color-border;
height: $main-header-height;

body:not(.new-layout) & {
margin-left: $width-sidebar;
}

@media print { display: none }
}

Expand Down
25 changes: 3 additions & 22 deletions backend/app/assets/stylesheets/spree/backend/shared/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ html {
body {
position: relative;
min-height: 100%;

&.new-layout {
padding-left: $width-sidebar;
}
padding-left: $width-sidebar;
}

.admin-nav {
Expand All @@ -18,32 +15,16 @@ body {
}

.content-wrapper {
body:not(.new-layout) & {
margin-left: $width-sidebar;
@media print { margin-left: 0 }
}

body.new-layout & {
@include padding(1rem map-get($grid-gutter-widths, "xl") null);
}
@include padding(1rem map-get($grid-gutter-widths, "xl") null);

&.centered {
&:not(.full-width) {
@include margin(null auto);
max-width: map-get($container-max-widths, "xl");
}
}

.content-main {
@include make-col(12);
overflow-x: hidden; // makes sure that the tabs are able to resize

.has-sidebar & {
@include make-col(9);
}
}

.content-sidebar {
@include make-col(3);
}

#content {
Expand Down
242 changes: 0 additions & 242 deletions backend/app/assets/stylesheets/spree/backend/shared/_skeleton.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@import 'spree/backend/globals/mixins';

@import 'spree/backend/shared/skeleton';
@import 'spree/backend/shared/typography';
@import 'spree/backend/shared/images';
@import 'spree/backend/shared/tables';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="field alpha omega eight columns">
<div class="form-group">
<%= label_tag "#{param_prefix}_preferred_role_ids", Spree.t('user_role_rule.choose_roles') %>
<%= select_tag "#{param_prefix}[preferred_role_ids]",
options_from_collection_for_select(
Spree::Role.all, :id, :name, promotion_rule.preferred_role_ids
), class: 'custom-select fullwidth', multiple: true %>
</div>
<div class="field alpha omega eight columns">
<div class="form-group">
<label>
<%= Spree.t('user_role_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::UserRole::MATCH_POLICIES.map{ |s| [Spree.t("user_role_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), { class: 'custom-select'})).html_safe %>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<fieldset>
<legend align='center'><%= Spree.t(:tracking_info) %></legend>
<%= form_for [:admin, @stock_transfer] do |f| %>
<div class='field-block alpha'>
<div class='field-block'>
<div class='field'>
<%= f.label :tracking_number %>
<%= f.text_field :tracking_number, value: @stock_transfer.tracking_number, maxlength: 255, size: 0, class: 'fullwidth' %>
Expand Down
Loading