active_scaffold 3.7.3 → 3.7.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a98ff18a1304b530e77ea7d79781e8cfa820ae8aa04e0837f69db834b256a62b
4
- data.tar.gz: de7d48e31ea6e5656f4eb6468b9c1cb87f1f199298a2a0feaa9ac7e970153f08
3
+ metadata.gz: 9206609200e1c9330a6e04b1731300dad5fcba8a52c70ae26ef6ba6427da4c25
4
+ data.tar.gz: 0b501f82598b99ff587b1fa484d017a73f1fd018b5a26a7968c065d0152ae74b
5
5
  SHA512:
6
- metadata.gz: c567dfec6b211cc3af398b065ddb1eafb80b6c552253966de9caab3aadc288d755b6382c06b83d92bb9090f76e98bcc626bdf1ee1f45c0631128d0a4bcc20090
7
- data.tar.gz: 99320dfb881c55c8126ad098f299d3b3230e15e874c013532529e98bb8ee71daa7c0b80b1f77b2501b3a68b109c253f19b649024fc1fcea3d06ca2242bba576e
6
+ metadata.gz: '08c1c4a3b4dad7c731793ebecd4e238a36ee49e340964c8321a88b562fafbf0b12d7992501c5ffad8efa60820a40e80879f0c9e60715cc1da2e31a5c764781bc'
7
+ data.tar.gz: 310c5bf214800a98efd1d7af45b771608ce85cdf27db3df8437a0ea9cbabb243f2df8d8ee3603c81a9e43a76ba09dcaae20df26aa3a1b0df9bf0b18f2c244bab
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ = 3.7.4
2
+ - Support loading both jquery and jquery-ui externally
3
+ - Fix subquery in search with STI
4
+
5
+ = 3.7.3.1
6
+ - Fix search, view was broken when reset_form was added
7
+
1
8
  = 3.7.3
2
9
  - Escape _ and % when using search with LIKE
3
10
  - Fix ID in nested scaffolds when parent record has string primary key, with invalid chars for HTML ID
@@ -3,18 +3,20 @@
3
3
  when :jquery
4
4
  require_asset "getprototypeof"
5
5
  require_asset "jquery.ba-throttle-debounce"
6
- if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION'
7
- require_asset "jquery-ui"
8
- elsif Jquery.const_defined? 'Ui'
9
- jquery_ui_prefix = Jquery::Ui::Rails::VERSION < '5.0.0' ? 'jquery.ui.' : 'jquery-ui/'
10
- jquery_ui_widgets_prefix = Jquery::Ui::Rails::VERSION >= '6.0.0' ? 'widgets/' : ''
11
- require_asset "#{jquery_ui_prefix}core"
12
- require_asset "#{jquery_ui_prefix}effect"
13
- require_asset "#{jquery_ui_prefix}effects/effect-highlight" if Jquery::Ui::Rails::VERSION >= '6.0.0'
14
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}sortable"
15
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
16
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
17
- require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
6
+ if Object.const_defined?('Jquery')
7
+ if Jquery.const_defined?('Rails') && Jquery::Rails.const_defined?('JQUERY_UI_VERSION')
8
+ require_asset "jquery-ui"
9
+ elsif Jquery.const_defined? 'Ui'
10
+ jquery_ui_prefix = Jquery::Ui::Rails::VERSION < '5.0.0' ? 'jquery.ui.' : 'jquery-ui/'
11
+ jquery_ui_widgets_prefix = Jquery::Ui::Rails::VERSION >= '6.0.0' ? 'widgets/' : ''
12
+ require_asset "#{jquery_ui_prefix}core"
13
+ require_asset "#{jquery_ui_prefix}effect"
14
+ require_asset "#{jquery_ui_prefix}effects/effect-highlight" if Jquery::Ui::Rails::VERSION >= '6.0.0'
15
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}sortable"
16
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}draggable"
17
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}droppable"
18
+ require_asset "#{jquery_ui_prefix}#{jquery_ui_widgets_prefix}datepicker"
19
+ end
18
20
  end
19
21
  if ActiveScaffold.jquery_ui_included?
20
22
  require_asset "jquery-ui-timepicker-addon"
@@ -1,10 +1,12 @@
1
- <% if Jquery::Rails.const_defined? 'JQUERY_UI_VERSION' %>
2
- <% require_asset "jquery-ui" %>
3
- <% elsif Jquery.const_defined? 'Ui' %>
4
- <% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
5
- <% require_asset "jquery.ui.datepicker" %>
6
- <% else %>
7
- <% require_asset "jquery-ui/datepicker" %>
1
+ <% if Object.const_defined?('Jquery') %>
2
+ <% if Jquery.const_defined?('Rails') && Jquery::Rails.const_defined?('JQUERY_UI_VERSION') %>
3
+ <% require_asset "jquery-ui" %>
4
+ <% elsif Jquery.const_defined? 'Ui' %>
5
+ <% if Jquery::Ui::Rails::VERSION < '5.0.0' %>
6
+ <% require_asset "jquery.ui.datepicker" %>
7
+ <% else %>
8
+ <% require_asset "jquery-ui/datepicker" %>
9
+ <% end %>
8
10
  <% end %>
9
11
  <% end %>
10
12
  <% require_asset "jquery-ui-theme" if ActiveScaffold.jquery_ui_included? %>
@@ -23,7 +23,7 @@
23
23
  <%= submit_tag as_(submit_text), :class => "submit", :style => ('display:none;' if live_search) %>
24
24
  <%
25
25
  reset_attrs = {class: 'as_cancel reset'}
26
- if active_scaffold_config.field_search.reset_form
26
+ if active_scaffold_config.search.reset_form
27
27
  reset_attrs[:data] = {reset: true}
28
28
  else
29
29
  reset_attrs.merge! remote: true, data: {refresh: true}
@@ -146,7 +146,7 @@ module ActiveScaffold
146
146
  conditions.concat options[:conditions][1..-1] if options[:conditions]
147
147
  if column.association&.polymorphic?
148
148
  conditions[0] << " AND #{column.quoted_foreign_type} = ?"
149
- conditions << relation.name
149
+ conditions << relation.base_class.sti_name
150
150
  end
151
151
  conditions
152
152
  end
@@ -2,8 +2,9 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 7
5
- PATCH = 3
5
+ PATCH = 4
6
+ FIX = nil
6
7
 
7
- STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
+ STRING = [MAJOR, MINOR, PATCH, FIX].compact.join('.')
8
9
  end
9
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.3
4
+ version: 3.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Many, see README
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails