trusty-cms 7.0.42 → 7.0.44

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.
@@ -2,15 +2,16 @@ module Admin::UrlHelper
2
2
  require 'uri'
3
3
 
4
4
  def format_path(path)
5
- return '' if path.to_s.empty?
6
-
7
- parts = path.split('/').reject(&:empty?)
8
- parts_size = parts.size
9
- return 'Root' if parts_size == 1
10
- return '/' if parts_size == 2
11
-
12
- formatted_path = parts[1..-2].join('/')
13
- formatted_path.empty? ? '/' : "/#{formatted_path}"
5
+ parts = path.to_s.split('/').reject(&:empty?)
6
+
7
+ case parts.size
8
+ when 0 then ''
9
+ when 1 then 'Root'
10
+ when 2 then '/'
11
+ else
12
+ subpath = parts[1..-2].to_a.join('/')
13
+ subpath.empty? ? '/' : "/#{subpath}"
14
+ end
14
15
  end
15
16
 
16
17
  def generate_page_url(url, page)
@@ -15,7 +15,7 @@ export default class AssetTagBuilder extends Plugin {
15
15
  allowWhere: '$text',
16
16
  isInline: true,
17
17
  isObject: true,
18
- allowAttributes: [ 'id', 'size', 'alt' ]
18
+ allowAttributes: [ 'id', 'size', 'alt', 'height', 'width' ]
19
19
  } );
20
20
  }
21
21
 
@@ -35,10 +35,14 @@ export default class AssetTagBuilder extends Plugin {
35
35
  const id = viewElement.getAttribute( 'id' );
36
36
  const size = viewElement.getAttribute( 'size' );
37
37
  const alt = viewElement.getAttribute( 'alt' );
38
+ const height = viewElement.getAttribute( 'height' );
39
+ const width = viewElement.getAttribute( 'width' );
38
40
 
39
41
  if ( id ) attrs.id = id;
40
42
  if ( size ) attrs.size = size;
41
43
  if ( alt ) attrs.alt = alt;
44
+ if ( height ) attrs.height = height;
45
+ if ( width ) attrs.width = width;
42
46
 
43
47
  return writer.createElement( 'assetImage', attrs );
44
48
  }
@@ -52,10 +56,14 @@ export default class AssetTagBuilder extends Plugin {
52
56
  const id = modelElement.getAttribute( 'id' );
53
57
  const size = modelElement.getAttribute( 'size' );
54
58
  const alt = modelElement.getAttribute( 'alt' );
59
+ const height = modelElement.getAttribute( 'height' );
60
+ const width = modelElement.getAttribute( 'width' );
55
61
 
56
62
  if ( id ) attrs.id = id;
57
63
  if ( size ) attrs.size = size;
58
64
  if ( alt ) attrs.alt = alt;
65
+ if ( height ) attrs.height = height;
66
+ if ( width ) attrs.width = width;
59
67
 
60
68
  return writer.createEmptyElement( 'r:asset:image', attrs );
61
69
  }
@@ -69,10 +77,14 @@ export default class AssetTagBuilder extends Plugin {
69
77
  const id = modelElement.getAttribute( 'id' );
70
78
  const size = modelElement.getAttribute( 'size' );
71
79
  const alt = modelElement.getAttribute( 'alt' );
80
+ const height = modelElement.getAttribute( 'height' );
81
+ const width = modelElement.getAttribute( 'width' );
72
82
 
73
83
  if ( id ) attrs.id = id;
74
84
  if ( size ) attrs.size = size;
75
85
  if ( alt ) attrs.alt = alt;
86
+ if ( height ) attrs.height = height;
87
+ if ( width ) attrs.width = width;
76
88
 
77
89
  return writer.createContainerElement( 'r:asset:image', attrs );
78
90
  }
@@ -1,3 +1,3 @@
1
1
  module TrustyCms
2
- VERSION = '7.0.42'.freeze
2
+ VERSION = '7.0.44'.freeze
3
3
  end
data/yarn.lock CHANGED
@@ -2435,9 +2435,9 @@ mdast-util-phrasing@^4.0.0:
2435
2435
  unist-util-is "^6.0.0"
2436
2436
 
2437
2437
  mdast-util-to-hast@^13.0.0:
2438
- version "13.2.0"
2439
- resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz#5ca58e5b921cc0a3ded1bc02eed79a4fe4fe41f4"
2440
- integrity sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==
2438
+ version "13.2.1"
2439
+ resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz#d7ff84ca499a57e2c060ae67548ad950e689a053"
2440
+ integrity sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==
2441
2441
  dependencies:
2442
2442
  "@types/hast" "^3.0.0"
2443
2443
  "@types/mdast" "^4.0.0"
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.42
4
+ version: 7.0.44
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-11-19 00:00:00.000000000 Z
11
+ date: 2025-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-validator