alchemy_cms 4.4.2 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +23 -17
- data/.rubocop.yml +7 -15
- data/CHANGELOG.md +36 -0
- data/alchemy_cms.gemspec +1 -0
- data/app/assets/javascripts/alchemy/admin.js +3 -0
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +5 -5
- data/app/assets/javascripts/alchemy/alchemy.node_tree.js +66 -0
- data/app/assets/javascripts/alchemy/alchemy.utils.js +45 -0
- data/app/assets/javascripts/alchemy/templates/index.js +1 -0
- data/app/assets/javascripts/alchemy/templates/node_folder.hbs +3 -0
- data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
- data/app/assets/stylesheets/alchemy/_mixins.scss +2 -3
- data/app/assets/stylesheets/alchemy/_variables.scss +2 -2
- data/app/assets/stylesheets/alchemy/lists.scss +0 -8
- data/app/assets/stylesheets/alchemy/nodes.scss +6 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +59 -21
- data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/nodes_controller.rb +2 -10
- data/app/controllers/alchemy/admin/pages_controller.rb +0 -1
- data/app/controllers/alchemy/api/nodes_controller.rb +29 -0
- data/app/controllers/alchemy/api/pages_controller.rb +2 -0
- data/app/decorators/alchemy/content_editor.rb +55 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +16 -16
- data/app/helpers/alchemy/pages_helper.rb +2 -2
- data/app/models/alchemy/content.rb +8 -22
- data/app/models/alchemy/node.rb +29 -5
- data/app/models/alchemy/page.rb +15 -1
- data/app/models/alchemy/page/url_path.rb +66 -0
- data/app/serializers/alchemy/node_serializer.rb +12 -0
- data/app/serializers/alchemy/page_serializer.rb +2 -1
- data/app/serializers/alchemy/page_tree_serializer.rb +4 -3
- data/app/views/alchemy/admin/layoutpages/index.html.erb +5 -1
- data/app/views/alchemy/admin/nodes/_form.html.erb +14 -8
- data/app/views/alchemy/admin/nodes/_node.html.erb +10 -20
- data/app/views/alchemy/admin/nodes/index.html.erb +7 -17
- data/app/views/alchemy/admin/pages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_menu_fields.html.erb +33 -29
- data/app/views/alchemy/admin/pages/_page.html.erb +3 -6
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +6 -0
- data/app/views/alchemy/admin/pages/info.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_routes.html.erb +8 -0
- data/config/alchemy/config.yml +0 -6
- data/config/locales/alchemy.en.yml +14 -6
- data/config/routes.rb +8 -5
- data/db/migrate/20200226081535_add_site_id_to_alchemy_nodes.rb +15 -0
- data/lib/alchemy/config.rb +30 -2
- data/lib/alchemy/ssl_protection.rb +3 -1
- data/lib/alchemy/test_support/factories/node_factory.rb +1 -0
- data/lib/alchemy/upgrader/four_point_six.rb +50 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/install/install_generator.rb +1 -1
- data/lib/rails/generators/alchemy/install/templates/menus.yml.tt +8 -0
- data/lib/rails/generators/alchemy/menus/menus_generator.rb +3 -3
- data/lib/rails/generators/alchemy/menus/templates/wrapper.html.haml +1 -1
- data/lib/rails/generators/alchemy/menus/templates/wrapper.html.slim +1 -1
- data/lib/tasks/alchemy/convert.rake +2 -0
- data/lib/tasks/alchemy/upgrade.rake +67 -46
- data/vendor/assets/javascripts/sortable/Sortable.min.js +2 -0
- metadata +28 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69fbb4c2306ffe7e79ec7b884a125707476d01f94d0e28ad8cdfe5edab029d3b
|
4
|
+
data.tar.gz: 42a64be665c2fbb42fb4403d8d6b7840d3771c22197f8c8c5a9b68abf65cf594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99d83cc2ad6c592aac39a5f1c9c0bc68994fc6f3a15e6b8ce61d8736239dca47e4ae63e85d080ced9f7137e8bf52b5a6e09aeb495fac7c96f304c91e0fdc1de5
|
7
|
+
data.tar.gz: cc4010a02dc1053ea024ab099bdb884e8a7ffd80a81de6bcc070587998aaf050a7e3a228bc36ff809c5414b84e2e512c6659f50df2269f03ed2b84e873194a90
|
data/.github/workflows/ci.yml
CHANGED
@@ -19,9 +19,9 @@ jobs:
|
|
19
19
|
- postgresql
|
20
20
|
env:
|
21
21
|
DB: ${{ matrix.database }}
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
DB_USER: alchemy_user
|
23
|
+
DB_PASSWORD: password
|
24
|
+
DB_HOST: '127.0.0.1'
|
25
25
|
RAILS_ENV: test
|
26
26
|
RAILS_VERSION: ${{ matrix.rails }}
|
27
27
|
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
@@ -29,11 +29,20 @@ jobs:
|
|
29
29
|
postgres:
|
30
30
|
image: postgres:11
|
31
31
|
env:
|
32
|
-
POSTGRES_USER:
|
32
|
+
POSTGRES_USER: alchemy_user
|
33
33
|
POSTGRES_PASSWORD: password
|
34
34
|
POSTGRES_DB: alchemy_cms_dummy_test
|
35
35
|
ports: ['5432:5432']
|
36
36
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
37
|
+
mysql:
|
38
|
+
image: mysql:latest
|
39
|
+
ports: ['3306:3306']
|
40
|
+
env:
|
41
|
+
MYSQL_USER: alchemy_user
|
42
|
+
MYSQL_PASSWORD: password
|
43
|
+
MYSQL_DATABASE: alchemy_cms_dummy_test
|
44
|
+
MYSQL_ROOT_PASSWORD: password
|
45
|
+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
|
37
46
|
steps:
|
38
47
|
- uses: actions/checkout@v1
|
39
48
|
- name: Set up Ruby
|
@@ -52,15 +61,15 @@ jobs:
|
|
52
61
|
if: matrix.database == 'postgresql'
|
53
62
|
run: |
|
54
63
|
mkdir -p /home/runner/apt/cache
|
55
|
-
sudo apt
|
56
|
-
sudo apt
|
64
|
+
sudo apt update -qq
|
65
|
+
sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
|
57
66
|
sudo chown -R runner /home/runner/apt/cache
|
58
67
|
- name: Install MySQL headers
|
59
68
|
if: matrix.database == 'mysql'
|
60
69
|
run: |
|
61
70
|
mkdir -p /home/runner/apt/cache
|
62
|
-
sudo apt
|
63
|
-
sudo apt
|
71
|
+
sudo apt update -qq
|
72
|
+
sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
|
64
73
|
sudo chown -R runner /home/runner/apt/cache
|
65
74
|
- name: Install bundler
|
66
75
|
run: |
|
@@ -80,15 +89,12 @@ jobs:
|
|
80
89
|
- name: Prepare database
|
81
90
|
run: |
|
82
91
|
bundle exec rake alchemy:spec:prepare
|
83
|
-
- name:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
run: |
|
90
|
-
bundle exec rspec
|
91
|
-
./cc-test-reporter after-build --exit-code $?
|
92
|
+
- name: Run tests & publish code coverage
|
93
|
+
uses: paambaati/codeclimate-action@v2.5.7
|
94
|
+
env:
|
95
|
+
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
96
|
+
with:
|
97
|
+
coverageCommand: bundle exec rspec
|
92
98
|
- uses: actions/upload-artifact@master
|
93
99
|
if: failure()
|
94
100
|
with:
|
data/.rubocop.yml
CHANGED
@@ -9,17 +9,12 @@ AllCops:
|
|
9
9
|
- 'alchemy_cms.gemspec'
|
10
10
|
- 'Rakefile'
|
11
11
|
|
12
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.4
|
13
13
|
|
14
14
|
# Really, rubocop?
|
15
15
|
Bundler/OrderedGems:
|
16
16
|
Enabled: false
|
17
17
|
|
18
|
-
# Sometimes I believe this reads better
|
19
|
-
# This also causes spacing issues on multi-line fixes
|
20
|
-
Style/BracesAroundHashParameters:
|
21
|
-
Enabled: false
|
22
|
-
|
23
18
|
Style/EmptyLiteral:
|
24
19
|
Enabled: false
|
25
20
|
|
@@ -55,13 +50,10 @@ Style/MixinUsage:
|
|
55
50
|
Exclude:
|
56
51
|
- spec/**/*
|
57
52
|
|
58
|
-
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Layout/AlignHash:
|
53
|
+
Layout/HashAlignment:
|
62
54
|
Enabled: false
|
63
55
|
|
64
|
-
Layout/
|
56
|
+
Layout/ParameterAlignment:
|
65
57
|
Enabled: false
|
66
58
|
|
67
59
|
Layout/ClosingParenthesisIndentation:
|
@@ -77,13 +69,13 @@ Layout/ElseAlignment:
|
|
77
69
|
Layout/EmptyLineAfterMagicComment:
|
78
70
|
Enabled: false
|
79
71
|
|
80
|
-
Layout/
|
72
|
+
Layout/FirstArrayElementIndentation:
|
81
73
|
Enabled: false
|
82
74
|
|
83
|
-
Layout/
|
75
|
+
Layout/FirstHashElementIndentation:
|
84
76
|
Enabled: false
|
85
77
|
|
86
|
-
Layout/
|
78
|
+
Layout/HeredocIndentation:
|
87
79
|
EnforcedStyle: active_support
|
88
80
|
|
89
81
|
Layout/IndentationWidth:
|
@@ -115,7 +107,7 @@ Layout/SpaceInsideParens:
|
|
115
107
|
Layout/EndAlignment:
|
116
108
|
Enabled: false
|
117
109
|
|
118
|
-
Lint/
|
110
|
+
Lint/SuppressedException:
|
119
111
|
Exclude:
|
120
112
|
- 'config/initializers/mini_profiler.rb'
|
121
113
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,41 @@
|
|
1
1
|
## 5.0.0 (unreleased)
|
2
2
|
|
3
|
+
## 4.6.1 (2020-06-04)
|
4
|
+
|
5
|
+
- Fix 4.6 upgrader
|
6
|
+
|
7
|
+
## 4.6.0 (2020-06-04)
|
8
|
+
|
9
|
+
- Use apt update instead of apt-get in GH action [#1865](https://github.com/AlchemyCMS/alchemy_cms/pull/1865) ([tvdeyen](https://github.com/tvdeyen))
|
10
|
+
- Use depth for page tree serializer root_or_leaf [#1864](https://github.com/AlchemyCMS/alchemy_cms/pull/1864) ([tvdeyen](https://github.com/tvdeyen))
|
11
|
+
- Fix sitemap wrapper height [#1861](https://github.com/AlchemyCMS/alchemy_cms/pull/1861) ([tvdeyen](https://github.com/tvdeyen))
|
12
|
+
- Do not return the root page with API responses. [#1860](https://github.com/AlchemyCMS/alchemy_cms/pull/1860) ([tvdeyen](https://github.com/tvdeyen))
|
13
|
+
- Introduce page.url_path and use it for alchemyPageSelect [#1859](https://github.com/AlchemyCMS/alchemy_cms/pull/1859) ([tvdeyen](https://github.com/tvdeyen))
|
14
|
+
- Update Urlname translation [#1857](https://github.com/AlchemyCMS/alchemy_cms/pull/1857) ([tvdeyen](https://github.com/tvdeyen))
|
15
|
+
- Show url name in Page tree [#1856](https://github.com/AlchemyCMS/alchemy_cms/pull/1856) ([tvdeyen](https://github.com/tvdeyen))
|
16
|
+
- Deprecate Page#visible attribute [#1855](https://github.com/AlchemyCMS/alchemy_cms/pull/1855) ([tvdeyen](https://github.com/tvdeyen))
|
17
|
+
- 4.6: Re-add `auto_logout_time` configuration option [#1852](https://github.com/AlchemyCMS/alchemy_cms/pull/1852) ([mamhoff](https://github.com/mamhoff))
|
18
|
+
- Backport ContentEditor to 4.6, deprecate removed methods on `Alchemy::Content` [#1847](https://github.com/AlchemyCMS/alchemy_cms/pull/1847) ([mamhoff](https://github.com/mamhoff))
|
19
|
+
- Deprecate auto_logout_time (4.6) [#1843](https://github.com/AlchemyCMS/alchemy_cms/pull/1843) ([tvdeyen](https://github.com/tvdeyen))
|
20
|
+
- Deprecate require_ssl (4.6) [#1842](https://github.com/AlchemyCMS/alchemy_cms/pull/1842) ([tvdeyen](https://github.com/tvdeyen))
|
21
|
+
- Deprecate url_nesting configuration (4.6) [#1841](https://github.com/AlchemyCMS/alchemy_cms/pull/1841) ([tvdeyen](https://github.com/tvdeyen))
|
22
|
+
- Allow page visible toggle (4.6) [#1838](https://github.com/AlchemyCMS/alchemy_cms/pull/1838) ([tvdeyen](https://github.com/tvdeyen))
|
23
|
+
|
24
|
+
## 4.5.0 (2020-03-30)
|
25
|
+
|
26
|
+
- Sortable menus [#1758](https://github.com/AlchemyCMS/alchemy_cms/pull/1758) ([mamhoff](https://github.com/mamhoff))
|
27
|
+
- Programmatic menus [#1756](https://github.com/AlchemyCMS/alchemy_cms/pull/1756) ([mamhoff](https://github.com/mamhoff))
|
28
|
+
- Fix syntax in non-erb Menu templates [#1751]((https://github.com/AlchemyCMS/alchemy_cms/pull/1751)) ([Alexander ADAM](https://github.com/alexanderadam))
|
29
|
+
- Fix `render_menu` for custom controllers [#1746]((https://github.com/AlchemyCMS/alchemy_cms/pull/1746)) ([Alexander ADAM](https://github.com/alexanderadam))
|
30
|
+
|
31
|
+
## 4.4.4 (2020-02-28)
|
32
|
+
|
33
|
+
- Fix new menu form [#1740](https://github.com/AlchemyCMS/alchemy_cms/pull/1740) ([tvdeyen](https://github.com/tvdeyen))
|
34
|
+
|
35
|
+
## 4.4.3 (2020-02-26)
|
36
|
+
|
37
|
+
- Scope nodes to sites [#1738](https://github.com/AlchemyCMS/alchemy_cms/pull/1738) ([tvdeyen](https://github.com/tvdeyen))
|
38
|
+
|
3
39
|
## 4.4.2 (2020-02-25)
|
4
40
|
|
5
41
|
- Do not use deprecated methods [#1737](https://github.com/AlchemyCMS/alchemy_cms/pull/1737) ([tvdeyen](https://github.com/tvdeyen))
|
data/alchemy_cms.gemspec
CHANGED
@@ -51,6 +51,7 @@ Gem::Specification.new do |gem|
|
|
51
51
|
gem.add_development_dependency 'rspec-rails', ['>= 4.0.0.beta2']
|
52
52
|
gem.add_development_dependency 'simplecov', ['~> 0.17.1']
|
53
53
|
gem.add_development_dependency 'webdrivers', ['~> 4.0']
|
54
|
+
gem.add_development_dependency 'webmock', ['~> 3.3']
|
54
55
|
gem.add_development_dependency 'shoulda-matchers', ['~> 4.0']
|
55
56
|
|
56
57
|
gem.post_install_message = <<-MSG
|
@@ -15,8 +15,10 @@
|
|
15
15
|
//= require requestAnimationFrame
|
16
16
|
//= require select2
|
17
17
|
//= require handlebars
|
18
|
+
//= require sortable/Sortable.min
|
18
19
|
//= require alchemy/templates
|
19
20
|
//= require alchemy/alchemy.base
|
21
|
+
//= require alchemy/alchemy.utils
|
20
22
|
//= require alchemy/alchemy.autocomplete
|
21
23
|
//= require alchemy/alchemy.browser
|
22
24
|
//= require alchemy/alchemy.buttons
|
@@ -39,6 +41,7 @@
|
|
39
41
|
//= require alchemy/alchemy.link_dialog
|
40
42
|
//= require alchemy/alchemy.list_filter
|
41
43
|
//= require alchemy/alchemy.initializer
|
44
|
+
//= require alchemy/alchemy.node_tree
|
42
45
|
//= require alchemy/alchemy.page_sorter
|
43
46
|
//= require alchemy/alchemy.uploader
|
44
47
|
//= require alchemy/alchemy.preview_window
|
@@ -76,16 +76,16 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
76
76
|
meta = data.meta
|
77
77
|
results:
|
78
78
|
data.pages.map (page) ->
|
79
|
-
id:
|
79
|
+
id: page.url_path
|
80
80
|
name: page.name
|
81
|
-
|
81
|
+
url_path: page.url_path
|
82
82
|
page_id: page.id
|
83
83
|
more: meta.page * meta.per_page < meta.total_count
|
84
84
|
initSelection: ($element, callback) =>
|
85
85
|
urlname = $element.val()
|
86
86
|
$.get Alchemy.routes.api_pages_path,
|
87
87
|
q:
|
88
|
-
urlname_eq: urlname.replace(
|
88
|
+
urlname_eq: urlname.replace(/^\/([a-z]{2}(-[A-Z]{2})?\/)?/, '')
|
89
89
|
page: 1
|
90
90
|
per_page: 1,
|
91
91
|
(data) =>
|
@@ -93,9 +93,9 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
93
93
|
if page
|
94
94
|
@initElementSelect(page.id)
|
95
95
|
callback
|
96
|
-
id:
|
96
|
+
id: page.url_path
|
97
97
|
name: page.name
|
98
|
-
|
98
|
+
url_path: page.url_path
|
99
99
|
page_id: page.id
|
100
100
|
formatSelection: (page) ->
|
101
101
|
page.name
|
@@ -0,0 +1,66 @@
|
|
1
|
+
Alchemy.NodeTree = {
|
2
|
+
onFinishDragging: function (evt) {
|
3
|
+
var url = Alchemy.routes.move_api_node_path(evt.item.dataset.id)
|
4
|
+
var data = {
|
5
|
+
target_parent_id: evt.to.dataset.nodeId,
|
6
|
+
new_position: evt.newIndex
|
7
|
+
};
|
8
|
+
var ajax = Alchemy.ajax('PATCH', url, data)
|
9
|
+
|
10
|
+
ajax.then(function(response) {
|
11
|
+
Alchemy.growl('Successfully moved menu item.')
|
12
|
+
Alchemy.NodeTree.displayNodeFolders()
|
13
|
+
}).catch(function() {
|
14
|
+
Alchemy.growl(error.message || error);
|
15
|
+
})
|
16
|
+
},
|
17
|
+
|
18
|
+
displayNodeFolders: function () {
|
19
|
+
document.querySelectorAll('li.menu-item').forEach(function (el) {
|
20
|
+
var leftIconArea = el.querySelector('.nodes_tree-left_images')
|
21
|
+
var list = el.querySelector('ul')
|
22
|
+
var node = { folded: el.dataset.folded === 'true', id: el.dataset.id }
|
23
|
+
|
24
|
+
if (list.children.length > 0 || node.folded ) {
|
25
|
+
leftIconArea.innerHTML = HandlebarsTemplates.node_folder({ node: node })
|
26
|
+
} else {
|
27
|
+
leftIconArea.innerHTML = ' '
|
28
|
+
}
|
29
|
+
});
|
30
|
+
},
|
31
|
+
|
32
|
+
handleNodeFolders: function() {
|
33
|
+
Alchemy.on('click', '.nodes_tree', '.node_folder', function(evt) {
|
34
|
+
var nodeId = this.dataset.nodeId
|
35
|
+
var menu_item = this.closest('li.menu-item')
|
36
|
+
var url = Alchemy.routes.toggle_folded_api_node_path(nodeId)
|
37
|
+
var list = menu_item.querySelector('.children')
|
38
|
+
var ajax = Alchemy.ajax('PATCH', url)
|
39
|
+
|
40
|
+
ajax.then(function() {
|
41
|
+
list.classList.toggle('folded')
|
42
|
+
menu_item.dataset.folded = menu_item.dataset.folded == 'true' ? 'false' : 'true'
|
43
|
+
Alchemy.NodeTree.displayNodeFolders();
|
44
|
+
}).catch(function(error){
|
45
|
+
Alchemy.growl(error.message || error);
|
46
|
+
});
|
47
|
+
});
|
48
|
+
},
|
49
|
+
|
50
|
+
init: function() {
|
51
|
+
this.handleNodeFolders()
|
52
|
+
this.displayNodeFolders()
|
53
|
+
|
54
|
+
document.querySelectorAll('.nodes_tree ul.children').forEach(function (el) {
|
55
|
+
new Sortable(el, {
|
56
|
+
group: 'nodes',
|
57
|
+
animation: 150,
|
58
|
+
fallbackOnBody: true,
|
59
|
+
swapThreshold: 0.65,
|
60
|
+
handle: '.node_name',
|
61
|
+
invertSwap: true,
|
62
|
+
onEnd: Alchemy.NodeTree.onFinishDragging
|
63
|
+
});
|
64
|
+
});
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Alchemy.on = function (eventName, baseSelector, targetSelector, callback) {
|
2
|
+
var baseNode = document.querySelector(baseSelector)
|
3
|
+
baseNode.addEventListener(eventName, function (evt) {
|
4
|
+
var targets = Array.from(baseNode.querySelectorAll(targetSelector))
|
5
|
+
var currentNode = evt.target
|
6
|
+
while (currentNode !== baseNode) {
|
7
|
+
if (targets.includes(currentNode)) {
|
8
|
+
callback.call(currentNode, evt)
|
9
|
+
return
|
10
|
+
}
|
11
|
+
currentNode = currentNode.parentElement
|
12
|
+
}
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
Alchemy.ajax = function(method, url, data) {
|
17
|
+
var xhr = new XMLHttpRequest()
|
18
|
+
var token = document.querySelector('meta[name="csrf-token"]').attributes.content.textContent
|
19
|
+
var promise = new Promise(function (resolve, reject) {
|
20
|
+
xhr.onload = function() {
|
21
|
+
try {
|
22
|
+
resolve({
|
23
|
+
data: JSON.parse(xhr.responseText),
|
24
|
+
status: xhr.status
|
25
|
+
})
|
26
|
+
} catch (error) {
|
27
|
+
reject(new Error(JSON.parse(xhr.responseText).error))
|
28
|
+
}
|
29
|
+
};
|
30
|
+
xhr.onerror = function() {
|
31
|
+
reject(new Error(xhr.statusText))
|
32
|
+
}
|
33
|
+
});
|
34
|
+
xhr.open(method, url);
|
35
|
+
xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
|
36
|
+
xhr.setRequestHeader('Accept', 'application/json');
|
37
|
+
xhr.setRequestHeader('X-CSRF-Token', token)
|
38
|
+
if (data) {
|
39
|
+
xhr.send(JSON.stringify(data))
|
40
|
+
} else {
|
41
|
+
xhr.send()
|
42
|
+
}
|
43
|
+
|
44
|
+
return promise
|
45
|
+
}
|
@@ -76,7 +76,7 @@ $button-text-shadow: none !default;
|
|
76
76
|
$button-box-shadow: 0px 1px 1px -1px #333 !default;
|
77
77
|
$button-focus-box-shadow: 0px 1px 1px 0px $button-focus-border-color !default;
|
78
78
|
$button-padding: 0.55em 2em !default;
|
79
|
-
$small-button-padding: 0.4em
|
79
|
+
$small-button-padding: 0.4em 0.8em !default;
|
80
80
|
$button-margin: $form-field-margin !default;
|
81
81
|
|
82
82
|
$secondary-button-bg-color: transparent !default;
|
@@ -108,7 +108,7 @@ $form-right-width: 65% !default;
|
|
108
108
|
$sitemap-line-height: 32px !default;
|
109
109
|
$sitemap-page-background-color: rgba($white, 0.75) !default;
|
110
110
|
$sitemap-page-hover-color: rgba($light_yellow, 0.5) !default;
|
111
|
-
$sitemap-info-background-color: rgba($
|
111
|
+
$sitemap-info-background-color: rgba($white, 0.5) !default;
|
112
112
|
$sitemap-highlight-color: rgba(#fffba5, 0.5) !default;
|
113
113
|
|
114
114
|
$main-menu-width: 150px !default;
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
.node_page,
|
20
20
|
.node_url {
|
21
|
-
width:
|
21
|
+
width: 250px;
|
22
22
|
max-width: 45%;
|
23
23
|
white-space: nowrap;
|
24
24
|
text-overflow: ellipsis;
|
@@ -63,6 +63,10 @@
|
|
63
63
|
ul {
|
64
64
|
margin: 0;
|
65
65
|
padding: 0;
|
66
|
+
|
67
|
+
.folded > li {
|
68
|
+
display: none;
|
69
|
+
}
|
66
70
|
}
|
67
71
|
|
68
72
|
li {
|
@@ -106,6 +110,7 @@
|
|
106
110
|
text-decoration: none;
|
107
111
|
overflow: hidden;
|
108
112
|
background-color: $sitemap-page-background-color;
|
113
|
+
cursor: move;
|
109
114
|
|
110
115
|
&.without-status {
|
111
116
|
@include border-right-radius($default-border-radius);
|