alchemy_cms 5.1.0.beta1 → 5.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +126 -0
- data/CHANGELOG.md +29 -1
- data/Gemfile +2 -2
- data/README.md +1 -1
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/admin.js +0 -1
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -4
- data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +0 -3
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +29 -4
- data/app/assets/stylesheets/alchemy/_variables.scss +7 -0
- data/app/assets/stylesheets/alchemy/admin.scss +0 -1
- data/app/assets/stylesheets/alchemy/buttons.scss +26 -15
- data/app/assets/stylesheets/alchemy/elements.scss +58 -19
- data/app/assets/stylesheets/alchemy/frame.scss +0 -1
- data/app/assets/stylesheets/alchemy/hints.scss +2 -1
- data/app/assets/stylesheets/alchemy/search.scss +1 -1
- data/app/assets/stylesheets/alchemy/selects.scss +26 -20
- data/app/assets/stylesheets/alchemy/tables.scss +38 -9
- data/app/controllers/alchemy/admin/pages_controller.rb +58 -8
- data/app/decorators/alchemy/element_editor.rb +1 -0
- data/app/models/alchemy/legacy_page_url.rb +1 -1
- data/app/models/alchemy/page.rb +8 -0
- data/app/models/alchemy/site/layout.rb +30 -2
- data/app/serializers/alchemy/page_tree_serializer.rb +4 -4
- data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +1 -1
- data/app/views/alchemy/admin/elements/publish.js.erb +1 -0
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +19 -29
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +10 -1
- data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +29 -0
- data/app/views/alchemy/admin/pages/_table.html.erb +27 -0
- data/app/views/alchemy/admin/pages/_table_row.html.erb +107 -0
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +77 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +9 -1
- data/app/views/alchemy/admin/pages/index.html.erb +41 -74
- data/app/views/alchemy/admin/pages/list/_table.html.erb +31 -0
- data/app/views/alchemy/admin/pages/unlock.js.erb +2 -2
- data/app/views/alchemy/admin/pages/update.js.erb +19 -10
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +13 -11
- data/config/locales/alchemy.en.yml +6 -4
- data/lib/alchemy.rb +66 -0
- data/lib/alchemy/admin/preview_url.rb +2 -0
- data/lib/alchemy/engine.rb +0 -4
- data/lib/alchemy/permissions.rb +1 -0
- data/lib/alchemy/test_support/integration_helpers.rb +0 -7
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +2 -4
- data/vendor/assets/javascripts/jquery_plugins/select2.js +3729 -0
- data/vendor/assets/stylesheets/alchemy_admin/select2.scss +740 -0
- metadata +30 -29
- data/.travis.yml +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a9ae8a64411801bcb7be5b56f82e42769cf60209f0aea166090ff85ad26cdce
|
4
|
+
data.tar.gz: 3f7a532599c4c117a4f6aa526bafc905e0de1feaab8a2897ada425bc98769e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3d9c8af97d9e44fc6bcbf556a24b89945ebb2b029a3ce1f9cec97229dfc23c22f2333dbe4b6ff8cddb846fe5e291bf7f0a323040384a12e8962a5c80bb7d70
|
7
|
+
data.tar.gz: e889382a72271598703b531c476cc7c9737a5b22441fefa1215035de46c14fa84f1a2f75e1d12b6f372b2115f7fecc5774c3198818f0a05939b052ad50a9869b
|
@@ -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,14 +1,31 @@
|
|
1
|
-
## 5.1.
|
1
|
+
## 5.1.2 (2021-01-26)
|
2
|
+
|
3
|
+
- Allow to safe hidden elements [#2007](https://github.com/AlchemyCMS/alchemy_cms/pull/2007) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
|
5
|
+
|
6
|
+
## 5.1.1 (2021-01-12)
|
7
|
+
|
8
|
+
- Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
|
9
|
+
|
10
|
+
## 5.1.0 (2020-12-18)
|
2
11
|
|
3
12
|
### Features
|
4
13
|
|
14
|
+
- Allow pound sign in legacy url [#1980](https://github.com/AlchemyCMS/alchemy_cms/pull/1980) ([robinboening](https://github.com/robinboening))
|
15
|
+
- Adjust element editor UI [#1979](https://github.com/AlchemyCMS/alchemy_cms/pull/1979) ([tvdeyen](https://github.com/tvdeyen))
|
16
|
+
- Always show the full page name in active page tab [#1972](https://github.com/AlchemyCMS/alchemy_cms/pull/1972) ([tvdeyen](https://github.com/tvdeyen))
|
17
|
+
- Allow multiple preview sources [#1959](https://github.com/AlchemyCMS/alchemy_cms/pull/1959) ([tvdeyen](https://github.com/tvdeyen))
|
18
|
+
- Add Publish Targets [#1957](https://github.com/AlchemyCMS/alchemy_cms/pull/1957) ([tvdeyen](https://github.com/tvdeyen))
|
5
19
|
- Persist rendered picture variants [#1882](https://github.com/AlchemyCMS/alchemy_cms/pull/1882) ([tvdeyen](https://github.com/tvdeyen))
|
6
20
|
- Store current pictures size in session [#1927](https://github.com/AlchemyCMS/alchemy_cms/pull/1927) ([tvdeyen](https://github.com/tvdeyen))
|
7
21
|
- Add support for custom mount points in Page::UrlPath [#1921](https://github.com/AlchemyCMS/alchemy_cms/pull/1921) ([tvdeyen](https://github.com/tvdeyen))
|
8
22
|
- Allow to set a custom Page::UrlPath class [#1919](https://github.com/AlchemyCMS/alchemy_cms/pull/1919) ([tvdeyen](https://github.com/tvdeyen))
|
23
|
+
- Introduce a pages list view [#1906](https://github.com/AlchemyCMS/alchemy_cms/pull/1906) ([tvdeyen](https://github.com/tvdeyen))
|
9
24
|
|
10
25
|
### Changes
|
11
26
|
|
27
|
+
- Fix height of search input field [#1973](https://github.com/AlchemyCMS/alchemy_cms/pull/1973) ([tvdeyen](https://github.com/tvdeyen))
|
28
|
+
- Load select2 from assets folder [#1961](https://github.com/AlchemyCMS/alchemy_cms/pull/1961) ([tvdeyen](https://github.com/tvdeyen))
|
12
29
|
- Do not abort if user class cannot be found [#1950](https://github.com/AlchemyCMS/alchemy_cms/pull/1950) ([tvdeyen](https://github.com/tvdeyen))
|
13
30
|
- Deprivatize useful picture view methods [#1936](https://github.com/AlchemyCMS/alchemy_cms/pull/1936) ([mickenorlen](https://github.com/mickenorlen))
|
14
31
|
- Unset render_size on layout default selection [#1935](https://github.com/AlchemyCMS/alchemy_cms/pull/1935) ([mickenorlen](https://github.com/mickenorlen))
|
@@ -36,6 +53,9 @@
|
|
36
53
|
|
37
54
|
### Misc
|
38
55
|
|
56
|
+
- Move away from Travis CI [#1981](https://github.com/AlchemyCMS/alchemy_cms/pull/1981) ([tvdeyen](https://github.com/tvdeyen))
|
57
|
+
- Remove poltergeist and phantomjs leftovers [#1970](https://github.com/AlchemyCMS/alchemy_cms/pull/1970) ([tvdeyen](https://github.com/tvdeyen))
|
58
|
+
- [ruby - main] Upgrade rubocop to version 1.1.0 [#1958](https://github.com/AlchemyCMS/alchemy_cms/pull/1958) ([depfu](https://github.com/apps/depfu))
|
39
59
|
- Remove greetings action [#1956](https://github.com/AlchemyCMS/alchemy_cms/pull/1956) ([tvdeyen](https://github.com/tvdeyen))
|
40
60
|
- [ruby] Upgrade rubocop to version 1.0.0 [#1952](https://github.com/AlchemyCMS/alchemy_cms/pull/1952) ([depfu](https://github.com/apps/depfu))
|
41
61
|
- [ruby] Upgrade rubocop to version 0.93.1 [#1948](https://github.com/AlchemyCMS/alchemy_cms/pull/1948) ([depfu](https://github.com/apps/depfu))
|
@@ -47,6 +67,14 @@
|
|
47
67
|
- [ruby] Upgrade rubocop to version 0.88.0 [#1892](https://github.com/AlchemyCMS/alchemy_cms/pull/1892) ([depfu](https://github.com/apps/depfu))
|
48
68
|
- [ruby] Upgrade rubocop to version 0.87.1 [#1889](https://github.com/AlchemyCMS/alchemy_cms/pull/1889) ([depfu](https://github.com/apps/depfu))
|
49
69
|
|
70
|
+
## 5.0.3 (2021-01-12)
|
71
|
+
|
72
|
+
- Fix copy element feature [#1996](https://github.com/AlchemyCMS/alchemy_cms/pull/1996) ([tvdeyen](https://github.com/tvdeyen))
|
73
|
+
|
74
|
+
## 5.0.2 (2020-12-18)
|
75
|
+
|
76
|
+
- Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
|
77
|
+
|
50
78
|
## 5.0.1 (2020-09-29)
|
51
79
|
|
52
80
|
- [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["
|
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"
|
@@ -22,7 +22,7 @@ group :development, :test do
|
|
22
22
|
gem "yard"
|
23
23
|
gem "redcarpet"
|
24
24
|
gem "pry-byebug"
|
25
|
-
gem "rubocop", "~> 1.
|
25
|
+
gem "rubocop", "~> 1.1.0", require: false
|
26
26
|
gem "listen"
|
27
27
|
gem "localeapp", "~> 3.0", require: false
|
28
28
|
gem "dotenv", "~> 2.2"
|
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://
|
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
|
-------------------------------------------------------------
|
@@ -38,10 +38,7 @@ Alchemy.ElementEditors =
|
|
38
38
|
@onSaveElement(e, data)
|
39
39
|
# Listen to postMessage messages from the preview frame
|
40
40
|
window.addEventListener 'message', (e) =>
|
41
|
-
|
42
|
-
@onMessage(e.data)
|
43
|
-
else
|
44
|
-
console.warn 'Unsafe message origin!', e.origin
|
41
|
+
@onMessage(e.data)
|
45
42
|
true
|
46
43
|
return
|
47
44
|
|
@@ -22,9 +22,6 @@ Alchemy.initAlchemyPreviewMode = ->
|
|
22
22
|
|
23
23
|
init: ->
|
24
24
|
window.addEventListener "message", (event) =>
|
25
|
-
if event.origin != window.location.origin
|
26
|
-
console.warn 'Unsafe message origin!', event.origin
|
27
|
-
return
|
28
25
|
switch event.data.message
|
29
26
|
when "Alchemy.blurElements" then @blurElements()
|
30
27
|
when "Alchemy.focusElement" then @focusElement(event.data)
|
@@ -4,8 +4,10 @@ Alchemy.PreviewWindow =
|
|
4
4
|
MIN_WIDTH: 240
|
5
5
|
HEIGHT: 75 # Top menu height
|
6
6
|
|
7
|
-
init: (
|
8
|
-
|
7
|
+
init: (previewUrl) ->
|
8
|
+
@select = document.querySelector('#preview_url')
|
9
|
+
@previewUrl = @_getCurrentPreviewUrl() || previewUrl[1]
|
10
|
+
$iframe = $("<iframe name=\"alchemy_preview_window\" src=\"#{@previewUrl}\" id=\"alchemy_preview_window\" frameborder=\"0\"/>")
|
9
11
|
$reload = $('#reload_preview_button')
|
10
12
|
@_showSpinner()
|
11
13
|
$iframe.load =>
|
@@ -13,6 +15,10 @@ Alchemy.PreviewWindow =
|
|
13
15
|
$('body').append($iframe)
|
14
16
|
@currentWindow = $iframe
|
15
17
|
@_bindReloadButton()
|
18
|
+
if @select
|
19
|
+
@select.value = @previewUrl
|
20
|
+
@_bindSelect()
|
21
|
+
return
|
16
22
|
|
17
23
|
resize: (width) ->
|
18
24
|
width = @MIN_WIDTH if width < @MIN_WIDTH
|
@@ -29,12 +35,12 @@ Alchemy.PreviewWindow =
|
|
29
35
|
@_hideSpinner()
|
30
36
|
if callback
|
31
37
|
callback.call(e, $iframe)
|
32
|
-
$iframe.attr
|
38
|
+
$iframe.attr('src', @previewUrl)
|
33
39
|
true
|
34
40
|
|
35
41
|
postMessage: (data) ->
|
36
42
|
frameWindow = @currentWindow[0].contentWindow
|
37
|
-
frameWindow.postMessage(data,
|
43
|
+
frameWindow.postMessage(data, "*")
|
38
44
|
|
39
45
|
_showSpinner: ->
|
40
46
|
@reload = $('#reload_preview_button')
|
@@ -53,5 +59,24 @@ Alchemy.PreviewWindow =
|
|
53
59
|
e.preventDefault()
|
54
60
|
@refresh()
|
55
61
|
|
62
|
+
_getCurrentPreviewUrl: ->
|
63
|
+
if @select
|
64
|
+
option = Array.from(@select.options).find (o) =>
|
65
|
+
o.text == window.localStorage.getItem("alchemyPreview")
|
66
|
+
if option
|
67
|
+
option.value
|
68
|
+
else
|
69
|
+
null
|
70
|
+
else
|
71
|
+
null
|
72
|
+
|
73
|
+
_bindSelect: ->
|
74
|
+
$(@select).change (e) =>
|
75
|
+
@previewUrl = e.target.value
|
76
|
+
option = e.target.querySelector("option[value='#{@previewUrl}']")
|
77
|
+
window.localStorage.setItem("alchemyPreview", option.text)
|
78
|
+
@refresh()
|
79
|
+
return
|
80
|
+
|
56
81
|
Alchemy.reloadPreview = ->
|
57
82
|
Alchemy.PreviewWindow.refresh()
|
@@ -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;
|
@@ -159,6 +164,8 @@ $datepicker_day_color: $text-color !default;
|
|
159
164
|
|
160
165
|
$select-hover-bg-color: $dark-blue !default;
|
161
166
|
$select-hover-text-color: $white !default;
|
167
|
+
$medium-select-box-width: 90px;
|
168
|
+
$large-select-box-width: 120px;
|
162
169
|
|
163
170
|
$thumbnail-background-color: opacify($default-border-color, 1) !default;
|
164
171
|
$medium-screen-break-point: 700px;
|
@@ -1,4 +1,7 @@
|
|
1
|
-
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,
|
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
|
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 {
|
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,
|
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
|
-
|
137
|
-
|
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,
|
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
|
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
|
}
|