alchemy_cms 4.1.0.beta → 4.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/Bug_report.md +27 -0
  3. data/.github/ISSUE_TEMPLATE/Feature_request.md +17 -0
  4. data/CHANGELOG.md +228 -170
  5. data/PULL_REQUEST_TEMPLATE.md +14 -0
  6. data/README.md +10 -0
  7. data/alchemy_cms.gemspec +1 -1
  8. data/app/assets/images/alchemy/icon-white.svg +1 -0
  9. data/app/assets/javascripts/alchemy/admin.js +4 -4
  10. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +5 -1
  11. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -2
  12. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -2
  13. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +3 -2
  14. data/app/assets/stylesheets/alchemy/_extends.scss +3 -18
  15. data/app/assets/stylesheets/alchemy/_mixins.scss +32 -16
  16. data/app/assets/stylesheets/alchemy/_variables.scss +19 -14
  17. data/app/assets/stylesheets/alchemy/admin.scss +1 -0
  18. data/app/assets/stylesheets/alchemy/archive.scss +49 -162
  19. data/app/assets/stylesheets/alchemy/base.scss +4 -4
  20. data/app/assets/stylesheets/alchemy/buttons.scss +14 -40
  21. data/app/assets/stylesheets/alchemy/dialogs.scss +1 -2
  22. data/app/assets/stylesheets/alchemy/elements.scss +49 -33
  23. data/app/assets/stylesheets/alchemy/form_fields.scss +11 -2
  24. data/app/assets/stylesheets/alchemy/forms.scss +1 -1
  25. data/app/assets/stylesheets/alchemy/frame.scss +3 -2
  26. data/app/assets/stylesheets/alchemy/image_library.scss +19 -13
  27. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +10 -13
  28. data/app/assets/stylesheets/alchemy/menubar.scss +8 -6
  29. data/app/assets/stylesheets/alchemy/navigation.scss +18 -0
  30. data/app/assets/stylesheets/alchemy/preview_window.scss +1 -1
  31. data/app/assets/stylesheets/alchemy/search.scss +6 -57
  32. data/app/assets/stylesheets/alchemy/selects.scss +6 -20
  33. data/app/assets/stylesheets/alchemy/sitemap.scss +2 -2
  34. data/app/assets/stylesheets/alchemy/spinner.scss +1 -1
  35. data/app/assets/stylesheets/alchemy/tables.scss +19 -2
  36. data/app/assets/stylesheets/alchemy/tags.scss +183 -0
  37. data/app/assets/stylesheets/alchemy/toolbar.scss +0 -2
  38. data/app/assets/stylesheets/alchemy/upload.scss +1 -1
  39. data/app/assets/stylesheets/alchemy/welcome.sass +11 -11
  40. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +9 -3
  41. data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
  42. data/app/controllers/alchemy/admin/elements_controller.rb +4 -1
  43. data/app/controllers/alchemy/admin/pictures_controller.rb +1 -1
  44. data/app/controllers/alchemy/pages_controller.rb +1 -1
  45. data/app/helpers/alchemy/admin/base_helper.rb +1 -1
  46. data/app/models/alchemy/cell.rb +1 -1
  47. data/app/models/alchemy/content.rb +2 -2
  48. data/app/models/alchemy/element.rb +3 -3
  49. data/app/models/alchemy/essence_file.rb +1 -1
  50. data/app/models/alchemy/essence_picture.rb +1 -1
  51. data/app/models/alchemy/folded_page.rb +2 -3
  52. data/app/models/alchemy/language.rb +1 -1
  53. data/app/models/alchemy/page.rb +1 -1
  54. data/app/models/alchemy/picture/transformations.rb +4 -1
  55. data/app/views/alchemy/admin/elements/index.html.erb +4 -2
  56. data/app/views/alchemy/admin/elements/new.html.erb +2 -1
  57. data/app/views/alchemy/admin/pictures/_infos.html.erb +17 -6
  58. data/app/views/alchemy/admin/uploader/_button.html.erb +2 -2
  59. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +12 -7
  60. data/app/views/alchemy/essences/shared/_linkable_essence_tools.html.erb +1 -0
  61. data/app/views/alchemy/welcome.html.erb +0 -2
  62. data/config/initializers/assets.rb +1 -0
  63. data/config/locales/alchemy.en.yml +1 -0
  64. data/lib/alchemy/tinymce.rb +1 -1
  65. data/lib/alchemy/version.rb +1 -1
  66. data/vendor/assets/stylesheets/{jquery.Jcrop.min.css → jquery.Jcrop.min.scss} +1 -1
  67. metadata +10 -5
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  .sitemap_pagename_link {
27
- display: inline-block;
27
+ display: block;
28
28
  padding: 0 10px;
29
29
  margin: 2px;
30
30
  text-decoration: none;
@@ -81,7 +81,7 @@
81
81
  height: $sitemap-line-height;
82
82
  margin: 3*$default-margin 0;
83
83
  position: relative;
84
- transition: background-color 250ms;
84
+ transition: background-color $transition-duration;
85
85
 
86
86
  &.highlight {
87
87
  background-color: $sitemap-highlight-color;
@@ -7,7 +7,7 @@
7
7
  line-height: 1;
8
8
 
9
9
  path {
10
- fill: $dark-gray;
10
+ fill: $text-color;
11
11
  opacity: 1;
12
12
  animation: spinner 1s infinite ease-in-out both;
13
13
  }
@@ -4,6 +4,22 @@ table {
4
4
  padding: 0;
5
5
  font-size: inherit;
6
6
  width: 100%;
7
+
8
+ &.list .tools {
9
+ button, a {
10
+ display: inline-block;
11
+ width: 18px;
12
+ height: 18px;
13
+ padding: 0;
14
+ margin: 0 $default-margin;
15
+ line-height: inherit;
16
+ text-align: center;
17
+
18
+ > .icon {
19
+ margin: 0;
20
+ }
21
+ }
22
+ }
7
23
  }
8
24
 
9
25
  .list td, .list th {
@@ -11,7 +27,7 @@ table {
11
27
  vertical-align: top;
12
28
  line-height: 18px;
13
29
  border-right: 1px solid $medium-gray;
14
- transition: background-color 250ms;
30
+ transition: background-color $transition-duration;
15
31
 
16
32
  &:last-child {
17
33
  border-right: 0 none;
@@ -90,7 +106,8 @@ td.heading {
90
106
  text-decoration: underline;
91
107
  }
92
108
 
93
- .list .tools .icon, .list td.icon .icon {
109
+ .list .tools .icon,
110
+ .list td.icon .icon {
94
111
  @extend .disable-user-select;
95
112
  margin: 0 $default-margin;
96
113
  }
@@ -0,0 +1,183 @@
1
+ .tag-list {
2
+ height: 100%;
3
+ padding-bottom: 138px;
4
+
5
+ &.filtered {
6
+ padding-bottom: 164px;
7
+ }
8
+
9
+ &.with_filter_bar {
10
+ padding-bottom: 218px;
11
+
12
+ &.filtered {
13
+ padding-bottom: 244px;
14
+ }
15
+ }
16
+
17
+ .js_filter_field_box {
18
+ position: absolute;
19
+ right: auto;
20
+ top: auto;
21
+ width: 200px;
22
+ z-index: 1100;
23
+ transition: background-color $transition-duration;
24
+
25
+ input {
26
+ width: 200px;
27
+ background-color: transparentize($white, 0.25);
28
+
29
+ &:focus {
30
+ background-color: $white;
31
+ }
32
+ }
33
+
34
+ label { display: none }
35
+ }
36
+
37
+ .js_filter_field_clear {
38
+ right: 4px;
39
+ }
40
+
41
+ ul {
42
+ list-style-type: none;
43
+ padding: 0;
44
+ margin: 40px 0 4px 0;
45
+ height: 100%;
46
+ width: 200px;
47
+ overflow-x: hidden;
48
+ overflow-y: auto;
49
+
50
+ li {
51
+ display: block;
52
+
53
+ &:first-child { margin-top: 0 }
54
+
55
+ a {
56
+ @include tag-base;
57
+ text-decoration: none;
58
+ display: block;
59
+ }
60
+
61
+ &:hover { background-color: $very-light-blue }
62
+
63
+ &.active {
64
+
65
+ a {
66
+ background-color: $dark-gray;
67
+ color: $light-gray
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ .tag {
75
+ @include tag-base(
76
+ $margin: $default-margin/2 0,
77
+ $padding: $default-padding 2*$default-padding $default-padding
78
+ );
79
+ display: inline-block;
80
+ vertical-align: middle;
81
+ color: $text-color;
82
+ pointer-events: none;
83
+ font-size: $small-font-size;
84
+ }
85
+
86
+ .tags .list .tag {
87
+ padding: 0;
88
+ }
89
+
90
+ #assign_image_list {
91
+ .tag-list ul {
92
+ height: 316px;
93
+ }
94
+
95
+ &.filtered .tag-list ul {
96
+ height: 292px;
97
+ }
98
+ }
99
+
100
+ #assign_file_list {
101
+ .tag-list ul {
102
+ height: 396px;
103
+ }
104
+
105
+ &.filtered .tag-list ul {
106
+ height: 372px;
107
+ }
108
+ }
109
+
110
+ #overlay_file_list.with_tag_list {
111
+ padding-right: 234px;
112
+ }
113
+
114
+ #tags_tag_list {
115
+ text-align: left;
116
+ padding-top: 5px;
117
+
118
+ ul.tags {
119
+ max-height: 10em;
120
+ padding: 1px;
121
+ margin: 0;
122
+ margin-top: 2px;
123
+ overflow: auto;
124
+ text-align: left;
125
+ list-style-type: none;
126
+
127
+ li {
128
+ background-color: $medium-gray;
129
+ padding: 4px;
130
+ margin: 0 0 4px 0;
131
+ position: relative;
132
+ border-radius: $default-border-radius;
133
+
134
+ &.odd { background-color: #eaf3f9 }
135
+
136
+ input {
137
+ position: absolute;
138
+ top: 3px;
139
+ left: 4px;
140
+ }
141
+
142
+ label {
143
+ display: inline-block;
144
+ margin-left: 2em;
145
+ line-height: 1.6em;
146
+ }
147
+ }
148
+ }
149
+
150
+ .js_filter_field_box {
151
+ position: relative;
152
+ top: 0;
153
+ right: 0;
154
+ margin: 0;
155
+
156
+ .js_filter_field {
157
+ width: 100%;
158
+ }
159
+
160
+ label {
161
+ display: none
162
+ }
163
+ }
164
+
165
+ .js_filter_field_clear {
166
+ right: 4px;
167
+ }
168
+ }
169
+
170
+ .tag_list, .autocomplete_tag_list {
171
+ .select2-container.select2-container-multi {
172
+ .select2-search-choice {
173
+ padding: 0;
174
+
175
+ div {
176
+ @include tag-base(
177
+ $padding: $default-padding 6*$default-padding $default-padding 3*$default-padding,
178
+ $margin: 0
179
+ );
180
+ }
181
+ }
182
+ }
183
+ }
@@ -11,7 +11,6 @@
11
11
  margin: 0;
12
12
  display: inline-block;
13
13
  vertical-align: middle;
14
- line-height: 5px;
15
14
  }
16
15
  }
17
16
 
@@ -46,7 +45,6 @@
46
45
  }
47
46
 
48
47
  .icon_button {
49
- line-height: 26px;
50
48
 
51
49
  .icon {
52
50
  font-size: 1.25em;
@@ -51,7 +51,7 @@
51
51
  padding: 8px;
52
52
  overflow: hidden;
53
53
  background-color: rgba($dark-gray, 0.6);
54
- transition: all 250ms ease-in-out;
54
+ transition: all $transition-duration ease-in-out;
55
55
 
56
56
  &.visible {
57
57
  bottom: 0;
@@ -1,15 +1,16 @@
1
+ @import "alchemy/variables"
2
+ @import "alchemy/fonts"
3
+
1
4
  body
2
- background: #f2f2f2
3
- color: #7f8c8d
4
- font-family: 'Open Sans', Helvetica, Arial, sans-serif
5
+ background-color: $main-menu-bg-color
6
+ color: $white
7
+ font-family: $default-font-family
5
8
  font-weight: normal
6
9
  font-size: 15px
7
10
  line-height: 22px
8
11
 
9
12
  h3
10
- color: #34495e
11
- font-family: 'Bitter', serif
12
- font-weight: normal
13
+ font-weight: bold
13
14
  font-size: 25px
14
15
  line-height: 1.2
15
16
  margin-bottom: 20px
@@ -32,18 +33,17 @@ ul
32
33
  list-style-position: outside
33
34
 
34
35
  li
35
- color: #2980b9
36
- font-weight: 600
36
+ color: $white
37
37
  margin-bottom: 12px
38
38
  background-color: none
39
39
  border-bottom: 0 none
40
40
  line-height: 22px
41
41
 
42
42
  a
43
- color: #87ab5a
43
+ color: $white
44
44
  text-decoration: underline
45
45
  transition: all 0.1s ease-in-out
46
46
 
47
47
  &:hover
48
- color: #2980b9
49
- text-decoration: underline
48
+ color: $white
49
+ text-decoration: none
@@ -662,13 +662,20 @@ body .mce-abs-layout-item {
662
662
  &:focus,
663
663
  &:hover {
664
664
  color: $text-color;
665
- background-color: darken($medium-gray, 3%);
666
665
 
667
666
  button {
668
667
  background: inherit;
669
668
  }
670
669
  }
671
670
 
671
+ &:hover {
672
+ background-color: darken($medium-gray, 3%);
673
+ }
674
+
675
+ &:focus {
676
+ background-color: $focus-color;
677
+ }
678
+
672
679
  button {
673
680
  padding: 2px 4px;
674
681
  font-size: 12px;
@@ -1021,8 +1028,7 @@ i.mce-i-checkbox {
1021
1028
  }
1022
1029
 
1023
1030
  .mce-path-item:focus {
1024
- background: #666;
1025
- color: #fff;
1031
+ @include default-focus-style;
1026
1032
  }
1027
1033
 
1028
1034
  .mce-path .mce-divider {
@@ -44,7 +44,7 @@ module Alchemy
44
44
  return '' if versions.blank?
45
45
  # reject any non release version
46
46
  versions.reject! { |v| v =~ /[a-z]/ }
47
- versions.sort.last
47
+ versions.max
48
48
  end
49
49
 
50
50
  # Get alchemy versions from rubygems or github, if rubygems failes.
@@ -147,7 +147,10 @@ module Alchemy
147
147
 
148
148
  def paste_element_from_clipboard
149
149
  @source_element = Element.find(element_from_clipboard['id'])
150
- new_attributes = {page_id: @page.id}
150
+ new_attributes = {
151
+ parent_element_id: create_element_params[:parent_element_id],
152
+ page_id: @page.id
153
+ }
151
154
  if @page.can_have_cells?
152
155
  new_attributes = new_attributes.merge({cell_id: find_or_create_cell.try(:id)})
153
156
  end
@@ -25,7 +25,7 @@ module Alchemy
25
25
  def show
26
26
  @previous = @picture.previous(params)
27
27
  @next = @picture.next(params)
28
- @pages = @picture.essence_pictures.group_by(&:page)
28
+ @assignments = @picture.essence_pictures.joins(content: {element: :page})
29
29
  render action: 'show'
30
30
  end
31
31
 
@@ -156,7 +156,7 @@ module Alchemy
156
156
 
157
157
  def set_expiration_headers
158
158
  if @page.cache_page?
159
- expires_in @page.expiration_time, public: !@page.restricted
159
+ expires_in @page.expiration_time, public: !@page.restricted, must_revalidate: true
160
160
  else
161
161
  expires_now
162
162
  end
@@ -200,7 +200,7 @@ module Alchemy
200
200
  }, {
201
201
  method: 'delete',
202
202
  title: options[:title],
203
- class: "icon_only #{html_options.delete(:class)}".strip
203
+ class: "icon_button #{html_options.delete(:class)}".strip
204
204
  }.merge(html_options)
205
205
  )
206
206
  end
@@ -27,7 +27,7 @@ module Alchemy
27
27
  class Cell < BaseRecord
28
28
  include Alchemy::Logger
29
29
 
30
- belongs_to :page, required: true
30
+ belongs_to :page, inverse_of: :cells
31
31
  validates_uniqueness_of :name, scope: 'page_id'
32
32
  validates_format_of :name, with: /\A[a-z0-9_-]+\z/
33
33
  has_many :elements, -> { where(parent_element_id: nil).order(:position) }, dependent: :destroy
@@ -24,8 +24,8 @@ module Alchemy
24
24
  # Concerns
25
25
  include Alchemy::Content::Factory
26
26
 
27
- belongs_to :essence, required: true, polymorphic: true, dependent: :destroy
28
- belongs_to :element, required: true, touch: true
27
+ belongs_to :essence, polymorphic: true, dependent: :destroy
28
+ belongs_to :element, touch: true, inverse_of: :contents
29
29
  has_one :page, through: :element
30
30
 
31
31
  stampable stamper_class_name: Alchemy.user_class_name
@@ -69,13 +69,13 @@ module Alchemy
69
69
  foreign_key: :parent_element_id,
70
70
  dependent: :destroy
71
71
 
72
- belongs_to :cell, required: false, touch: true
73
- belongs_to :page, required: true, touch: true
72
+ belongs_to :cell, optional: true, touch: true
73
+ belongs_to :page, touch: true, inverse_of: :descendent_elements
74
74
 
75
75
  # A nested element belongs to a parent element.
76
76
  belongs_to :parent_element,
77
77
  class_name: 'Alchemy::Element',
78
- required: false,
78
+ optional: true,
79
79
  touch: true
80
80
 
81
81
  has_and_belongs_to_many :touchable_pages, -> { distinct },
@@ -17,7 +17,7 @@
17
17
 
18
18
  module Alchemy
19
19
  class EssenceFile < BaseRecord
20
- belongs_to :attachment, required: false
20
+ belongs_to :attachment, optional: true
21
21
  acts_as_essence ingredient_column: 'attachment'
22
22
 
23
23
  def attachment_url
@@ -27,7 +27,7 @@ module Alchemy
27
27
  class EssencePicture < BaseRecord
28
28
  acts_as_essence ingredient_column: 'picture'
29
29
 
30
- belongs_to :picture, required: false
30
+ belongs_to :picture, optional: true
31
31
  delegate :image_file_width, :image_file_height, :image_file, to: :picture
32
32
  before_save :fix_crop_values
33
33
  before_save :replace_newlines
@@ -12,9 +12,8 @@
12
12
 
13
13
  module Alchemy
14
14
  class FoldedPage < BaseRecord
15
- belongs_to :page, required: true
16
- belongs_to :user, required: true,
17
- class_name: Alchemy.user_class_name
15
+ belongs_to :page, inverse_of: :folded_pages
16
+ belongs_to :user, inverse_of: :folded_pages, class_name: Alchemy.user_class_name
18
17
 
19
18
  def self.folded_for_user(user)
20
19
  return none unless Alchemy.user_class < ActiveRecord::Base
@@ -22,7 +22,7 @@
22
22
 
23
23
  module Alchemy
24
24
  class Language < BaseRecord
25
- belongs_to :site, required: true
25
+ belongs_to :site
26
26
  has_many :pages
27
27
 
28
28
  before_validation :set_locale, if: -> { locale.blank? }
@@ -86,7 +86,7 @@ module Alchemy
86
86
 
87
87
  stampable stamper_class_name: Alchemy.user_class_name
88
88
 
89
- belongs_to :language, required: false
89
+ belongs_to :language, optional: true
90
90
 
91
91
  has_one :site, through: :language
92
92
  has_many :site_languages, through: :site, source: :languages
@@ -7,6 +7,9 @@ module Alchemy
7
7
  module Picture::Transformations
8
8
  extend ActiveSupport::Concern
9
9
 
10
+ THUMBNAIL_WIDTH = 160
11
+ THUMBNAIL_HEIGHT = 120
12
+
10
13
  # Returns the default centered image mask for a given size.
11
14
  # If the mask is bigger than the image, the mask is scaled down
12
15
  # so the largest possible part of the image is visible.
@@ -37,7 +40,7 @@ module Alchemy
37
40
  size = get_base_dimensions
38
41
  end
39
42
 
40
- size = size_when_fitting({width: 111, height: 93}, size)
43
+ size = size_when_fitting({width: THUMBNAIL_WIDTH, height: THUMBNAIL_HEIGHT}, size)
41
44
  "#{size[:width]}x#{size[:height]}"
42
45
  end
43
46
 
@@ -10,7 +10,9 @@
10
10
  </li>
11
11
  <% end %>
12
12
  </ul>
13
- <div id="cell_for_other_elements" class="sortable_cell for_other_elements_cell">
13
+ <div id="cell_for_other_elements"
14
+ class="sortable_cell for_other_elements_cell"
15
+ data-droppable-elements="<%= @page.element_names_from_definition.join(' ') %>">
14
16
  <%= render partial: 'alchemy/admin/elements/element',
15
17
  collection: @page.elements.not_trashed.not_in_cell %>
16
18
  </div>
@@ -18,7 +20,7 @@
18
20
  <%= content_tag :div,
19
21
  id: "cell_#{cell.name}",
20
22
  class: ["sortable_cell", "#{cell.name}_cell"].join(' '),
21
- data: {'cell-id' => cell.id, 'data-droppable-elements' => cell.element_definitions.join(' ')} do %>
23
+ data: {'cell-id' => cell.id, 'droppable-elements' => cell.element_definitions.join(' ')} do %>
22
24
  <%= render partial: 'alchemy/admin/elements/element', collection: elements %>
23
25
  <% end %>
24
26
  <% end %>
@@ -11,7 +11,8 @@
11
11
  </div>
12
12
  <div id="paste_element_tab">
13
13
  <%= alchemy_form_for([:admin, @element]) do |f| %>
14
- <%= f.hidden_field(:page_id) %>
14
+ <%= f.hidden_field :page_id %>
15
+ <%= f.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
15
16
  <div class="input select">
16
17
  <label for="paste_from_clipboard" class="control-label"><%= Alchemy.t("Element") %></label>
17
18
  <%= select_tag 'paste_from_clipboard',
@@ -19,12 +19,15 @@
19
19
  <div class="picture-usage-info resource_info">
20
20
  <h2><%= Alchemy.t(:this_picture_is_used_on_these_pages) %></h2>
21
21
  <div id="pictures_page_list">
22
- <% if @pages.any? %>
23
- <ol>
24
- <% @pages.each do |page, essence_pictures| %>
22
+ <% if @assignments.any? %>
23
+ <ul>
24
+ <% @assignments.group_by(&:page).each do |page, essence_pictures| %>
25
25
  <% if page %>
26
26
  <li>
27
- <h3><%= link_to page.name, edit_admin_page_path(page) %></h3>
27
+ <h3>
28
+ <%= render_icon 'file-alt' %>
29
+ <p><%= link_to page.name, edit_admin_page_path(page) %></p>
30
+ </h3>
28
31
  <ul class="list">
29
32
  <% essence_pictures.group_by(&:element).each do |element, essence_pictures| %>
30
33
  <li class="<%= cycle('even', 'odd') %>">
@@ -33,14 +36,22 @@
33
36
  <% pictures = essence_pictures.collect do |e|
34
37
  e.content.name_for_label
35
38
  end.to_sentence %>
36
- <%== Alchemy.t(:pictures_in_page, page: page_link, pictures: pictures) %>
39
+ <% if element.public? %>
40
+ <%= render_icon('window-maximize', style: 'regular') %>
41
+ <% else %>
42
+ <%= render_icon('window-close') %>
43
+ <% end %>
44
+ <p>
45
+ <%== Alchemy.t(:pictures_in_page, page: page_link, pictures: pictures) %>
46
+ <em><%= Alchemy::Element.human_attribute_name(:trashed) if element.trashed? %></em>
47
+ </p>
37
48
  </li>
38
49
  <% end %>
39
50
  </ul>
40
51
  </li>
41
52
  <% end %>
42
53
  <% end %>
43
- </ol>
54
+ </ul>
44
55
  <% else %>
45
56
  <%= render_message do %>
46
57
  <%= Alchemy.t(:picture_not_in_use_yet) %>
@@ -1,11 +1,11 @@
1
1
  <%= form_for [:admin, object], html: {multipart: true, class: 'upload-button'} do |f| %>
2
2
  <%= f.file_field file_attribute,
3
3
  class: 'fileupload fileupload--field', multiple: true,
4
- name: "#{f.object_name}[#{file_attribute}]" %>
4
+ name: "#{f.object_name}[#{file_attribute}]", tabindex: '-1' %>
5
5
  <%= hidden_field_tag("#{f.object_name}[upload_hash]", Time.current.hash) if object.respond_to?(:upload_hash) %>
6
6
  <%= f.label file_attribute, data: {alchemy_hotkey: 'alt+n'} do %>
7
7
  <div class="button_with_label">
8
- <span class="icon_button"><%= render_icon :upload %></span>
8
+ <span class="icon_button" tabindex="0"><%= render_icon :upload %></span>
9
9
  <label>
10
10
  <%= local_assigns[:label] ||
11
11
  Alchemy.t(:button_label, scope: [:uploader, object.class.model_name.i18n_key]) %>
@@ -1,7 +1,7 @@
1
1
  <% linkable = content.settings_value(:linkable, options) != false %>
2
2
 
3
3
  <% if content.essence && content.essence.allow_image_cropping?(options) %>
4
- <%= link_to_dialog render_icon('crop'),
4
+ <%= link_to_dialog render_icon(:crop),
5
5
  alchemy.crop_admin_essence_picture_path(
6
6
  content.essence,
7
7
  options: content.settings.update(options)
@@ -12,7 +12,7 @@
12
12
  padding: false
13
13
  }, {title: Alchemy.t('Edit Picturemask')} %>
14
14
  <%- else -%>
15
- <a href="#" class="disabled"><%= render_icon('crop') %></a>
15
+ <a href="#" class="disabled" tabindex="-1"><%= render_icon(:crop) %></a>
16
16
  <%- end -%>
17
17
 
18
18
  <%= link_to_dialog render_icon('file-image', style: 'regular'),
@@ -24,7 +24,7 @@
24
24
  ),
25
25
  {
26
26
  title: (content.ingredient ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)),
27
- size: '780x580',
27
+ size: '790x590',
28
28
  padding: false
29
29
  },
30
30
  title: (content.ingredient ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)) %>
@@ -35,15 +35,20 @@
35
35
  title: Alchemy.t(:link_image),
36
36
  'data-content-id' => content.id,
37
37
  id: "edit_link_#{content.id}"
38
- } %>
38
+ } do %>
39
+ <span class="disabled" tabindex="-1"><%= render_icon(:link) %></span>
40
+ <% end %>
39
41
 
40
- <%= link_to_if linkable, render_icon('unlink'), '', {
42
+ <%= link_to_if linkable, render_icon(:unlink), '', {
41
43
  onclick: "return Alchemy.LinkDialog.removeLink(this, #{content.id})",
42
44
  class: content.linked? ? 'linked' : 'disabled',
45
+ tabindex: content.linked? ? nil : '-1',
43
46
  title: Alchemy.t(:unlink)
44
- } %>
47
+ } do %>
48
+ <span class="disabled" tabindex="-1"><%= render_icon(:unlink) %></span>
49
+ <% end %>
45
50
 
46
- <%= link_to_dialog render_icon('edit'),
51
+ <%= link_to_dialog render_icon(:edit),
47
52
  alchemy.edit_admin_essence_picture_path(
48
53
  id: content.essence.id,
49
54
  content_id: content.id,
@@ -13,6 +13,7 @@
13
13
  '#',
14
14
  onclick: "return Alchemy.LinkDialog.removeLink(this, #{content.id})",
15
15
  class: "icon_button unlink-essence #{content.linked? ? 'linked' : 'disabled'}",
16
+ tabindex: content.linked? ? nil : '-1',
16
17
  'data-content-id' => content.id,
17
18
  title: Alchemy.t(:unlink)
18
19
  ) %>