solidus_backend 2.9.5 → 2.10.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend.js +1 -0
  3. data/app/assets/javascripts/spree/backend/components/admin_nav.js +24 -0
  4. data/app/assets/javascripts/spree/backend/components/tabs.js +1 -1
  5. data/app/assets/javascripts/spree/backend/models/order.js +9 -0
  6. data/app/assets/javascripts/spree/backend/orders/cart.js +6 -0
  7. data/app/assets/javascripts/spree/backend/shipments.js +0 -62
  8. data/app/assets/javascripts/spree/backend/templates/index.js +0 -1
  9. data/app/assets/javascripts/spree/backend/views/cart/empty_cart_button.js +29 -0
  10. data/app/assets/javascripts/spree/backend/views/cart/line_item_table.js +5 -0
  11. data/app/assets/javascripts/spree/backend/views/index.js +1 -0
  12. data/app/assets/javascripts/spree/backend/views/order/address.js +7 -5
  13. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +2 -0
  14. data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +3 -3
  15. data/app/assets/stylesheets/spree/backend/components/_messages.scss +4 -0
  16. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +182 -49
  17. data/app/assets/stylesheets/spree/backend/globals/{_mixins.css → _mixins.scss} +0 -0
  18. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +2 -0
  19. data/app/assets/stylesheets/spree/backend/shared/_header.scss +5 -1
  20. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +0 -9
  21. data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
  22. data/app/controllers/spree/admin/base_controller.rb +1 -1
  23. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  24. data/app/controllers/spree/admin/payment_methods_controller.rb +4 -4
  25. data/app/controllers/spree/admin/payments_controller.rb +2 -2
  26. data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
  27. data/app/controllers/spree/admin/products_controller.rb +2 -2
  28. data/app/controllers/spree/admin/resource_controller.rb +13 -4
  29. data/app/controllers/spree/admin/style_guide_controller.rb +1 -1
  30. data/app/controllers/spree/admin/taxons/attachment_controller.rb +20 -0
  31. data/app/controllers/spree/admin/users_controller.rb +6 -2
  32. data/app/helpers/spree/admin/navigation_helper.rb +3 -2
  33. data/app/helpers/spree/promotion_rules_helper.rb +1 -1
  34. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  35. data/app/views/spree/admin/option_types/edit.html.erb +1 -1
  36. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -0
  37. data/app/views/spree/admin/orders/edit.html.erb +3 -4
  38. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  39. data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -41
  40. data/app/views/spree/admin/promotion_code_batches/new.html.erb +1 -1
  41. data/app/views/spree/admin/promotion_codes/new.html.erb +1 -1
  42. data/app/views/spree/admin/promotions/_actions.html.erb +1 -0
  43. data/app/views/spree/admin/promotions/index.html.erb +1 -1
  44. data/app/views/spree/admin/return_authorizations/new.html.erb +1 -1
  45. data/app/views/spree/admin/shared/_calculator_fields.html.erb +5 -0
  46. data/app/views/spree/admin/shared/_navigation.html.erb +3 -0
  47. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  48. data/app/views/spree/admin/shared/_order_submenu.html.erb +2 -2
  49. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +1 -1
  50. data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
  51. data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
  52. data/app/views/spree/admin/store_credit_reasons/index.html.erb +1 -1
  53. data/app/views/spree/admin/store_credits/index.html.erb +1 -1
  54. data/app/views/spree/admin/tax_rates/_form.html.erb +1 -1
  55. data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
  56. data/app/views/spree/admin/taxons/_form.html.erb +1 -5
  57. data/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb +16 -0
  58. data/app/views/spree/admin/users/_form.html.erb +12 -10
  59. data/app/views/spree/admin/users/_tabs.html.erb +1 -1
  60. data/app/views/spree/admin/users/edit.html.erb +1 -2
  61. data/app/views/spree/layouts/admin.html.erb +1 -2
  62. data/config/routes.rb +4 -6
  63. data/lib/spree/backend.rb +1 -0
  64. data/lib/spree/backend/config.rb +9 -0
  65. data/lib/spree/backend/engine.rb +5 -3
  66. data/{app/models → lib}/spree/backend_configuration.rb +5 -2
  67. data/solidus_backend.gemspec +2 -1
  68. data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +1 -1
  69. data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +2 -2
  70. data/spec/controllers/spree/admin/resource_controller_spec.rb +12 -1
  71. data/spec/controllers/spree/admin/store_credits_controller_spec.rb +1 -1
  72. data/spec/controllers/spree/admin/users_controller_spec.rb +23 -0
  73. data/spec/features/admin/configuration/payment_methods_spec.rb +11 -2
  74. data/spec/features/admin/configuration/shipping_methods_spec.rb +13 -1
  75. data/spec/features/admin/configuration/taxonomies_spec.rb +7 -0
  76. data/spec/features/admin/orders/customer_details_spec.rb +1 -2
  77. data/spec/features/admin/orders/customer_returns_spec.rb +20 -7
  78. data/spec/features/admin/orders/new_order_spec.rb +53 -5
  79. data/spec/features/admin/orders/new_refund_spec.rb +1 -1
  80. data/spec/features/admin/orders/order_details_spec.rb +14 -4
  81. data/spec/features/admin/orders/return_authorizations_spec.rb +38 -9
  82. data/spec/features/admin/products/edit/images_spec.rb +1 -1
  83. data/spec/features/admin/products/edit/taxons_spec.rb +8 -2
  84. data/spec/features/admin/products/products_spec.rb +12 -0
  85. data/spec/features/admin/promotion_adjustments_spec.rb +9 -0
  86. data/spec/features/admin/promotions/promotion_code_batches_spec.rb +37 -0
  87. data/spec/features/admin/promotions/promotion_code_spec.rb +31 -0
  88. data/spec/features/admin/taxons_spec.rb +12 -0
  89. data/spec/features/admin/users_spec.rb +18 -8
  90. data/spec/{support → fixtures/files}/ror_ringer.jpeg +0 -0
  91. data/spec/{models → lib}/spree/backend_configuration/menu_item_spec.rb +0 -0
  92. data/spec/{models → lib}/spree/backend_configuration_spec.rb +0 -0
  93. data/spec/spec_helper.rb +1 -0
  94. data/spec/support/feature/base_feature_helper.rb +6 -1
  95. data/spec/teaspoon_env.rb +8 -23
  96. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_variables.scss +1 -1
  97. metadata +33 -14
  98. data/app/assets/javascripts/spree/backend/templates/variants/autocomplete_stock.hbs +0 -56
  99. data/app/views/spree/admin/orders/_add_product.html.erb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eca987b7ea7a9be0e07d92cc8bc31679a31c0d8aed33be591994115b2532476f
4
- data.tar.gz: 0d334617893cb6e022c3c9edc6bb84a6f89687fe2505c2500c6539f4f9545112
3
+ metadata.gz: a09acbd6ce6806f5fb9a87ff962539770a7dc7f2f5a9fd4a7b58be1d3b66e0e3
4
+ data.tar.gz: 65cc0bee30dce620cb75020035dffbb94c06a3b05d1b83131dacccbe635416b6
5
5
  SHA512:
6
- metadata.gz: 62a87d30798c57a68159c339fd97549684d57d29fa2abd49f6938918b13de4b98c1d803b2f78e658f210160d9669472e07cdfb2e80cdb4313f0bb738dc90459f
7
- data.tar.gz: 919d469c326ae9f9cadb644b448c104f0c89d99978f6b612c232842df81377b246fa2690919e13715cfdbdd53fc6c6098059a6135ca278a49bf7465872cb0b71
6
+ metadata.gz: 63967d408b975dcbc6b20f540aa670d200e554bef9647fb110c5bf72a35113cda728090edb66f8705d513af7c1388dc58ecf933e3046b2761e1b40c46ccc0541
7
+ data.tar.gz: '068216e34e1c219f5090a3e7e56b2296bfbbeb7ca6eb1630897535bdcf2db3ed26003bad3e2433acdb061037b42a05cdfe55dd80392ea6c0e4080edfbcb666fb'
@@ -30,6 +30,7 @@
30
30
  //= require spree/backend/components/tooltips
31
31
  //= require spree/backend/components/editable_table
32
32
  //= require spree/backend/components/sortable_table
33
+ //= require spree/backend/components/admin_nav
33
34
  //= require spree/backend/datepicker
34
35
  //= require spree/backend/flash
35
36
  //= require spree/backend/gateway
@@ -0,0 +1,24 @@
1
+ Spree.ready(function() {
2
+ if (window.screen.width <= 1024 && !document.cookie.includes("admin_nav_hidden")) {
3
+ // Set default nav to collapse on small screens - but don't override user preference
4
+ document.body.classList.add("admin-nav-hidden");
5
+ document.cookie = "admin_nav_hidden=true; expires=Fri, 31 Dec 9999 23:59:59 GMT";
6
+ }
7
+
8
+ var adminNavToggle = document.querySelector("#admin-nav-toggle");
9
+
10
+ if (adminNavToggle) {
11
+ adminNavToggle.addEventListener("click", function(e) {
12
+ e.preventDefault();
13
+ document.body.classList.toggle("admin-nav-hidden");
14
+ $(document.body).trigger("sticky_kit:recalc");
15
+ adminNavToggle.classList.toggle("fa-chevron-circle-left");
16
+ adminNavToggle.classList.toggle("fa-chevron-circle-right");
17
+ document.cookie = "admin_nav_hidden=" + document.body.classList.contains("admin-nav-hidden") + "; expires=Fri, 31 Dec 9999 23:59:59 GMT";
18
+ });
19
+ }
20
+
21
+ if (document.body.classList.contains('admin-nav-hidden')) {
22
+ $(adminNavToggle).removeClass('fa-chevron-circle-left').addClass('fa-chevron-circle-right');
23
+ }
24
+ });
@@ -22,7 +22,7 @@ Tabs = (function() {
22
22
  });
23
23
  this.totalTabsWidth = this.tabWidths.reduce(function(previousValue, currentValue) {
24
24
  return previousValue + currentValue;
25
- });
25
+ }, 0);
26
26
 
27
27
  window.addEventListener("resize", this.overflowTabs);
28
28
  this.overflowTabs();
@@ -21,6 +21,15 @@ Spree.Models.Order = Backbone.Model.extend({
21
21
  };
22
22
  _.extend(options, opts);
23
23
  return this.fetch(options)
24
+ },
25
+
26
+ empty: function (opts) {
27
+ var options = {
28
+ url: Spree.routes.orders_api + "/" + this.id + "/empty",
29
+ type: 'PUT',
30
+ };
31
+ _.extend(options, opts);
32
+ return this.fetch(options)
24
33
  }
25
34
  });
26
35
 
@@ -19,6 +19,12 @@ Spree.Order.initCartPage = function(order_number) {
19
19
  collection: collection
20
20
  });
21
21
 
22
+ new Spree.Views.Cart.EmptyCartButton({
23
+ el: $('.js-empty-cart'),
24
+ collection: collection,
25
+ model: order
26
+ });
27
+
22
28
  new Spree.Views.Order.DetailsTotal({
23
29
  el: $('#order-total'),
24
30
  model: order
@@ -1,42 +1,6 @@
1
1
  // Shipments AJAX API
2
2
  /* eslint no-extra-semi: "off", no-unused-vars: "off" */
3
3
 
4
- var ShipmentAddVariantView = Backbone.View.extend({
5
- events: {
6
- "change #add_variant_id": "onSelect",
7
- "click .add_variant": "onAdd",
8
- "submit form": "onAdd"
9
- },
10
- onSelect: function(e) {
11
- var variant_id = this.$("#add_variant_id").val();
12
- var template = HandlebarsTemplates["variants/autocomplete_stock"];
13
- var $stock_details = this.$('#stock_details');
14
- Spree.ajax({
15
- url: Spree.routes.variants_api + "/" + variant_id,
16
- success: function(variant){
17
- $stock_details.html(template({variant: variant})).show()
18
- }
19
- });
20
- },
21
- onAdd: function(e){
22
- e.preventDefault();
23
-
24
- this.$('#stock_details').hide();
25
-
26
- var variant_id = this.$('input.variant_autocomplete').val();
27
- var stock_location_id = $(e.target).data('stock-location-id');
28
- var quantity = this.$("input.quantity[data-stock-location-id='" + stock_location_id + "']").val();
29
-
30
- addVariantFromStockLocation(stock_location_id, variant_id, quantity)
31
- }
32
- });
33
-
34
- Spree.ready(function(){
35
- $(".js-shipment-add-variant").each(function(){
36
- new ShipmentAddVariantView({el: this});
37
- });
38
- });
39
-
40
4
  var ShipShipmentView = Backbone.View.extend({
41
5
  initialize: function(options){
42
6
  this.shipment_number = options.shipment_number;
@@ -97,32 +61,6 @@ adjustShipmentItems = function(shipment_number, variant_id, quantity){
97
61
  }
98
62
  };
99
63
 
100
- addVariantFromStockLocation = function(stock_location_id, variant_id, quantity) {
101
- var shipment = _.find(shipments, function(shipment){
102
- return shipment.stock_location_id == stock_location_id && (shipment.state == 'ready' || shipment.state == 'pending');
103
- });
104
-
105
- if(shipment==undefined){
106
- Spree.ajax({
107
- type: "POST",
108
- url: Spree.routes.shipments_api,
109
- data: {
110
- shipment: {
111
- order_id: window.order_number
112
- },
113
- variant_id: variant_id,
114
- quantity: quantity,
115
- stock_location_id: stock_location_id,
116
- }
117
- }).done(function(){
118
- window.location.reload();
119
- });
120
- }else{
121
- //add to existing shipment
122
- adjustShipmentItems(shipment.number, variant_id, quantity);
123
- }
124
- };
125
-
126
64
  var ShipmentSplitItemView = Backbone.View.extend({
127
65
  tagName: 'tr',
128
66
  className: 'stock-item-split',
@@ -13,6 +13,5 @@
13
13
  //= require spree/backend/templates/taxons/_tree
14
14
  //= require spree/backend/templates/taxons/tree
15
15
  //= require spree/backend/templates/variants/autocomplete
16
- //= require spree/backend/templates/variants/autocomplete_stock
17
16
  //= require spree/backend/templates/variants/line_items_autocomplete_stock
18
17
  //= require spree/backend/templates/variants/split
@@ -0,0 +1,29 @@
1
+ Spree.Views.Cart.EmptyCartButton = Backbone.View.extend({
2
+ initialize: function() {
3
+ this.listenTo(this.collection, 'update', this.render);
4
+ this.render();
5
+ },
6
+
7
+ events: {
8
+ "click": "onClick"
9
+ },
10
+
11
+ onClick: function(e) {
12
+ e.preventDefault()
13
+ if (!confirm(Spree.translations.are_you_sure_delete)) {
14
+ return;
15
+ }
16
+
17
+ this.model.empty({
18
+ success: () => {
19
+ this.collection.reset()
20
+ this.collection.push({})
21
+ }
22
+ })
23
+ },
24
+
25
+ render: function() {
26
+ var isNew = function (item) { return item.isNew() };
27
+ this.$el.prop("disabled", !this.collection.length || this.collection.some(isNew));
28
+ }
29
+ });
@@ -1,11 +1,16 @@
1
1
  Spree.Views.Cart.LineItemTable = Backbone.View.extend({
2
2
  initialize: function() {
3
3
  this.listenTo(this.collection, 'add', this.add);
4
+ this.listenTo(this.collection, 'reset', this.reset);
4
5
  },
5
6
 
6
7
  add: function(line_item) {
7
8
  var view = new Spree.Views.Cart.LineItemRow({model: line_item});
8
9
  view.render();
9
10
  this.$el.append(view.el);
11
+ },
12
+
13
+ reset: function() {
14
+ this.$el.empty();
10
15
  }
11
16
  });
@@ -1,5 +1,6 @@
1
1
  //= require 'spree/backend/views/calculators/tiered'
2
2
  //= require 'spree/backend/views/cart/add_line_item_button'
3
+ //= require 'spree/backend/views/cart/empty_cart_button'
3
4
  //= require 'spree/backend/views/cart/line_item_row'
4
5
  //= require 'spree/backend/views/cart/line_item_table'
5
6
  //= require 'spree/backend/views/images/upload_zone'
@@ -3,14 +3,14 @@ Spree.Views.Order.Address = Backbone.View.extend({
3
3
  // read initial values from page
4
4
  this.onChange();
5
5
 
6
- this.render();
7
- this.listenTo(this.model, "change", this.render);
8
-
9
6
  this.stateSelect =
10
7
  new Spree.Views.StateSelect({
11
8
  model: this.model,
12
9
  el: this.$el
13
10
  });
11
+
12
+ this.render();
13
+ this.listenTo(this.model, "change", this.render);
14
14
  },
15
15
 
16
16
  events: {
@@ -24,7 +24,7 @@ Spree.Views.Order.Address = Backbone.View.extend({
24
24
  eachField: function(callback){
25
25
  var view = this;
26
26
  var fields = ["firstname", "lastname", "company", "address1", "address2",
27
- "city", "zipcode", "phone", "country_id"];
27
+ "city", "zipcode", "phone", "country_id", "state_name"];
28
28
  _.each(fields, function(field) {
29
29
  var el = view.$('[name$="[' + field + ']"]');
30
30
  if (el.length) callback(field, el);
@@ -43,6 +43,8 @@ Spree.Views.Order.Address = Backbone.View.extend({
43
43
  var model = this.model;
44
44
  this.eachField(function(name, el) {
45
45
  el.val(model.get(name))
46
- })
46
+ });
47
+
48
+ this.stateSelect.render();
47
49
  }
48
50
  });
@@ -85,6 +85,8 @@ $dropdown-link-hover-bg: $color-primary !default;
85
85
 
86
86
  $breadcrumb-bg: transparent !default;
87
87
  $breadcrumb-active-color: $color-primary !default;
88
+ $breadcrumb-padding-y: .75rem !default;
89
+ $breadcrumb-padding-x: 0 !default;
88
90
 
89
91
  // Popover
90
92
 
@@ -1,15 +1,15 @@
1
1
  .breadcrumb {
2
2
  font-size: 16px;
3
3
  margin-bottom: 0;
4
-
4
+
5
5
  a {
6
6
  color: $breadcrumb-color;
7
-
7
+
8
8
  &:hover {
9
9
  color: $breadcrumb-active-color;
10
10
  }
11
11
  }
12
-
12
+
13
13
  .active {
14
14
  font-weight: $font-weight-bold;
15
15
  }
@@ -30,6 +30,10 @@
30
30
  left: $width-sidebar;
31
31
  right: 0;
32
32
  z-index: 1000;
33
+
34
+ .admin-nav-hidden & {
35
+ left: $width-sidebar-collapsed;
36
+ }
33
37
  }
34
38
 
35
39
  .flash {
@@ -2,6 +2,91 @@ $padding-x-navbar: 26px;
2
2
  $padding-y-navbar: 13px;
3
3
  $padding-y-navbar-submenu: 9px;
4
4
 
5
+ #admin-nav-toggle {
6
+ border-bottom: $border-sidebar;
7
+ padding: ($padding-y-navbar/ 2) $padding-x-navbar;
8
+ width: 100%;
9
+ text-align: left;
10
+ color: $color-navbar;
11
+ font-weight: $font-weight-bold;
12
+ position: relative;
13
+ overflow: hidden;
14
+ display: block;
15
+ height: 39px;
16
+ z-index: 1;
17
+
18
+ span {
19
+ font-size: $font-size-sm;
20
+ font-weight: $font-weight-bold;
21
+ }
22
+
23
+ &.btn {
24
+ background-color: transparent;
25
+ }
26
+
27
+ &.fa {
28
+ text-indent: 2em;
29
+
30
+ &:before {
31
+ color: $color-icon-navbar;
32
+ font-weight: $font-weight-normal;
33
+ position: absolute;
34
+ left: 1em;
35
+ top: 0;
36
+ line-height: 39px;
37
+ transform: translateX(-50%);
38
+ transition: transform .5s ease-in-out;
39
+ }
40
+
41
+ &:focus {
42
+ outline: 0;
43
+ box-shadow: none;
44
+ }
45
+ }
46
+ }
47
+
48
+ .admin-nav-hidden {
49
+ padding-left: $width-sidebar-collapsed;
50
+
51
+ .admin-nav,
52
+ .admin-nav-footer {
53
+ width: $width-sidebar-collapsed;
54
+ }
55
+
56
+ .text {
57
+ transform: translateX(-50px);
58
+ display: none;
59
+ }
60
+
61
+ .admin-login-nav a {
62
+ text-overflow: clip;
63
+ }
64
+
65
+ .brand-link {
66
+ overflow: hidden;
67
+
68
+ img {
69
+ max-width: 125px;
70
+ }
71
+ }
72
+
73
+ .admin-nav-menu {
74
+ li {
75
+ &.selected:not(:hover) > ul {
76
+ visibility: hidden;
77
+ }
78
+
79
+ &.selected:not(:hover) .admin-subnav {
80
+ display: none;
81
+ }
82
+ }
83
+ }
84
+
85
+ .admin-nav-menu .selected li {
86
+ padding-left: 0;
87
+ }
88
+ }
89
+
5
90
  nav.menu {
6
91
  ul {
7
92
  list-style: none;
@@ -26,16 +111,27 @@ nav.menu {
26
111
  }
27
112
 
28
113
  .admin-nav {
114
+ position: absolute;
115
+ top: 0;
116
+ bottom: 0;
117
+ left: 0;
118
+ z-index: $zindex-sticky;
119
+ width: $width-sidebar;
29
120
  border-right: $border-sidebar;
30
121
  background: $color-sidebar-bg;
31
- z-index: $zindex-sticky;
122
+
123
+ @media print {
124
+ display: none
125
+ }
32
126
  }
33
127
 
34
128
  .admin-nav-header {
35
129
  background-color: $color-white;
36
130
  border-bottom: 1px solid $color-border;
131
+ border-right: 1px solid $color-border;
37
132
  text-align: center;
38
133
  padding: 0 1.25em;
134
+ width: $width-sidebar;
39
135
  // Using line height for proper vertical centering.
40
136
  // As line height does not take the border width into account we need to subtract it.
41
137
  line-height: $main-header-height - 1px;
@@ -73,56 +169,13 @@ nav.menu {
73
169
  }
74
170
 
75
171
  &:not(.selected):not(:hover) > ul {
76
- display: none;
77
- }
78
-
79
- &:not(.selected) {
80
- position: relative;
81
-
82
- // flyout nav
83
- > ul {
84
- position: absolute;
85
- top: 0;
86
- left: 100%;
87
- width: $width-sidebar-flyout;
88
- margin-left: 0;
89
- background: $color-white;
90
- box-shadow: 1px 0 4px 0 rgba(0, 0, 0, 0.1);
91
- border-radius: 0 4px 4px 4px;
92
- border: 1px solid $color-border;
93
- @include caret($direction: left, $color-caret: $color-white);
94
-
95
- &:before {
96
- z-index: 1;
97
- top: 1.5em;
98
- }
99
-
100
- &:after {
101
- content: '';
102
- display: block;
103
- position: absolute;
104
- border-width: 1em 1em;
105
- border-style: solid;
106
- border-color: transparent;
107
- border-right-color: $color-border;
108
- left: -2.1em;
109
- top: 1.5em;
110
- margin-top: -1em;
111
- }
112
-
113
- > li {
114
- background: $color-white;
115
-
116
- a {
117
- font-weight: $font-weight-bold;
118
- }
119
- }
120
- }
172
+ visibility: hidden;
121
173
  }
122
174
  }
123
175
 
124
176
  a {
125
177
  display: block;
178
+ min-height: 39px;
126
179
  padding: $padding-y-navbar $padding-x-navbar;
127
180
  color: $color-navbar;
128
181
  font-weight: $font-weight-bold;
@@ -177,8 +230,58 @@ nav.menu {
177
230
  }
178
231
  }
179
232
 
233
+ .admin-nav-menu li:not(.selected),
234
+ .admin-nav-hidden .admin-nav-menu li.selected:hover {
235
+ position: relative;
236
+
237
+ // flyout nav
238
+ > ul {
239
+ position: absolute;
240
+ top: 0;
241
+ left: 100%;
242
+ width: $width-sidebar-flyout;
243
+ margin-left: 0;
244
+ background: $color-white;
245
+ box-shadow: 1px 0 4px 0 rgba(0, 0, 0, 0.1);
246
+ border-radius: 0 4px 4px 4px;
247
+ border: 1px solid $color-border;
248
+ @include caret($direction: left, $color-caret: $color-white);
249
+
250
+ &:before {
251
+ z-index: 1;
252
+ top: 1.5em;
253
+ pointer-events: none;
254
+ }
255
+
256
+ &:after {
257
+ content: '';
258
+ display: block;
259
+ position: absolute;
260
+ border-width: 1em 1em;
261
+ border-style: solid;
262
+ border-color: transparent;
263
+ border-right-color: $color-border;
264
+ left: -2.1em;
265
+ top: 1.5em;
266
+ margin-top: -1em;
267
+ pointer-events: none;
268
+ }
269
+
270
+ > li {
271
+ background: $color-white;
272
+
273
+ a {
274
+ font-weight: $font-weight-bold;
275
+ }
276
+ }
277
+ }
278
+ }
279
+
180
280
  .admin-nav-footer {
281
+ width: $width-sidebar;
181
282
  background-color: $color-navbar-footer-bg;
283
+ border-top: $border-sidebar;
284
+ border-right: $border-sidebar;
182
285
 
183
286
  a {
184
287
  color: $color-navbar-footer;
@@ -191,14 +294,40 @@ nav.menu {
191
294
 
192
295
  .admin-locale-selection {
193
296
  margin: 1em;
297
+ position: relative;
298
+
299
+ &::after {
300
+ content: "\f0ac";
301
+ font-family: "FontAwesome";
302
+ position: absolute;
303
+ top: 0;
304
+ left: 0;
305
+ padding: .5rem 0 .5rem .25rem;
306
+ z-index: -1;
307
+ }
308
+
309
+ .admin-nav-hidden & {
310
+ .js-locale-selection.custom-select {
311
+ background-color: transparent;
312
+ background-position: 1.5rem center;
313
+ background-size: 8px 9px;
314
+ border: 0;
315
+ opacity: .6;
316
+ position: relative;
317
+ overflow: hidden;
318
+ text-indent: 1rem;
319
+ z-index: 1;
320
+
321
+ &:focus {
322
+ box-shadow: none;
323
+ }
324
+ }
325
+ }
194
326
  }
195
327
 
196
328
  .admin-nav.fits .admin-nav-footer {
197
329
  position: fixed;
198
330
  bottom: 0;
199
- width: $width-sidebar;
200
- border-top: $border-sidebar;
201
- border-right: $border-sidebar;
202
331
  }
203
332
 
204
333
  .admin-login-nav {
@@ -226,4 +355,8 @@ nav.menu {
226
355
 
227
356
  .brand-link {
228
357
  display: block;
358
+
359
+ img {
360
+ max-width: 125px;
361
+ }
229
362
  }