alchemy_cms 5.1.0.beta2 → 5.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +126 -0
  3. data/CHANGELOG.md +29 -1
  4. data/Gemfile +1 -1
  5. data/README.md +1 -1
  6. data/alchemy_cms.gemspec +1 -1
  7. data/app/assets/javascripts/alchemy/admin.js +0 -1
  8. data/app/assets/stylesheets/alchemy/_variables.scss +5 -0
  9. data/app/assets/stylesheets/alchemy/admin.scss +0 -1
  10. data/app/assets/stylesheets/alchemy/buttons.scss +26 -15
  11. data/app/assets/stylesheets/alchemy/elements.scss +58 -19
  12. data/app/assets/stylesheets/alchemy/frame.scss +0 -1
  13. data/app/assets/stylesheets/alchemy/hints.scss +2 -1
  14. data/app/assets/stylesheets/alchemy/search.scss +1 -1
  15. data/app/assets/stylesheets/alchemy/selects.scss +23 -19
  16. data/app/assets/stylesheets/alchemy/tables.scss +38 -9
  17. data/app/controllers/alchemy/admin/pages_controller.rb +48 -7
  18. data/app/decorators/alchemy/element_editor.rb +67 -0
  19. data/app/models/alchemy/legacy_page_url.rb +1 -1
  20. data/app/models/alchemy/page.rb +8 -0
  21. data/app/models/alchemy/site/layout.rb +30 -2
  22. data/app/serializers/alchemy/page_tree_serializer.rb +4 -4
  23. data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
  24. data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +1 -1
  25. data/app/views/alchemy/admin/elements/publish.js.erb +1 -0
  26. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +19 -29
  27. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +10 -1
  28. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +29 -0
  29. data/app/views/alchemy/admin/pages/_table.html.erb +27 -0
  30. data/app/views/alchemy/admin/pages/_table_row.html.erb +107 -0
  31. data/app/views/alchemy/admin/pages/_toolbar.html.erb +77 -0
  32. data/app/views/alchemy/admin/pages/index.html.erb +41 -74
  33. data/app/views/alchemy/admin/pages/list/_table.html.erb +31 -0
  34. data/app/views/alchemy/admin/pages/unlock.js.erb +2 -2
  35. data/app/views/alchemy/admin/pages/update.js.erb +19 -10
  36. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +13 -11
  37. data/config/locales/alchemy.en.yml +4 -4
  38. data/lib/alchemy/permissions.rb +1 -0
  39. data/lib/alchemy/resource.rb +5 -3
  40. data/lib/alchemy/test_support/integration_helpers.rb +0 -7
  41. data/lib/alchemy/version.rb +1 -1
  42. data/lib/alchemy_cms.rb +0 -1
  43. data/vendor/assets/javascripts/jquery_plugins/select2.js +3729 -0
  44. data/vendor/assets/stylesheets/alchemy_admin/select2.scss +740 -0
  45. metadata +29 -29
  46. data/.travis.yml +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e12f510dae37d181a93e110634f158c8f3fac7231c489579d61118528c1174a
4
- data.tar.gz: 467204837b948c660077c45e0dab282d23fff3c79a1fea854658d05098a3b8b7
3
+ metadata.gz: 33ff8306fdffc9ad14b1bb85077ea9b6bdaafe6439f30b5b499ca6ed77b68c4d
4
+ data.tar.gz: 7497565de311903f47b2924394f588d49f5542902aab4da14ffd3bb3a01d72be
5
5
  SHA512:
6
- metadata.gz: 3037cd0a408e63b6edde1c58bc398ec4d377d6a9452caf0e6d8b418b438eb8e7176ca8336f5987089caf355c90e68fbca04ab7df3ac67fca76654efcf00d2cab
7
- data.tar.gz: d5a363910f6e4bfb221094c15f33c550dc3650c5eae35a375ea187e92bdac102e31c155168f336c1fa8f11a22235ff1558cc5433ad34fadc79cf59d28e0d883e
6
+ metadata.gz: d385b92ccaaebff2f41118c9cc308524488fd8fecd394bfefa66cee8fc2c4827a08392985920657c87f9a519e274ad368961292500d034dbf276d3e9bea0126d
7
+ data.tar.gz: 277aade952423c3bd043603e3e4398ce3b8b2e5ea9600f3e5777429d3af29644b9bc4640548d0d4aa5094b5c8a3a3f5b531dd1f2fb9495d1115efdb2d07635c1
@@ -0,0 +1,126 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ RSpec:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ rails:
12
+ - '5.2'
13
+ - '6.0'
14
+ ruby:
15
+ - '2.5.x'
16
+ - '2.6.x'
17
+ database:
18
+ - mysql
19
+ - postgresql
20
+ env:
21
+ DB: ${{ matrix.database }}
22
+ DB_USER: alchemy_user
23
+ DB_PASSWORD: password
24
+ DB_HOST: '127.0.0.1'
25
+ RAILS_ENV: test
26
+ RAILS_VERSION: ${{ matrix.rails }}
27
+ services:
28
+ postgres:
29
+ image: postgres:11
30
+ env:
31
+ POSTGRES_USER: alchemy_user
32
+ POSTGRES_PASSWORD: password
33
+ POSTGRES_DB: alchemy_cms_dummy_test
34
+ ports: ['5432:5432']
35
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
36
+ mysql:
37
+ image: mysql:latest
38
+ ports: ['3306:3306']
39
+ env:
40
+ MYSQL_USER: alchemy_user
41
+ MYSQL_PASSWORD: password
42
+ MYSQL_DATABASE: alchemy_cms_dummy_test
43
+ MYSQL_ROOT_PASSWORD: password
44
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
45
+ steps:
46
+ - uses: actions/checkout@v2.3.4
47
+ - name: Set up Ruby
48
+ uses: actions/setup-ruby@v1.1.2
49
+ with:
50
+ ruby-version: ${{ matrix.ruby }}
51
+ - name: Restore apt cache
52
+ id: apt-cache
53
+ uses: actions/cache@v2.1.3
54
+ with:
55
+ path: /home/runner/apt/cache
56
+ key: ${{ runner.os }}-apt-${{ matrix.database }}
57
+ restore-keys: |
58
+ ${{ runner.os }}-apt-
59
+ - name: Install Postgres headers
60
+ if: matrix.database == 'postgresql'
61
+ run: |
62
+ mkdir -p /home/runner/apt/cache
63
+ sudo apt update -qq
64
+ sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
65
+ sudo chown -R runner /home/runner/apt/cache
66
+ - name: Install MySQL headers
67
+ if: matrix.database == 'mysql'
68
+ run: |
69
+ mkdir -p /home/runner/apt/cache
70
+ sudo apt update -qq
71
+ sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
72
+ sudo chown -R runner /home/runner/apt/cache
73
+ - name: Install bundler
74
+ run: |
75
+ gem install bundler
76
+ - name: Restore Ruby Gems cache
77
+ id: cache
78
+ uses: actions/cache@v2.1.3
79
+ with:
80
+ path: vendor/bundle
81
+ key: ${{ runner.os }}-bundle-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.database }}-${{ hashFiles('**/Gemfile') }}
82
+ restore-keys: |
83
+ ${{ runner.os }}-bundle-
84
+ - name: Install bundle
85
+ timeout-minutes: 10
86
+ run: |
87
+ bundle install --jobs 4 --retry 3 --path vendor/bundle
88
+ - name: Restore node modules cache
89
+ id: yarn-cache
90
+ uses: actions/cache@v2.1.3
91
+ with:
92
+ path: spec/dummy/node_modules
93
+ key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
94
+ restore-keys: |
95
+ ${{ runner.os }}-yarn-dummy-
96
+ - name: Prepare database
97
+ run: |
98
+ bundle exec rake alchemy:spec:prepare
99
+ - name: Run tests & publish code coverage
100
+ uses: paambaati/codeclimate-action@v2.7.5
101
+ env:
102
+ CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
103
+ with:
104
+ coverageCommand: bundle exec rspec
105
+ - uses: actions/upload-artifact@main
106
+ if: failure()
107
+ with:
108
+ name: Screenshots
109
+ path: spec/dummy/tmp/screenshots
110
+ Jest:
111
+ runs-on: ubuntu-latest
112
+ env:
113
+ NODE_ENV: test
114
+ steps:
115
+ - uses: actions/checkout@v2.3.4
116
+ - name: Restore node modules cache
117
+ uses: actions/cache@v2.1.3
118
+ with:
119
+ path: node_modules
120
+ key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }}
121
+ restore-keys: |
122
+ ${{ runner.os }}-yarn-
123
+ - name: Install yarn
124
+ run: yarn install
125
+ - name: Run jest
126
+ run: yarn jest
data/CHANGELOG.md CHANGED
@@ -1,16 +1,34 @@
1
- ## 5.1.0 (unreleased)
1
+ ## 5.1.3 (2021-05-06)
2
+
3
+ - Use symbols in polymorphic routes for resources [#2087](https://github.com/AlchemyCMS/alchemy_cms/pull/2087) ([tvdeyen](https://github.com/tvdeyen))
4
+ - Backport #2049 to 5.1 [#2059](https://github.com/AlchemyCMS/alchemy_cms/pull/2059) ([rickythefox](https://github.com/rickythefox))
5
+ ## 5.1.2 (2021-01-26)
6
+
7
+ - Allow to safe hidden elements [#2007](https://github.com/AlchemyCMS/alchemy_cms/pull/2007) ([tvdeyen](https://github.com/tvdeyen))
8
+
9
+ ## 5.1.1 (2021-01-12)
10
+
11
+ - Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
12
+
13
+ ## 5.1.0 (2020-12-18)
2
14
 
3
15
  ### Features
4
16
 
17
+ - Allow pound sign in legacy url [#1980](https://github.com/AlchemyCMS/alchemy_cms/pull/1980) ([robinboening](https://github.com/robinboening))
18
+ - Adjust element editor UI [#1979](https://github.com/AlchemyCMS/alchemy_cms/pull/1979) ([tvdeyen](https://github.com/tvdeyen))
19
+ - Always show the full page name in active page tab [#1972](https://github.com/AlchemyCMS/alchemy_cms/pull/1972) ([tvdeyen](https://github.com/tvdeyen))
5
20
  - Allow multiple preview sources [#1959](https://github.com/AlchemyCMS/alchemy_cms/pull/1959) ([tvdeyen](https://github.com/tvdeyen))
6
21
  - Add Publish Targets [#1957](https://github.com/AlchemyCMS/alchemy_cms/pull/1957) ([tvdeyen](https://github.com/tvdeyen))
7
22
  - Persist rendered picture variants [#1882](https://github.com/AlchemyCMS/alchemy_cms/pull/1882) ([tvdeyen](https://github.com/tvdeyen))
8
23
  - Store current pictures size in session [#1927](https://github.com/AlchemyCMS/alchemy_cms/pull/1927) ([tvdeyen](https://github.com/tvdeyen))
9
24
  - Add support for custom mount points in Page::UrlPath [#1921](https://github.com/AlchemyCMS/alchemy_cms/pull/1921) ([tvdeyen](https://github.com/tvdeyen))
10
25
  - Allow to set a custom Page::UrlPath class [#1919](https://github.com/AlchemyCMS/alchemy_cms/pull/1919) ([tvdeyen](https://github.com/tvdeyen))
26
+ - Introduce a pages list view [#1906](https://github.com/AlchemyCMS/alchemy_cms/pull/1906) ([tvdeyen](https://github.com/tvdeyen))
11
27
 
12
28
  ### Changes
13
29
 
30
+ - Fix height of search input field [#1973](https://github.com/AlchemyCMS/alchemy_cms/pull/1973) ([tvdeyen](https://github.com/tvdeyen))
31
+ - Load select2 from assets folder [#1961](https://github.com/AlchemyCMS/alchemy_cms/pull/1961) ([tvdeyen](https://github.com/tvdeyen))
14
32
  - Do not abort if user class cannot be found [#1950](https://github.com/AlchemyCMS/alchemy_cms/pull/1950) ([tvdeyen](https://github.com/tvdeyen))
15
33
  - Deprivatize useful picture view methods [#1936](https://github.com/AlchemyCMS/alchemy_cms/pull/1936) ([mickenorlen](https://github.com/mickenorlen))
16
34
  - Unset render_size on layout default selection [#1935](https://github.com/AlchemyCMS/alchemy_cms/pull/1935) ([mickenorlen](https://github.com/mickenorlen))
@@ -38,6 +56,8 @@
38
56
 
39
57
  ### Misc
40
58
 
59
+ - Move away from Travis CI [#1981](https://github.com/AlchemyCMS/alchemy_cms/pull/1981) ([tvdeyen](https://github.com/tvdeyen))
60
+ - Remove poltergeist and phantomjs leftovers [#1970](https://github.com/AlchemyCMS/alchemy_cms/pull/1970) ([tvdeyen](https://github.com/tvdeyen))
41
61
  - [ruby - main] Upgrade rubocop to version 1.1.0 [#1958](https://github.com/AlchemyCMS/alchemy_cms/pull/1958) ([depfu](https://github.com/apps/depfu))
42
62
  - Remove greetings action [#1956](https://github.com/AlchemyCMS/alchemy_cms/pull/1956) ([tvdeyen](https://github.com/tvdeyen))
43
63
  - [ruby] Upgrade rubocop to version 1.0.0 [#1952](https://github.com/AlchemyCMS/alchemy_cms/pull/1952) ([depfu](https://github.com/apps/depfu))
@@ -50,6 +70,14 @@
50
70
  - [ruby] Upgrade rubocop to version 0.88.0 [#1892](https://github.com/AlchemyCMS/alchemy_cms/pull/1892) ([depfu](https://github.com/apps/depfu))
51
71
  - [ruby] Upgrade rubocop to version 0.87.1 [#1889](https://github.com/AlchemyCMS/alchemy_cms/pull/1889) ([depfu](https://github.com/apps/depfu))
52
72
 
73
+ ## 5.0.3 (2021-01-12)
74
+
75
+ - Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
76
+
77
+ ## 5.0.2 (2020-12-18)
78
+
79
+ - Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
80
+
53
81
  ## 5.0.1 (2020-09-29)
54
82
 
55
83
  - [a11y] Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
13
13
  gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"
14
14
 
15
15
  group :development, :test do
16
- if ENV["TRAVIS"]
16
+ if ENV["GITHUB_ACTIONS"]
17
17
  gem "sassc", "~> 2.4.0" # https://github.com/sass/sassc-ruby/issues/146
18
18
  else
19
19
  gem "launchy"
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # AlchemyCMS
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
4
- [![Build Status](https://travis-ci.com/AlchemyCMS/alchemy_cms.svg?branch=main)](https://travis-ci.com/AlchemyCMS/alchemy_cms)
4
+ [![Build Status](https://github.com/AlchemyCMS/alchemy_cms/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy_cms/actions)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/maintainability)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/test_coverage)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
7
7
  [![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
data/alchemy_cms.gemspec CHANGED
@@ -37,7 +37,6 @@ Gem::Specification.new do |gem|
37
37
  gem.add_runtime_dependency 'request_store', ['~> 1.2']
38
38
  gem.add_runtime_dependency 'responders', ['>= 2.0', '< 4.0']
39
39
  gem.add_runtime_dependency 'sassc-rails', ['~> 2.1']
40
- gem.add_runtime_dependency 'select2-rails', ['>= 3.5.9.1', '< 4.0']
41
40
  gem.add_runtime_dependency 'simple_form', ['>= 4.0', '< 6']
42
41
  gem.add_runtime_dependency 'sprockets', ['>= 3.0', '< 5']
43
42
  gem.add_runtime_dependency 'turbolinks', ['>= 2.5']
@@ -54,6 +53,7 @@ Gem::Specification.new do |gem|
54
53
  gem.add_development_dependency 'webdrivers', ['~> 4.0']
55
54
  gem.add_development_dependency 'webmock', ['~> 3.3']
56
55
  gem.add_development_dependency 'shoulda-matchers', ['~> 4.0']
56
+ gem.add_development_dependency 'timecop', ['~> 0.9']
57
57
 
58
58
  gem.post_install_message = <<-MSG
59
59
  -------------------------------------------------------------
@@ -13,7 +13,6 @@
13
13
  //= require clipboard.min
14
14
  //= require keymaster
15
15
  //= require requestAnimationFrame
16
- //= require select2
17
16
  //= require handlebars
18
17
  //= require alchemy/templates
19
18
  //= require alchemy/alchemy.base
@@ -102,6 +102,9 @@ $error_border_color: #c49c9c !default;
102
102
  $error_text_color: #a23434 !default;
103
103
  $error_background_color: #efd3d3 !default;
104
104
 
105
+ $hint-background-color: $light_yellow !default;
106
+ $hint-text-color: $very-dark-gray !default;
107
+
105
108
  $form-left-width: 35% !default;
106
109
  $form-right-width: 65% !default;
107
110
 
@@ -140,6 +143,8 @@ $table-row-hover-color: rgba($light_yellow, 0.5) !default;
140
143
  $elements-window-width: 22.5vw !default;
141
144
  $elements-window-min-width: 400px !default;
142
145
  $element-header-bg-color: $medium-gray !default;
146
+ $element-header-active-bg-color: $dark-blue !default;
147
+ $element-header-active-color: $white !default;
143
148
  $top-menu-height: 75px !default;
144
149
 
145
150
  $tabs-height: 31px !default;
@@ -1,6 +1,5 @@
1
1
  /* Alchemy CMS Sprockets Manifest
2
2
  * -------------------------------
3
- *= require select2
4
3
  *= require_self
5
4
  */
6
5
 
@@ -1,4 +1,7 @@
1
- button, input[type="submit"], a.button, input.button {
1
+ button,
2
+ input[type="submit"],
3
+ a.button,
4
+ input.button {
2
5
  @include button-defaults;
3
6
  position: relative;
4
7
 
@@ -14,7 +17,8 @@ button, input[type="submit"], a.button, input.button {
14
17
  );
15
18
  }
16
19
 
17
- &:active, &:active:focus {
20
+ &:active,
21
+ &:active:focus {
18
22
  border-color: $button-hover-border-color;
19
23
  box-shadow: none;
20
24
  }
@@ -23,7 +27,7 @@ button, input[type="submit"], a.button, input.button {
23
27
  &.small {
24
28
  padding: $small-button-padding;
25
29
  vertical-align: inherit;
26
- line-height: 4*$default-padding;
30
+ line-height: 4 * $default-padding;
27
31
  font-size: inherit;
28
32
  }
29
33
 
@@ -83,13 +87,14 @@ button, input[type="submit"], a.button, input.button {
83
87
  border: $default-border-width $default-border-style $icon-color;
84
88
  color: $icon-color;
85
89
 
86
- .icon { color: inherit }
90
+ .icon {
91
+ color: inherit;
92
+ }
87
93
  }
88
94
  }
89
95
 
90
96
  &.disabled,
91
97
  &[disabled] {
92
-
93
98
  span {
94
99
  opacity: 0.3;
95
100
  cursor: not-allowed;
@@ -118,7 +123,8 @@ button.icon_button {
118
123
  border: 0 none;
119
124
  box-shadow: none;
120
125
 
121
- &:disabled, &.disabled {
126
+ &:disabled,
127
+ &.disabled {
122
128
  background: transparent;
123
129
  }
124
130
  }
@@ -131,10 +137,15 @@ button.icon_button {
131
137
  position: relative;
132
138
  display: inline-block;
133
139
  text-align: center;
134
- margin: 0 2*$default-margin;
135
140
 
136
- &.active, &:active, &:hover {
137
- .icon_button:not([disabled]) {
141
+ .toolbar_buttons & {
142
+ margin: 0 2 * $default-margin;
143
+ }
144
+
145
+ &.active,
146
+ &:active,
147
+ &:hover {
148
+ .icon_button:not([disabled]) {
138
149
  background-color: $default-border-color;
139
150
  cursor: pointer;
140
151
  }
@@ -161,8 +172,8 @@ button.icon_button {
161
172
  }
162
173
  }
163
174
 
164
- .button_with_label, .button_group {
165
-
175
+ .button_with_label,
176
+ .button_group {
166
177
  .icon_button {
167
178
  width: 29px;
168
179
  height: 29px;
@@ -179,16 +190,16 @@ button.icon_button {
179
190
  z-index: 30;
180
191
  background-color: $tooltip-background-color;
181
192
  color: $white;
182
- padding: $default-padding 2*$default-padding 1.5*$default-padding;
193
+ padding: $default-padding 2 * $default-padding 1.5 * $default-padding;
183
194
  line-height: 1;
184
195
  box-shadow: 0 0 4px $default-border-color;
185
196
  white-space: nowrap;
186
197
  pointer-events: none;
187
198
  opacity: 0;
188
- transition: .3s;
199
+ transition: 0.3s;
189
200
 
190
201
  &:before {
191
- content: '';
202
+ content: "";
192
203
  position: absolute;
193
204
  bottom: -10px;
194
205
  left: 8px;
@@ -238,6 +249,6 @@ button.icon_button {
238
249
  visibility: visible;
239
250
  opacity: 1;
240
251
  top: -25px;
241
- transition-delay: .2s;
252
+ transition-delay: 0.2s;
242
253
  }
243
254
  }
@@ -60,6 +60,7 @@
60
60
  max-width: 85%;
61
61
  margin-left: $default-margin;
62
62
  text-overflow: ellipsis;
63
+ transition: color $transition-duration;
63
64
 
64
65
  .has-hint & {
65
66
  max-width: 80%;
@@ -73,7 +74,6 @@
73
74
 
74
75
  .preview_text_element_name {
75
76
  font-size: $small-font-size;
76
- text-shadow: #efefef 1px 1px 1px;
77
77
  font-weight: bold;
78
78
  line-height: 15px;
79
79
  }
@@ -106,6 +106,7 @@
106
106
  height: 16px;
107
107
  right: 8px;
108
108
  top: 10px;
109
+ transition: none;
109
110
 
110
111
  .error_icon {
111
112
  float: left;
@@ -126,6 +127,32 @@
126
127
  margin-bottom: 2*$default-margin;
127
128
  transition: box-shadow $transition-duration;
128
129
 
130
+ &.hidden {
131
+ display: block;
132
+ border-style: dashed;
133
+ opacity: 0.5;
134
+ transition: opacity $transition-duration;
135
+
136
+ > .element-header {
137
+ background-color: transparent;
138
+ background-image: linear-gradient(
139
+ 45deg,
140
+ $light-gray 25%,
141
+ $medium-gray 25%,
142
+ $medium-gray 50%,
143
+ $light-gray 50%,
144
+ $light-gray 75%,
145
+ $medium-gray 75%,
146
+ $medium-gray 100%
147
+ );
148
+ background-size: 28.28px 28.28px;
149
+ }
150
+
151
+ &:hover {
152
+ opacity: 1;
153
+ }
154
+ }
155
+
129
156
  &.is-fixed {
130
157
  border-width: 0;
131
158
  border-radius: 0;
@@ -143,9 +170,17 @@
143
170
  }
144
171
  }
145
172
 
146
- &.selected:not(.is-fixed) {
147
- border-color: #c3c3c3;
148
- box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
173
+ &.selected:not(.is-fixed), &:hover {
174
+ &:not(.hidden) {
175
+ box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
176
+ }
177
+ }
178
+
179
+ &.selected:not(.is-fixed):not(.folded):not(.dirty):not(.hidden) {
180
+ > .element-header {
181
+ background-color: $element-header-active-bg-color;
182
+ color: $element-header-active-color;
183
+ }
149
184
  }
150
185
 
151
186
  &.folded {
@@ -221,21 +256,10 @@
221
256
  }
222
257
  }
223
258
 
224
- .element_tools {
225
- display: flex;
226
- width: 100%;
227
- justify-content: space-between;
228
- margin-left: 0;
229
- }
230
-
231
259
  .element-content {
232
260
  margin: 4px 8px;
233
261
  }
234
262
 
235
- .button_with_label {
236
- margin: 0 4px;
237
- }
238
-
239
263
  .content_editor,
240
264
  .picture_thumbnail {
241
265
  width: 100%;
@@ -313,7 +337,18 @@
313
337
  background-color: $element-header-bg-color;
314
338
  @extend .disable-user-select;
315
339
  cursor: pointer;
316
- @include border-top-radius($default-border-radius);
340
+ border-radius: $default-border-radius;
341
+ transition: background-color $transition-duration;
342
+
343
+ .expanded & {
344
+ border-bottom-left-radius: 0;
345
+ border-bottom-right-radius: 0;
346
+ }
347
+
348
+ .icon {
349
+ color: inherit;
350
+ transition: color $transition-duration;
351
+ }
317
352
 
318
353
  >.hint-with-icon {
319
354
  position: absolute;
@@ -338,10 +373,14 @@
338
373
  padding: $default-padding 0;
339
374
  height: $element-toolbar-height;
340
375
  border-bottom: 1px solid $medium-gray;
376
+ }
341
377
 
342
- .element_tools {
343
- float: left;
344
- margin-left: -$default-margin;
378
+ .element_tools {
379
+ display: flex;
380
+ width: 100%;
381
+
382
+ .button_with_label {
383
+ margin: 0 2px;
345
384
  }
346
385
  }
347
386