camaleon_cms 2.7.4 → 2.8.0

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

Potentially problematic release.


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

Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -20
  3. data/app/apps/plugins/attack/config/config.json +2 -2
  4. data/app/apps/plugins/front_cache/admin_controller.rb +4 -6
  5. data/app/apps/plugins/front_cache/config/config.json +1 -1
  6. data/app/apps/plugins/front_cache/config/locales/translation.yml +1 -1
  7. data/app/apps/plugins/front_cache/front_cache_helper.rb +3 -3
  8. data/app/apps/plugins/visibility_post/config/config.json +2 -2
  9. data/app/apps/themes/camaleon_first/assets/js/main.js +1 -1
  10. data/app/apps/themes/camaleon_first/views/index.html.erb +1 -1
  11. data/app/apps/themes/default/assets/js/main.js +1 -1
  12. data/app/apps/themes/new/assets/js/main.js +1 -1
  13. data/app/apps/themes/new/views/index.html.erb +4 -4
  14. data/app/apps/themes/new/views/layouts/_footer.html.erb +2 -2
  15. data/app/assets/javascripts/camaleon_cms/admin/_posttype.js +7 -6
  16. data/app/assets/javascripts/camaleon_cms/admin/admin-basic-manifest.js +2 -2
  17. data/app/assets/javascripts/camaleon_cms/admin/admin-manifest.js +1 -1
  18. data/app/assets/javascripts/camaleon_cms/admin/nav_menu.js +20 -29
  19. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/de.js +2 -2
  20. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/en.js +2 -2
  21. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/fr.js +2 -2
  22. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/it.js +2 -2
  23. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/nl.js +1 -1
  24. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/pt-BR.js +2 -2
  25. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/ru.js +2 -2
  26. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/uk.js +2 -2
  27. data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/zh-CN.js +1 -1
  28. data/app/assets/javascripts/camaleon_cms/admin/uploader/_media_manager.js +2 -2
  29. data/app/controllers/camaleon_cms/admin/appearances/nav_menus_controller.rb +15 -10
  30. data/app/controllers/camaleon_cms/admin/installers_controller.rb +1 -1
  31. data/app/controllers/camaleon_cms/admin/media_controller.rb +6 -19
  32. data/app/controllers/camaleon_cms/admin/settings_controller.rb +3 -2
  33. data/app/controllers/camaleon_cms/camaleon_controller.rb +8 -2
  34. data/app/decorators/camaleon_cms/application_decorator.rb +8 -0
  35. data/app/decorators/camaleon_cms/category_decorator.rb +3 -2
  36. data/app/decorators/camaleon_cms/post_decorator.rb +5 -5
  37. data/app/decorators/camaleon_cms/post_type_decorator.rb +5 -4
  38. data/app/decorators/camaleon_cms/site_decorator.rb +2 -1
  39. data/app/decorators/camaleon_cms/term_taxonomy_decorator.rb +1 -1
  40. data/app/helpers/camaleon_cms/admin/category_helper.rb +1 -1
  41. data/app/helpers/camaleon_cms/frontend/nav_menu_helper.rb +12 -11
  42. data/app/helpers/camaleon_cms/html_helper.rb +6 -6
  43. data/app/helpers/camaleon_cms/plugins_helper.rb +1 -1
  44. data/app/helpers/camaleon_cms/session_helper.rb +1 -1
  45. data/app/helpers/camaleon_cms/short_code_helper.rb +1 -1
  46. data/app/helpers/camaleon_cms/site_helper.rb +1 -1
  47. data/app/helpers/camaleon_cms/theme_helper.rb +1 -1
  48. data/app/helpers/camaleon_cms/uploader_helper.rb +10 -5
  49. data/app/mailers/camaleon_cms/html_mailer.rb +5 -2
  50. data/app/models/camaleon_cms/ability.rb +1 -1
  51. data/app/models/camaleon_cms/custom_field_group.rb +2 -2
  52. data/app/models/camaleon_cms/nav_menu.rb +1 -1
  53. data/app/models/camaleon_cms/post.rb +1 -1
  54. data/app/models/camaleon_cms/post_default.rb +1 -1
  55. data/app/models/camaleon_cms/post_type.rb +8 -8
  56. data/app/models/camaleon_cms/site.rb +1 -1
  57. data/app/models/camaleon_cms/term_taxonomy.rb +13 -0
  58. data/app/models/concerns/camaleon_cms/custom_fields_read.rb +11 -22
  59. data/app/models/concerns/camaleon_cms/site_default_settings.rb +1 -1
  60. data/app/uploaders/camaleon_cms_uploader.rb +5 -0
  61. data/app/validators/camaleon_cms/post_uniq_validator.rb +15 -15
  62. data/app/validators/camaleon_cms/uniq_validator.rb +9 -3
  63. data/app/validators/camaleon_cms/user_url_validator.rb +207 -0
  64. data/app/views/camaleon_cms/admin/media/index.html.erb +1 -1
  65. data/app/views/camaleon_cms/admin/settings/_email_settings.html.erb +2 -2
  66. data/app/views/camaleon_cms/default_theme/index.html.erb +4 -4
  67. data/app/views/camaleon_cms/default_theme/sitemap.xml.builder +3 -3
  68. data/app/views/layouts/camaleon_cms/admin/_footer.html.erb +1 -1
  69. data/config/initializers/custom_initializers.rb +14 -0
  70. data/config/locales/camaleon_cms/admin/en.yml +11 -1
  71. data/lib/camaleon_cms/engine.rb +1 -1
  72. data/lib/camaleon_cms/version.rb +1 -1
  73. data/lib/ext/hash.rb +1 -1
  74. data/lib/ext/string.rb +2 -2
  75. data/lib/generators/camaleon_cms/theme_template/assets/js/main.js +1 -1
  76. metadata +50 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db5860768212ca0703d01e3d2b16a691d5972917905bab1740cf16a1fb79ab58
4
- data.tar.gz: cd0b90107912e5281d49d4a0070734a9db641deadb27f9671d27a13a297c8c71
3
+ metadata.gz: b37bf38981929866b3502a12e452ed0289275c2809bf3f924bb19abc10fcc9f7
4
+ data.tar.gz: 7f14b8b21e2d56e64f1325174158597c3487b055573516ec8189e0d68e85c415
5
5
  SHA512:
6
- metadata.gz: bfc9b376433413768f22e2b191f0f977697c8789004ef91eab78edd683ae22914a4a194c1e8568fa4d074a3eb5f7773b1d492298121b8afb64731c87bd390f8b
7
- data.tar.gz: 99f90a12596bc5d24a8dd73555cba291d3140f84f4c5373931b6b62a8a79301126020c7de1a82b4fea7b4c5019062bbfc3573ad5e614584ab8777fc7e6767a2a
6
+ metadata.gz: 9511c75f6413994762b0adf8ad6a425bd1db659cf53d584415f9f7bcd8e805124a4841f604c477676e7a6c5f4785a6769e7eb5f26976e5e9cc35865150ecd40e
7
+ data.tar.gz: 9d41f8a59f06d66f78e3a34342ef82124c49eee21d694b06d6c5f8086880ebc157518d88d99d38ae59f835120e2173ffe6c05f40c9d865e665de77cd1e02b6ff
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # CAMALEON CMS
2
2
 
3
- ![](http://camaleon.tuzitio.com/media/132/logo2.png)
3
+ ![](https://camaleon.website/media/132/logo2.png)
4
4
 
5
5
  [![Test supported versions](https://github.com/owen2345/camaleon-cms/actions/workflows/current_support.yml/badge.svg)](https://github.com/owen2345/camaleon-cms/actions/workflows/current_support.yml)
6
6
  ![](https://img.shields.io/badge/Support-Immediate-green.svg)
7
7
 
8
- [Website](http://camaleon.tuzitio.com/)
8
+ [Website](https://camaleon.website/)
9
9
 
10
- [Documentation](http://camaleon.tuzitio.com/docs.html)
10
+ [Documentation](https://camaleon.website/docs.html)
11
11
 
12
- [Demonstration](http://camaleon.tuzitio.com/plugins/demo_manage/)
12
+ [Demonstration](https://camaleon.website/plugins/demo_manage/)
13
13
 
14
14
  ## About
15
15
 
@@ -18,10 +18,10 @@ Camaleon CMS is a dynamic and advanced content management system based on Ruby o
18
18
  Camaleon CMS is a flexible manager where you can build your custom content structure without coding anything by custom fields and custom contents type.
19
19
 
20
20
  To download or publish themes go to Theme store:
21
- http://camaleon.tuzitio.com/store/themes
21
+ https://camaleon.website/store/themes
22
22
 
23
23
  To download or publish plugins go to Plugin store:
24
- http://camaleon.tuzitio.com/store/plugins
24
+ https://camaleon.website/store/plugins
25
25
 
26
26
  ![](screenshot.png)
27
27
 
@@ -86,9 +86,9 @@ http://camaleon.tuzitio.com/store/plugins
86
86
  * TinyMCE Template Integration - https://github.com/owen2345/Camaleon-Tinymce-Templates
87
87
  * Download Manager - https://github.com/max2320/camaleon-download
88
88
  * OAuth - https://github.com/owen2345/camaleon_oauth
89
- * Visual Editor - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/camaleon_editor
90
- * Spree Commerce Integration - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/camaleon-spree
91
- * Admin AJAX - Paid Plugin ($) - http://camaleon.tuzitio.com/store/plugins/admin_ajax
89
+ * Visual Editor - Paid Plugin ($) - https://camaleon.website/store/plugins/camaleon_editor
90
+ * Spree Commerce Integration - Paid Plugin ($) - https://camaleon.website/store/plugins/camaleon-spree
91
+ * Admin AJAX - Paid Plugin ($) - https://camaleon.website/store/plugins/admin_ajax
92
92
  * **See here for a complete Gemfile**: https://github.com/owen2345/camaleon-cms/blob/master/docs/example_gemfile.rb
93
93
 
94
94
  ## Camaleon CMS has many useful frontend Themes such as:
@@ -96,17 +96,17 @@ http://camaleon.tuzitio.com/store/plugins
96
96
  * Clean Theme (Built in)
97
97
  * Wordpress Theme (Built in)
98
98
  * eCommerce - https://github.com/owen2345/cama-ecommerce-theme
99
- * eFashion - http://camaleon.tuzitio.com/store/themes/eFashion (Github: https://github.com/mazharoddin/camaleon-cms-efashion)
100
- * Shoppy - http://camaleon.tuzitio.com/store/themes/shoppy (Github: https://github.com/mazharoddin/camaleon-cms-shoppy)
101
- * CV - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/cv
102
- * Camaleon Site - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/camaleon_cms
103
- * Sky - Paid Theme ($) - http://camaleon.tuzitio.com/store/themes/sky
99
+ * eFashion - https://camaleon.website/store/themes/eFashion (Github: https://github.com/mazharoddin/camaleon-cms-efashion)
100
+ * Shoppy - https://camaleon.website/store/themes/shoppy (Github: https://github.com/mazharoddin/camaleon-cms-shoppy)
101
+ * CV - Paid Theme ($) - https://camaleon.website/store/themes/cv
102
+ * Camaleon Site - Paid Theme ($) - https://camaleon.website/store/themes/camaleon_cms
103
+ * Sky - Paid Theme ($) - https://camaleon.website/store/themes/sky
104
104
 
105
105
 
106
106
  ## Requirements
107
- * Rails 6.0+
107
+ * Rails 6.1+
108
108
  * PostgreSQL, MySQL 5+ or SQlite
109
- * Ruby 2.7+
109
+ * Ruby 3.0+
110
110
  * Imagemagick
111
111
 
112
112
  ## Installation
@@ -160,7 +160,7 @@ http://camaleon.tuzitio.com/store/plugins
160
160
  * Go to your browser and visit http://localhost:3000/
161
161
 
162
162
  ## Sample App / Demonstration
163
- * [Camaleon Server (current version)](http://camaleon.tuzitio.com/plugins/demo_manage/)
163
+ * [Camaleon Server (current version)](https://camaleon.website/plugins/demo_manage/)
164
164
  * [Sample App](https://github.com/brian-kephart/Camaleon-CMS-Sample)
165
165
  * [Deploy Sample App in Heroku](https://heroku.com/deploy?template=https://github.com/brian-kephart/Camaleon-CMS-Sample)
166
166
 
@@ -171,13 +171,13 @@ If you need support, need some extra functionality or need plugins, please conta
171
171
  * Email: owenperedo@gmail.com
172
172
  * Skype: owen-2345
173
173
  * Stack Overflow: Use "camaleon" as tag to ask questions related to this CMS (don't forget to include cms version + rails version).
174
- * Site: http://camaleon.tuzitio.com/
174
+ * Site: https://camaleon.website/
175
175
 
176
176
  ## Author
177
177
  Owen Peredo Diaz
178
178
 
179
179
  ## License
180
- http://camaleon.tuzitio.com/license.html
180
+ https://camaleon.website/license.html
181
181
 
182
182
  ## Testing
183
183
  * Init DB
@@ -199,7 +199,7 @@ bundle exec rspec
199
199
 
200
200
  ## Version History
201
201
 
202
- http://camaleon.tuzitio.com/version-history.html
202
+ https://camaleon.website/version-history.html
203
203
 
204
204
  Previous stable version (v1.x): https://github.com/owen2345/camaleon-cms/tree/version_1x
205
205
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Attack",
3
- "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/2'>here.</a>",
3
+ "descr": "Please check documentation <a href='https://camaleon.website/store/plugins/2'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "attack",
6
6
  "position": 1,
@@ -28,4 +28,4 @@
28
28
  ]
29
29
  //here you can add all your hooks (read documentation)
30
30
  }
31
- }
31
+ }
@@ -8,12 +8,10 @@ module Plugins
8
8
  end
9
9
 
10
10
  def save_settings
11
- current_site.set_meta('front_cache_elements', { paths: ((params[:cache][:paths] || []).delete_if do |a|
12
- !a.present?
13
- end || []),
14
- posts: (params[:cache][:posts] || []),
15
- post_types: (params[:cache][:post_type] || []),
16
- skip_posts: (params[:cache][:skip_posts] || []),
11
+ current_site.set_meta('front_cache_elements', { paths: (params[:cache][:paths] || []).compact_blank || [],
12
+ posts: params[:cache][:posts] || [],
13
+ post_types: params[:cache][:post_type] || [],
14
+ skip_posts: params[:cache][:skip_posts] || [],
17
15
  cache_login: params[:cache][:cache_login],
18
16
  home: params[:cache][:home],
19
17
  preserve_cache_on_restart: params[:cache][:preserve_cache_on_restart],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Front Cache",
3
- "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/3'>here.</a>",
3
+ "descr": "Please check documentation <a href='https://camaleon.website/store/plugins/3'>here.</a>",
4
4
  "version": "0.2",
5
5
  "key": "front_cache",
6
6
  "position": 1,
@@ -5,7 +5,7 @@ en:
5
5
  button:
6
6
  add_new_path: 'Add new path'
7
7
  custom_url_paths: 'Custom url paths'
8
- custom_url_samples: 'Enter paths/urls like /contact or /my_section?p=a&... or /static-pages/(.*) or /test-([0-9]+)/?\?owen=true&var2=([a-z]+) or http://static.mydomain.com/(.*)'
8
+ custom_url_samples: 'Enter paths/urls like /contact or /my_section?p=a&... or /static-pages/(.*) or /test-([0-9]+)/?\?owen=true&var2=([a-z]+) or https://static.mydomain.com/(.*)'
9
9
  clean_cache: 'Clean cache'
10
10
  title: 'Frontend cache pages'
11
11
  home_page: 'Home Page'
@@ -26,8 +26,8 @@ module Plugins
26
26
  if @caches[:paths].include?(request.original_url) || @caches[:paths].include?(request.path_info) || front_cache_plugin_match_path_patterns?(request.original_url, request.path_info) || (params[:action] == 'index' && params[:controller] == 'camaleon_cms/frontend' && @caches[:home].present?) # cache paths and home page
27
27
  @_plugin_do_cache = true
28
28
  elsif params[:action] == 'post' && params[:controller] == 'camaleon_cms/frontend' && !params[:draft_id].present?
29
- begin
30
- post = current_site.the_posts.find_by_slug(params[:slug]).decorate
29
+ if (post = current_site.the_posts.find_by_slug(params[:slug]))
30
+ post = post.decorate
31
31
  if post.can_visit? && post.visibility != 'private'
32
32
  if (@caches[:skip_posts] || []).include?(post.id.to_s)
33
33
  @_plugin_do_cache = false
@@ -35,9 +35,9 @@ module Plugins
35
35
  @_plugin_do_cache = true
36
36
  end
37
37
  end
38
- rescue StandardError # skip post not found
39
38
  end
40
39
  end
40
+
41
41
  response.headers['PLUGIN_FRONT_CACHE'] = 'TRUE' if @_plugin_do_cache
42
42
  end
43
43
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Visibility Posts",
3
- "descr": "Permit to manage the permission of visualization for your contents (Public, Private, Password, Date from visibility). More info: <a target='_blank' href='http://camaleon.tuzitio.com/store/plugins/visibility_posts'>here.</a>",
3
+ "descr": "Permit to manage the permission of visualization for your contents (Public, Private, Password, Date from visibility). More info: <a target='_blank' href='https://camaleon.website/store/plugins/visibility_posts'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "visibility_post",
6
6
  "helpers": [
@@ -21,4 +21,4 @@
21
21
  "post_can_visit": ["plugin_visibility_can_visit"],
22
22
  "list_post_extra_columns": ["plugin_visibility_extra_columns"]
23
23
  }
24
- }
24
+ }
@@ -10,7 +10,7 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/bootstrap.min.js
15
15
  //= require ./modernizr.custom
16
16
  //= require ./magnific.min
@@ -19,7 +19,7 @@
19
19
  <!-- PORTFOLIO ITEM -->
20
20
  <div class="col-lg-4">
21
21
  <a class="zoom green" href="<%= post.the_url %>" title="<%= post.the_title %>" >
22
- <img width="400" height="300" src="<%= post.the_thumb_url("http://gentsthemes.com/demo/stanleywp/wp-content/uploads/sites/5/2014/01/port03.jpg") %>" class="attachment-post-thumbnail wp-post-image" alt="post image" /> </a>
22
+ <img width="400" height="300" src="<%= post.the_thumb_url("https://bootstrapwp.com/wp-content/uploads/edd/2016/01/stanleywp.jpg") %>" class="attachment-post-thumbnail wp-post-image" alt="post image" /> </a>
23
23
 
24
24
  <p><%= post.the_title %></p>
25
25
  </div> <!-- /col -->
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
@@ -10,5 +10,5 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/bootstrap.min
@@ -12,19 +12,19 @@
12
12
  <!-- Wrapper for slides -->
13
13
  <div class="carousel-inner">
14
14
  <div class="item active">
15
- <img src="http://placehold.it/800x400" alt="...">
15
+ <img src="https://placehold.it/800x400" alt="...">
16
16
  <div class="carousel-caption">
17
17
  <h2>Heading</h2>
18
18
  </div>
19
19
  </div>
20
20
  <div class="item">
21
- <img src="http://placehold.it/800x400" alt="...">
21
+ <img src="https://placehold.it/800x400" alt="...">
22
22
  <div class="carousel-caption">
23
23
  <h2>Heading</h2>
24
24
  </div>
25
25
  </div>
26
26
  <div class="item">
27
- <img src="http://placehold.it/800x400" alt="...">
27
+ <img src="https://placehold.it/800x400" alt="...">
28
28
  <div class="carousel-caption">
29
29
  <h2>Heading</h2>
30
30
  </div>
@@ -68,4 +68,4 @@
68
68
  </div>
69
69
 
70
70
  </div>
71
- </section>
71
+ </section>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <ul class="list-inline">
6
6
  <li class="pull-right"><a href="#top">Back to top</a></li>
7
- <li><a href="http://feeds.feedburner.com/bootswatch">RSS</a></li>
7
+ <li><a href="https://feeds.feedburner.com/bootswatch">RSS</a></li>
8
8
  <li><a href="https://twitter.com/bootswatch">Twitter</a></li>
9
9
  <li><a href="https://github.com/thomaspark/bootswatch/">GitHub</a></li>
10
10
  <li><a href="../help/#api">API</a></li>
@@ -14,4 +14,4 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
- </footer>
17
+ </footer>
@@ -9,18 +9,18 @@ window.cama_init_posttype_form = function() {
9
9
 
10
10
  item.parent().siblings().find('input').prop('disabled', $(this).is(':checked'))
11
11
  if ($(this).is(':checked'))
12
- return item.prop('checked', true).prop('disabled', false)
12
+ item.prop('checked', true).prop('disabled', false)
13
13
  else
14
- return item.prop('disabled', true)
14
+ item.prop('disabled', true)
15
15
  }).trigger('change')
16
16
 
17
17
  form.find('[name="meta[has_picture]"]').change(function() {
18
18
  const items = form.find('.picture_settings input')
19
19
 
20
20
  if ($(this).is(':checked'))
21
- return items.prop('disabled', false)
21
+ items.prop('disabled', false)
22
22
  else
23
- return items.prop('disabled', true)
23
+ items.prop('disabled', true)
24
24
  }).trigger('change')
25
25
 
26
26
  // toggle single and multiple categories checkbox
@@ -28,9 +28,10 @@ window.cama_init_posttype_form = function() {
28
28
  'input:checkbox[name="meta[has_category]"], input:checkbox[name="meta[has_single_category]"]'
29
29
  )
30
30
 
31
- return catChecks.change(
31
+ catChecks.change(
32
32
  function() {
33
- if ($(this).is(':checked')) return catChecks.not(this).prop('checked', false)
33
+ if ($(this).is(':checked'))
34
+ catChecks.not(this).prop('checked', false)
34
35
  }
35
36
  ).filter(':checked').trigger('change')
36
37
  }
@@ -1,3 +1,3 @@
1
- //= require jquery
1
+ //= require jquery2
2
2
  //= require camaleon_cms/bootstrap.min
3
- //= require ./jquery.validate
3
+ //= require ./jquery.validate
@@ -10,7 +10,7 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require jquery
13
+ //= require jquery2
14
14
  //= require camaleon_cms/admin/_data
15
15
  //= require camaleon_cms/bootstrap.min
16
16
  //= require camaleon_cms/admin/_jquery-ui.min
@@ -1,9 +1,3 @@
1
- /*
2
- * decaffeinate suggestions:
3
- * DS102: Remove unnecessary code created because of implicit returns
4
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
5
- */
6
-
7
1
  /* eslint-env jquery */
8
2
  $(function() {
9
3
  const panel = $('#menu_content')
@@ -21,11 +15,11 @@ $(function() {
21
15
  return
22
16
 
23
17
  panel.find('#menu_reoreder_loading').show()
24
- return $.post(listPanel.attr('data-reorder_url'), data, function(res) {
18
+ $.post(listPanel.attr('data-reorder_url'), data, function(res) {
25
19
  lastData = data
26
20
  panel.find('#menu_reoreder_loading').hide()
27
21
  if (res)
28
- return alert(res)
22
+ alert(res)
29
23
  })
30
24
  })
31
25
 
@@ -33,13 +27,10 @@ $(function() {
33
27
  const saveMenu = function(data) {
34
28
  showLoading()
35
29
 
36
- return $.post(
37
- listPanel.attr('data-url'),
38
- data,
39
- function(res) {
40
- listPanel.children('.dd-list').append($(res).children())
41
- return hideLoading()
42
- })
30
+ $.post(listPanel.attr('data-url'), data, function(res) {
31
+ listPanel.children('.dd-list').append($(res).children())
32
+ hideLoading()
33
+ })
43
34
  }
44
35
 
45
36
  // add menu items (non-external)
@@ -48,7 +39,7 @@ $(function() {
48
39
  let flag = false
49
40
  $(this).closest('.panel').find('input:checkbox:checked').each(function() {
50
41
  flag = true
51
- return data.items.push({ id: $(this).val(), kind: $(this).closest('.class_type').attr('data-type') })
42
+ data.items.push({ id: $(this).val(), kind: $(this).closest('.class_type').attr('data-type') })
52
43
  }).prop('checked', false)
53
44
 
54
45
  if (!flag)
@@ -64,7 +55,7 @@ $(function() {
64
55
  let flag = false
65
56
  $(this).closest('.panel').find('input:checkbox:checked').each(function() {
66
57
  flag = true
67
- return data.custom_items.push({ url: $(this).val(), kind: $(this).attr('data-kind'), label: $(this).attr('data-label') })
58
+ data.custom_items.push({ url: $(this).val(), kind: $(this).attr('data-kind'), label: $(this).attr('data-label') })
68
59
  }).prop('checked', false)
69
60
 
70
61
  if (!flag)
@@ -93,10 +84,10 @@ $(function() {
93
84
  title: link.attr('data-original-title') || link.attr('title'),
94
85
  url: link.attr('href'),
95
86
  mode: 'ajax',
96
- callback(modal) {
87
+ callback: (modal) => {
97
88
  const form = modal.find('form')
98
89
  init_form_validations(form)
99
- return form.submit(function() {
90
+ form.submit(function() {
100
91
  if (!form.valid())
101
92
  return false
102
93
 
@@ -104,7 +95,7 @@ $(function() {
104
95
  $.post(form.attr('action'), form.serialize(), function(res) {
105
96
  link.closest('li').replaceWith($(res).html())
106
97
  modal.modal('hide')
107
- return hideLoading()
98
+ hideLoading()
108
99
  })
109
100
  return false
110
101
  })
@@ -122,39 +113,39 @@ $(function() {
122
113
  showLoading()
123
114
  $.get(link.attr('href'), function() {
124
115
  link.closest('.dd-item').remove()
125
- return hideLoading()
116
+ hideLoading()
126
117
  })
127
118
  return false
128
119
  })
129
120
 
130
121
  // new menu
131
122
  panel.find('.new_menu_link, .edit_menu_link').ajax_modal({
132
- callback(modal) {
123
+ callback: (modal) => {
133
124
  const form = modal.find('form')
134
125
 
135
- return setTimeout(() => init_form_validations(form), 1000)
126
+ setTimeout(() => init_form_validations(form), 1000)
136
127
  }
137
128
  })
138
129
 
139
130
  // menus list - change dropdown
140
- panel.find('#menu_items #switch_nav_menuForm select').change(function() {
131
+ panel.find('#menu_items #switch_nav_menu_form select').change(function() {
141
132
  if (!$(this).val())
142
133
  return
143
134
 
144
- return $(this).closest('form').submit()
135
+ $(this).closest('form').submit()
145
136
  })
146
137
 
147
138
  // custom fields
148
- return listPanel.on('click', '.custom_settings_link', function() {
139
+ listPanel.on('click', '.custom_settings_link', function() {
149
140
  const link = $(this)
150
141
  open_modal({
151
142
  title: link.attr('data-original-title') || link.attr('title'),
152
143
  url: link.attr('href'),
153
144
  mode: 'ajax',
154
- callback(modal) {
145
+ callback: (modal) => {
155
146
  const form = modal.find('form')
156
147
  init_form_validations(form)
157
- return form.submit(function() {
148
+ form.submit(function() {
158
149
  if (!form.valid())
159
150
  return false
160
151
 
@@ -164,7 +155,7 @@ $(function() {
164
155
  alert(res)
165
156
 
166
157
  modal.modal('hide')
167
- return hideLoading()
158
+ hideLoading()
168
159
  })
169
160
  return false
170
161
  })
@@ -121,7 +121,7 @@ tinymce.addI18n('de',{
121
121
  "Insert link": "Link einf\u00fcgen",
122
122
  "New window": "Neues Fenster",
123
123
  "None": "Keine",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"https:\/\/\" voranstellen?",
125
125
  "Target": "Ziel",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",
127
127
  "Insert\/edit link": "Link einf\u00fcgen\/bearbeiten",
@@ -216,4 +216,4 @@ tinymce.addI18n('de',{
216
216
  "View": "Ansicht",
217
217
  "Table": "Tabelle",
218
218
  "Format": "Format"
219
- });
219
+ });
@@ -91,7 +91,7 @@ tinymce.addI18n('en_GB',{
91
91
  "Insert link": "Insert link",
92
92
  "New window": "New window",
93
93
  "None": "None",
94
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?",
94
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?",
95
95
  "Target": "Target",
96
96
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
97
97
  "Insert\/edit link": "Insert\/edit link",
@@ -176,4 +176,4 @@ tinymce.addI18n('en_GB',{
176
176
  "View": "View",
177
177
  "Table": "Table",
178
178
  "Format": "Format"
179
- });
179
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('fr_FR',{
121
121
  "Insert link": "Ins\u00e9rer un lien",
122
122
  "New window": "Nouvelle fen\u00eatre",
123
123
  "None": "n\/a",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe https:\/\/ n\u00e9cessaire?",
125
125
  "Target": "Cible",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre une adresse e-mail. Voulez-vous ajouter le pr\u00e9fixe mailto: n\u00e9cessaire?",
127
127
  "Insert\/edit link": "Ins\u00e9rer\/modifier un lien",
@@ -216,4 +216,4 @@ tinymce.addI18n('fr_FR',{
216
216
  "View": "Voir",
217
217
  "Table": "Tableau",
218
218
  "Format": "Format"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('it',{
121
121
  "Insert link": "Inserisci il Link",
122
122
  "New window": "Nuova Finestra",
123
123
  "None": "No",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario http:\/\/?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "L'URL inserito sembra essere un collegamento esterno. Vuoi aggiungere il prefisso necessario https:\/\/?",
125
125
  "Target": "Target",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL inserito sembra essere un indirizzo email. Vuoi aggiungere il prefisso necessario mailto:?",
127
127
  "Insert\/edit link": "Inserisci\/Modifica Link",
@@ -216,4 +216,4 @@ tinymce.addI18n('it',{
216
216
  "View": "Visualiza",
217
217
  "Table": "Tabella",
218
218
  "Format": "Formato"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('nl',{
121
121
  "Insert link": "Hyperlink invoegen",
122
122
  "New window": "Nieuw venster",
123
123
  "None": "Geen",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"http:\/\/\" aan toevoegen?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "De ingegeven URL verwijst naar een extern adres. Wil je er \"https:\/\/\" aan toevoegen?",
125
125
  "Target": "Doel",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "De ingegeven URL lijkt op een e-mailadres. Wil je er \"mailto:\" aan toevoegen?",
127
127
  "Insert\/edit link": "Hyperlink invoegen\/bewerken",
@@ -121,7 +121,7 @@ tinymce.addI18n('pt-BR',{
121
121
  "Insert link": "Inserir link",
122
122
  "New window": "Nova janela",
123
123
  "None": "Nenhum",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "A URL que voc\u00ea informou parece ser um link externo. Deseja incluir o prefixo http:\/\/?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "A URL que voc\u00ea informou parece ser um link externo. Deseja incluir o prefixo https:\/\/?",
125
125
  "Target": "Alvo",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
127
127
  "Insert\/edit link": "Inserir\/editar link",
@@ -216,4 +216,4 @@ tinymce.addI18n('pt-BR',{
216
216
  "View": "Visualizar",
217
217
  "Table": "Tabela",
218
218
  "Format": "Formatar"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('ru',{
121
121
  "Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
122
122
  "New window": "\u0412 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",
123
123
  "None": "\u041d\u0435\u0442",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttp:\/\/\u00bb?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abhttps:\/\/\u00bb?",
125
125
  "Target": "\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0412\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abmailto:\u00bb?",
127
127
  "Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443",
@@ -216,4 +216,4 @@ tinymce.addI18n('ru',{
216
216
  "View": "\u0412\u0438\u0434",
217
217
  "Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u0430",
218
218
  "Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('uk',{
121
121
  "Insert link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
122
122
  "New window": "\u0423 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456",
123
123
  "None": "\u041d\u0456",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 http:\/\/ \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 https:\/\/ \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
125
125
  "Target": "\u0412\u0456\u0434\u043a\u0440\u0438\u0432\u0430\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u0421\u0445\u043e\u0436\u0435, \u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u043b\u0438 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438. \u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 mailto: \u043f\u0440\u0435\u0444\u0456\u043a\u0441?",
127
127
  "Insert\/edit link": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438\/\u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",
@@ -216,4 +216,4 @@ tinymce.addI18n('uk',{
216
216
  "View": "\u0412\u0438\u0433\u043b\u044f\u0434",
217
217
  "Table": "\u0422\u0430\u0431\u043b\u0438\u0446\u044f",
218
218
  "Format": "\u0424\u043e\u0440\u043c\u0430\u0442"
219
- });
219
+ });
@@ -121,7 +121,7 @@ tinymce.addI18n('zh-CN',{
121
121
  "Insert link": "\u63d2\u5165\u94fe\u63a5",
122
122
  "New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00",
123
123
  "None": "\u65e0",
124
- "The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f",
124
+ "The URL you entered seems to be an external link. Do you want to add the required https:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttps:\/\/:\u524d\u7f00\u5417\uff1f",
125
125
  "Target": "\u6253\u5f00\u65b9\u5f0f",
126
126
  "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f",
127
127
  "Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5",