cck_forms 3.5.0 → 3.5.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: efe3b0f1241b517381cbfa1aa2e5d96e0ad99c75
4
- data.tar.gz: 235413f814b0fb67d658d3893647e44512720610
2
+ SHA256:
3
+ metadata.gz: a91e75ce357b6e287e833754915ed9bcf8c1c9c80497d62df870b6232f733b80
4
+ data.tar.gz: 36737ba5b476046f4e44194f080ce6d5954c910df8423176be39dc583668f0d8
5
5
  SHA512:
6
- metadata.gz: 92ad5f9840789a07eb5673322f0e48b5b71a9411119d303d38c69729f98bf7ec576ae5789520c71337c39522827567ef15f2996d268c0be8da834419a64fe92f
7
- data.tar.gz: 016b972bbfdc29278dbe32c147c6e16755daa0755e9ffb3a3e93ab0fa4df6e7ab6816c4059ce2907869413c62805082dba1c2b8d85bc60ebec8d7ed842e02896
6
+ metadata.gz: d24f02ab68aefc70674270a6885de2f5f2530769c3dc7cbc794b95e4489f76a4fe9fd19e17808677ef797a9dd966e41ec51b0d9aad0b7559aa6f96d684391fc8
7
+ data.tar.gz: 81887a6a4937bad555b6ce46bc2ac4099fd5b3b4fa7d1e55d17fc350cc37bd7bcd6b11262ea6bd3efab5289190b8c309cd2b84032f57d0885282532ca49920d1
@@ -187,7 +187,7 @@ class CckForms::ParameterTypeClass::Map
187
187
  switchers = []
188
188
  switchers << %Q|<div class="#{group_class} cck-map-switchers #{'hide' if allowed_maps.count < 2}" style="margin-top: 5px;">|
189
189
  allowed_maps.map do |map|
190
- button_class = switcher_classes[map].presence || 'btn btn-default'
190
+ button_class = switcher_classes[map].presence || 'btn btn-default btn-secondary'
191
191
  button_class << ' active' if selected_map_type == map
192
192
  switchers << %Q|<a class="#{button_class}" href="#" data-map-type="#{map}">#{map_names[map]}</a>|
193
193
  end
@@ -218,7 +218,7 @@ class CckForms::ParameterTypeClass::WorkHours
218
218
 
219
219
  if template
220
220
  header = ['<ul class="nav nav-pills">']
221
- CckForms::ParameterTypeClass::WorkHours::DAYS.each { |day| header << '<li><a href="javascript:void(0)"><input name="' + form_builder.object_name + '[days]" type="checkbox" value="' + day + '" /> ' + CckForms::ParameterTypeClass::WorkHours.day_to_short(day) + '</a></li>' }
221
+ CckForms::ParameterTypeClass::WorkHours::DAYS.each { |day| header << '<li class="nav-item"><a class="nav-link" href="javascript:void(0)"><input name="' + form_builder.object_name + '[days]" type="checkbox" value="' + day + '" /> ' + CckForms::ParameterTypeClass::WorkHours.day_to_short(day) + '</a></li>' }
222
222
  header = header.push('</ul>').join
223
223
  else
224
224
  header = sprintf '<strong>%s</strong>:%s', CckForms::ParameterTypeClass::WorkHours::day_to_short(day), form_builder.hidden_field(:day)
@@ -1,3 +1,3 @@
1
1
  module CckForms
2
- VERSION = '3.5.0'
2
+ VERSION = '3.5.3'
3
3
  end
@@ -0,0 +1,3 @@
1
+ import './jquery.checkboxes';
2
+ import './jquery.workhours';
3
+ import './map.js';
@@ -241,7 +241,7 @@ $(function() {
241
241
 
242
242
  // mark checkboxes
243
243
  for(var i = 0, ic = days.length; i < ic; ++ i) {
244
- $newGroup.find("input[name$=\"[days]\"][value=" + days[i] + "]").prop("checked", true).closest("li").addClass("active");
244
+ $newGroup.find("input[name$=\"[days]\"][value=" + days[i] + "]").prop("checked", true).closest(".nav-link").addClass("active");
245
245
  }
246
246
 
247
247
  // hide checkboxes, link-o-buttons will be in their place
@@ -289,7 +289,7 @@ $(function() {
289
289
  this._days[dayName].workhoursday("value", $group.workhoursday("value"));
290
290
 
291
291
  // mark the day as active
292
- input.parentNode.parentNode.className += " active";
292
+ input.parentNode.className += " active";
293
293
 
294
294
  } else {
295
295
 
@@ -300,7 +300,7 @@ $(function() {
300
300
  if($group.find("input:checked[name$='[days]']").size() == 0) {
301
301
  $group.remove();
302
302
  } else {
303
- input.parentNode.parentNode.className = input.parentNode.parentNode.className.replace(/(^|\s)active($|\s)/, "$1");
303
+ input.parentNode.className = input.parentNode.className.replace(/(^|\s)active($|\s)/, "$1");
304
304
  }
305
305
  }
306
306
 
@@ -256,7 +256,7 @@ window.init_map = (canvas) ->
256
256
  maps = {}
257
257
  $.each $source.data("allowedMaps"), (i, mapType) ->
258
258
  $map = $('#' + mapId + '_' + mapType)
259
- maps[mapType] = new CckFormsMap.map(mapType, $map, initialPoint, fields, readOnly: readOnly)
259
+ maps[mapType] = CckFormsMap.map(mapType, $map, initialPoint, fields, readOnly: readOnly)
260
260
 
261
261
  $canvas.data('maps', maps)
262
262
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cck_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Konanykhin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2022-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,6 +94,7 @@ files:
94
94
  - lib/cck_forms/parameter_type_class/work_hours.rb
95
95
  - lib/cck_forms/version.rb
96
96
  - vendor/assets/javascripts/cck_forms/index.js
97
+ - vendor/assets/javascripts/cck_forms/index.webpack.js
97
98
  - vendor/assets/javascripts/cck_forms/jquery.checkboxes.coffee
98
99
  - vendor/assets/javascripts/cck_forms/jquery.workhours.js
99
100
  - vendor/assets/javascripts/cck_forms/map.js.coffee
@@ -101,7 +102,7 @@ homepage: http://github.com/ilya-konanykhin/cck_forms
101
102
  licenses:
102
103
  - MIT
103
104
  metadata: {}
104
- post_install_message:
105
+ post_install_message:
105
106
  rdoc_options: []
106
107
  require_paths:
107
108
  - lib
@@ -116,9 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  - !ruby/object:Gem::Version
117
118
  version: '0'
118
119
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.6.12
121
- signing_key:
120
+ rubygems_version: 3.0.9
121
+ signing_key:
122
122
  specification_version: 4
123
123
  summary: Content Construction Kit Forms
124
124
  test_files: []