trusty-cms 7.0.4 → 7.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '05933f41895532d7fe76ff1dfef0d58a2ca32616cc65d1371de837b8205fb038'
4
- data.tar.gz: b0fb2ed52eba017ff08af74846e4e299fd21307f740954004002097a9279dbfd
3
+ metadata.gz: 1200948dac13c1012f25a55e977598239c22b70b3391008962b378c235fa6cb7
4
+ data.tar.gz: 6bdd05cafa5ff067e6a409bece0b952eed391e767260a0e069fbda25f46f68af
5
5
  SHA512:
6
- metadata.gz: 863fe6620bddab68ac18164ba50a1b60e785f00efdfd8a16f907045d2f5fe5fa372b30352c3a7ea4e13bf89200823f3fc181ee4937a49e7f9d3d70bcf9338740
7
- data.tar.gz: 16f1007d43c8ab0f8c52f36d1d90dae8d9652caaa0ad1f7e55b7a6d6699b1cdff6ab1e6f5ec059270e434bdb9d119449351f608dbd3a115c49b0c3d786a1f7f1
6
+ metadata.gz: 92bba35d94a6c81c165d6e3aac5d54f3de2f5b51025a0c09d6187ab32aa14703c0bb8e6b9fe5a1f7d1a419fa540ce6d6db4bd06e6c3ef64be09c622b52f34184
7
+ data.tar.gz: 8b574e8d01b855debfb6b91859f589d79d111bcb9fe3b80eceb77d26a2ac65852cd3ab3693f727aa8a793a1f9a56ac05bb541af40f2cdae769583c07c1ba73e9
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ group :development, :test do
21
21
  gem 'mysql2'
22
22
  gem 'poltergeist', '~> 1.18.1'
23
23
  gem 'pry-byebug'
24
- gem 'psych', '5.2.0'
24
+ gem 'psych', '5.2.2'
25
25
  gem 'rails-observers'
26
26
  gem 'ransack'
27
27
  gem 'rspec-rails'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (7.0.3)
4
+ trusty-cms (7.0.6)
5
5
  RedCloth (= 4.3.3)
6
6
  activestorage-validator
7
7
  acts_as_list (>= 0.9.5, < 1.3.0)
@@ -115,7 +115,7 @@ GEM
115
115
  public_suffix (>= 2.0.2, < 7.0)
116
116
  base64 (0.2.0)
117
117
  bcrypt (3.1.20)
118
- bigdecimal (3.1.8)
118
+ bigdecimal (3.1.9)
119
119
  builder (3.3.0)
120
120
  byebug (11.1.3)
121
121
  capybara (3.40.0)
@@ -266,7 +266,8 @@ GEM
266
266
  pry-byebug (3.10.1)
267
267
  byebug (~> 11.0)
268
268
  pry (>= 0.13, < 0.15)
269
- psych (5.2.0)
269
+ psych (5.2.2)
270
+ date
270
271
  stringio
271
272
  public_suffix (6.0.1)
272
273
  racc (1.8.1)
@@ -275,7 +276,7 @@ GEM
275
276
  rack (>= 0.4)
276
277
  rack-test (2.1.0)
277
278
  rack (>= 1.3)
278
- radius (0.7.5)
279
+ radius (0.8.0)
279
280
  rails (7.0.8.7)
280
281
  actioncable (= 7.0.8.7)
281
282
  actionmailbox (= 7.0.8.7)
@@ -311,7 +312,7 @@ GEM
311
312
  activerecord (>= 6.1.5)
312
313
  activesupport (>= 6.1.5)
313
314
  i18n
314
- rdoc (6.8.1)
315
+ rdoc (6.10.0)
315
316
  psych (>= 4.0.0)
316
317
  regexp_parser (2.9.2)
317
318
  reline (0.5.11)
@@ -414,7 +415,7 @@ DEPENDENCIES
414
415
  mysql2
415
416
  poltergeist (~> 1.18.1)
416
417
  pry-byebug
417
- psych (= 5.2.0)
418
+ psych (= 5.2.2)
418
419
  rails-observers
419
420
  ransack
420
421
  rspec-rails
@@ -4,3 +4,4 @@
4
4
  //= link admin/assets.css
5
5
  //= link admin/assets_admin.js
6
6
  //= link admin/custom_file_upload.js
7
+ //= link admin/validations/scheduled_status_validation.js
@@ -36,9 +36,8 @@ $(document).ready(function() {
36
36
  return true;
37
37
  }
38
38
 
39
- function validateDateTime() {
39
+ function validateDateTime(status) {
40
40
  const publishedAt = $('#page_published_at').val();
41
- const status = $('#page_status_id').val();
42
41
  const publishedTime = new Date(publishedAt);
43
42
  const currentTime = new Date();
44
43
 
@@ -49,10 +48,14 @@ $(document).ready(function() {
49
48
  if (status === '100') {
50
49
  return validatePublishedStatus(publishedTime, currentTime);
51
50
  }
51
+
52
+ return true;
52
53
  }
53
54
 
54
55
  $('#save-button, #save-and-continue-button').on('click', function(event) {
55
- if (!validateDateTime()) {
56
+ const status = $('#page_status_id').val();
57
+
58
+ if (status && !validateDateTime(status)) {
56
59
  event.preventDefault();
57
60
  event.stopImmediatePropagation();
58
61
  }
@@ -1,5 +1,3 @@
1
- = javascript_include_tag 'admin/validations/scheduled_status_validation'
2
-
3
1
  = fields.hidden_field :lock_version
4
2
  = fields.hidden_field :parent_id
5
3
  = fields.hidden_field :class_name
@@ -73,10 +71,6 @@
73
71
  #preview_panel.fullcover.grey_out{:style => 'display: none;'}
74
72
  %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => 'auto'}
75
73
  .preview_tools
76
- =submit_tag(t('buttons.save_changes'), :class => 'big save_changes')
77
- =submit_tag(t('buttons.save_and_continue'), :class => 'big save_and_continue', :name => 'continue')
78
- %span.info
79
- = t('or')
80
- =link_to(t('edit_page'),{}, :class => 'cancel')
74
+ =link_to(t('edit_page'), {}, :class => 'button cancel')
81
75
  - form_bottom.edit_timestamp do
82
76
  = updated_stamp @page
@@ -1,4 +1,4 @@
1
1
  module TrustyCms
2
- VERSION = '7.0.4'.freeze
2
+ VERSION = '7.0.6'.freeze
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-02 00:00:00.000000000 Z
11
+ date: 2025-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator