redmine_extensions 0.6.1 → 0.6.3

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
- SHA1:
3
- metadata.gz: 0f667f85e0d110624ccd5f899854088d8015fa00
4
- data.tar.gz: c28815a63c4e04d663c7fd745d49e31ec82baf4f
2
+ SHA256:
3
+ metadata.gz: 34d238a1cb1834e5e411e1d09c9d8899f697e33ab273de095515831a3bc0261e
4
+ data.tar.gz: 27266391a47412629626f1b1c3e273324380b69dd0b8d7303f6800408665b4c5
5
5
  SHA512:
6
- metadata.gz: ce9bceb329b3a207e46cbca65a3c96dc950219d928d919b3a7d06a07f08bff2a06f4798f23b1f553752cfd78a7b623d493e345fd59c908a03b28532da66f9969
7
- data.tar.gz: 4cc55109bd400d1f256f35e4814187e8d7c1ca0f18f599d9a359528f0da77c6b103f3c27eb0fbcf5ad3af9b5233ec3a4004de437d27ac75354bdc035e5673562
6
+ metadata.gz: 03a793ac13f928df39fcb333415173de7754df9f86e43fa0225134122f489d9669bec00a46be55f07f9842689caec190dff9a1456ad04d8e2a076c0334bc03c3
7
+ data.tar.gz: bba5883ea1a29258eeee87ac2016e7880026a659ee3fa89b93bfc48ebb3da54e4ee6c370c759284abfcb0fe123b42c3559264a026a630f5c57c28ffdc789a226
@@ -38,8 +38,8 @@ window.EasyToggler = new function() {
38
38
  toggle(el);
39
39
  };
40
40
 
41
- this.ensureToggle = function() {
42
- const list = document.querySelectorAll("*[data-toggle]");
41
+ this.ensureToggle = function(context = document) {
42
+ const list = context.querySelectorAll('*[data-toggle]');
43
43
  for (let i = 0; i < list.length; ++i) {
44
44
  const item = list.item(i);
45
45
  window.EasyToggler.ensureToggleItem(item);
@@ -36,10 +36,12 @@
36
36
  if (!entity.id || entity === "" || this.entities[entity.id]) {
37
37
  return null;
38
38
  }
39
+ const dataCyInputName = this.options.inputNames.replaceAll("[", "").replaceAll("]", "");
39
40
 
40
41
  entity.element = $("<span/>")
41
42
  .text(entity.name)
42
43
  .addClass(entity.className || this.options.className)
44
+ .attr("data-cy", `card__${dataCyInputName}--id_${entity.id}`)
43
45
  .appendTo(this.element)
44
46
  .after(" ");
45
47
 
@@ -53,6 +55,7 @@
53
55
  .html('&nbsp;')
54
56
  .addClass("icon icon-del")
55
57
  .appendTo(entity.element)
58
+ .attr("data-cy", `button__delete--${dataCyInputName}_id_${entity.id}`)
56
59
  .data("entity-id", entity.id)
57
60
  .click(function () {
58
61
  self.removeEntity($(this).data("entity-id"));
@@ -289,8 +289,9 @@ module RedmineExtensions
289
289
  source = "'#{jsonpath_or_array}'"
290
290
  end
291
291
 
292
+ html_options = options[:html_options] || {}
292
293
  content_tag(:span, class: 'easy-multiselect-tag-container', data: { cy: "container_old_autocomplete--#{name}" }) do
293
- search_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id], data: { cy: "search_old_autocomplete--#{name}" })) +
294
+ search_field_tag('', '', html_options.merge(id: options[:id], data: { cy: "search_old_autocomplete--#{name}" }.merge(html_options[:data] || {}))) +
294
295
  late_javascript_tag("$('##{options[:id]}').easymultiselect({multiple: #{options[:multiple]}, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: #{options[:preload]}, combo: #{options[:combo]}, source: #{source}, selected: #{selected_values.to_json}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options] || {}).to_json} });")
295
296
  end
296
297
  end
@@ -1 +1 @@
1
- <h1><%%= link_to(@<%= model_name_underscored %>.to_s, @<%= model_name_underscored %>_url) %></h1>
1
+ <h1><%%= link_to(@<%= model_name_underscored %>.to_s, @<%= model_name_underscored %>_url) %></h1>
@@ -1,2 +1,2 @@
1
- <%%= @<%= model_name_underscored %>.to_s %>
2
- <%%= @<%= model_name_underscored %>_url %>
1
+ <%%= @<%= model_name_underscored %>.to_s %>
2
+ <%%= @<%= model_name_underscored %>_url %>
@@ -1,2 +1,2 @@
1
- <%%= @<%= model_name_underscored %>.to_s %>
2
- <%%= @<%= model_name_underscored %>_url %>
1
+ <%%= @<%= model_name_underscored %>.to_s %>
2
+ <%%= @<%= model_name_underscored %>_url %>
@@ -1,5 +1,5 @@
1
1
  module RedmineExtensions
2
2
 
3
- VERSION = '0.6.1'
3
+ VERSION = '0.6.3'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Easy Software Ltd
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2023-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -175,7 +175,7 @@ homepage: https://www.easyredmine.com
175
175
  licenses:
176
176
  - GPL-2.0
177
177
  metadata: {}
178
- post_install_message:
178
+ post_install_message:
179
179
  rdoc_options: []
180
180
  require_paths:
181
181
  - lib
@@ -190,9 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubyforge_project:
194
- rubygems_version: 2.6.7
195
- signing_key:
193
+ rubygems_version: 3.3.22
194
+ signing_key:
196
195
  specification_version: 4
197
196
  summary: Redmine Extensions is set of useful features for Redmine. Main focus is on
198
197
  development helpers, but many users can find it helpfull