active_scaffold 3.4.34 → 3.4.35

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
  SHA1:
3
- metadata.gz: 5831aedbc0ccb79952a771522d0a768fdf0162cd
4
- data.tar.gz: 49eae4e8f8fa5aaf500b3217fbc9581379904131
3
+ metadata.gz: 047204c7ed281db3ab039a622cde11ad71d7a7d6
4
+ data.tar.gz: c60b1312ef3aa2e21edeaaa25ff8d4e432cf3142
5
5
  SHA512:
6
- metadata.gz: d4a7f15f906733e041f3fdc3fe19f02bd425476735a7513048b425ee830d7617f5ac4ef958a4df30ea9413f85a3d4f72f06a93b4fa8834fc11e04bd39c12921c
7
- data.tar.gz: 8d4b52569bad66e17e3f7230d48592175d35ca20e8855e8ec8e29c9a27327c886128ff848e9ba1917f8300389b6661a5364ab523097ea3f7faf8def0cb1c65c9
6
+ metadata.gz: 13d05fe3a97d1cc2542dc01074ad250f2e2dfe6a4ae56ceb55875360b966254d942463b3286a2b11e911b9bbbe645c741021c11232eaff749886d46152ee410d
7
+ data.tar.gz: 63e0aa647cf1bdd0f527c201f851dfc349cf6cb8626e752feba3d065cb0ead2a312c5a429c28a72b3df9d8b11af800526b47d231d8b73f934c2c13b34202540d
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ - Fix JS error on update columns when request fails and form is loaded on page
2
+ - Not raise exception when trying to scroll to missing element
3
+ - Fix error on rails 3.2 caused by a workaround to fix eager load HABTM with scope on rails 4.2
4
+
1
5
  = 3.4.34
2
6
  - Fix past, future and range on field search with rails 4, local time was used instead of UTC
3
7
  - Ignore search params when params[:id] is set
@@ -691,7 +691,7 @@ var ActiveScaffold = {
691
691
  },
692
692
 
693
693
  report_500_response: function(active_scaffold_id, xhr) {
694
- var server_error = jQuery(active_scaffold_id).find('td.messages-container p.server-error').first();
694
+ var server_error = jQuery(active_scaffold_id).find('.messages-container p.server-error').first();
695
695
  if (server_error.is(':visible')) {
696
696
  ActiveScaffold.highlight(server_error);
697
697
  } else {
@@ -724,6 +724,7 @@ var ActiveScaffold = {
724
724
  if (typeof checkInViewport == 'undefined') checkInViewport = true;
725
725
  if (typeof(element) == 'string') element = '#' + element;
726
726
  element = jQuery(element);
727
+ if (!element.length) return;
727
728
  if (checkInViewport && element.visible()) return;
728
729
  jQuery(document).scrollTop(element.offset().top);
729
730
  },
@@ -989,13 +990,11 @@ var ActiveScaffold = {
989
990
  if (ActiveScaffold.last_focus) {
990
991
  var item = jQuery(ActiveScaffold.last_focus);
991
992
  if (item.closest('body').length == 0 && item.attr('id')) item = jQuery('#' + item.attr('id'));
992
- item.focus().select();
993
+ if (status != 'error') item.focus().select();
993
994
  }
994
995
  },
995
996
  error: function (xhr, status, error) {
996
997
  element = as_form.find('#'+element.attr('id'));
997
- var as_div = element.closest("div.active-scaffold");
998
- if (as_div) ActiveScaffold.report_500_response(as_div, xhr);
999
998
  element.trigger('ajax:error', [xhr, status, error]);
1000
999
  }
1001
1000
  });
@@ -40,6 +40,12 @@ end
40
40
  <h4><%= headline -%></h4>
41
41
 
42
42
  <div id="<%= element_messages_id(:action => form_action) %>" class="messages-container">
43
+ <% unless xhr %>
44
+ <p class="error-message message server-error" style="display:none;">
45
+ <%= as_(:internal_error).html_safe %>
46
+ <a href="#" class="close" title="<%= as_(:close).html_safe %>"><%= as_(:close).html_safe %></a>
47
+ </p>
48
+ <% end %>
43
49
  <%= render :partial => 'form_messages' %>
44
50
  </div>
45
51
 
@@ -74,7 +74,7 @@ module ActiveScaffold::Actions
74
74
  end
75
75
  sorting = active_scaffold_config.list.user.sorting
76
76
  columns_for_joins, columns_for_includes = columns.select { |c| c.includes.present? }.partition do |c|
77
- sorting.sorts_on?(c) || (c.plural_association? && c.association.macro == :has_and_belongs_to_many && c.association.scope)
77
+ sorting.sorts_on?(c) || (c.plural_association? && c.association.macro == :has_and_belongs_to_many && c.association.respond_to?(:scope) && c.association.scope)
78
78
  end
79
79
  active_scaffold_preload.concat columns_for_includes.map(&:includes).flatten.uniq
80
80
  active_scaffold_references.concat columns_for_joins.map(&:includes).flatten.uniq
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 34
5
+ PATCH = 35
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  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.4.34
4
+ version: 3.4.35
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: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -444,7 +444,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
444
  version: '0'
445
445
  requirements: []
446
446
  rubyforge_project:
447
- rubygems_version: 2.4.5
447
+ rubygems_version: 2.5.2
448
448
  signing_key:
449
449
  specification_version: 4
450
450
  summary: Rails 3.2, 4.0, 4.1 and 4.2 versions of ActiveScaffold supporting prototype