active_scaffold 3.4.39 → 3.4.40

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: 3a46edc1511bb6fce264d9a5501dbd457988f3a2
4
- data.tar.gz: 861d1f3c682de2f0f2679ef0d037d9e728a48db6
3
+ metadata.gz: 152411df889eae74af885f2b6ce2cb0ecd95ecfa
4
+ data.tar.gz: a8ecc3993f301bc58f37f0572dc7662f947785b2
5
5
  SHA512:
6
- metadata.gz: 2e50e693ef1eb90f8ab74ef85906c5d0529c6c9f27b50d6e2c6cd3325532b7837a4350421357e03f29ffcec384f984634293f996bfb308981b08ac5d8279e936
7
- data.tar.gz: b9cd9f61abadffadf976c12b18c95acb729746a42983844b133c25c2341619abaf213480ed67704f20be3ee09b146e5fef2fbbc02f4952cb973116501f8aff8a
6
+ metadata.gz: e71dd16a516c5e81a47dbd0e9266149a2e3711b34d7f5a9ef2f7517ecd60c635079653c2f046813d8b3e778852e3a032572fcf4970689ca5add2a2492f1d48bf
7
+ data.tar.gz: 2051ccd77aac8d5d9af23d098b1666c4049c6653b02f583315a8bb3b0e0eb20e8740b4da81d2ce211c01686103adc6ddb19dde2c5c6631a015e2114e131a7521
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 3.4.40
2
+ - allow to exclude bitfield column
3
+ - replace some uses of $ with jQuery
4
+
1
5
  = 3.4.39
2
6
  - fix removing delete link with config.delete.link = false, broken on 3.4.38
3
7
  - fix position of nested action groups
@@ -447,10 +447,10 @@ var ActiveScaffold = {
447
447
  jQuery('.as-js-button', element).show();
448
448
  },
449
449
  sliders: function(element) {
450
- $('.as-slider', element).each(function() {
450
+ jQuery('.as-slider', element).each(function() {
451
451
  var opts = $(this).data('slider');
452
- $(this).slider(opts);
453
- if (opts.disabled) $(this).find('.ui-slider-handle').hide();
452
+ jQuery(this).slider(opts);
453
+ if (opts.disabled) jQuery(this).find('.ui-slider-handle').hide();
454
454
  });
455
455
  },
456
456
  load_embedded: function(element) {
@@ -977,15 +977,15 @@ var ActiveScaffold = {
977
977
  */
978
978
  var last_focus = ActiveScaffold.last_focus;
979
979
  if (last_focus) {
980
- $(last_focus).blur();
980
+ jQuery(last_focus).blur();
981
981
  ActiveScaffold.last_focus = last_focus;
982
982
  }
983
983
  //ActiveScaffold.disable_form(as_form); // not needed: called from on('ajax:beforeSend', 'form.as_form')
984
984
 
985
- if ($.rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {
985
+ if (jQuery.rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {
986
986
  element.trigger('ajax:send', xhr);
987
987
  } else {
988
- $(ActiveScaffold.last_focus).focus();
988
+ jQuery(ActiveScaffold.last_focus).focus();
989
989
  return false;
990
990
  }
991
991
  },
@@ -1020,15 +1020,15 @@ var ActiveScaffold = {
1020
1020
 
1021
1021
  setup_warn_changes: function() {
1022
1022
  var need_confirm = false;
1023
- var unload_message = $('meta[name=unload-message]').attr('content') || ActiveScaffold.config.unload_message || "This page contains unsaved data that will be lost if you leave this page.";
1024
- $(document).on('change input', '.active-scaffold form:not(.search) input, .active-scaffold form:not(.search) textarea, .active-scaffold form:not(.search) select', function() {
1025
- $(this).closest('form').addClass('need-confirm');
1023
+ var unload_message = jQuery('meta[name=unload-message]').attr('content') || ActiveScaffold.config.unload_message || "This page contains unsaved data that will be lost if you leave this page.";
1024
+ jQuery(document).on('change input', '.active-scaffold form:not(.search) input, .active-scaffold form:not(.search) textarea, .active-scaffold form:not(.search) select', function() {
1025
+ jQuery(this).closest('form').addClass('need-confirm');
1026
1026
  });
1027
- $(document).on('click', '.active-scaffold .as_cancel:not([data-remote]), .active-scaffold input[type=submit]', function() {
1028
- $(this).closest('form').removeClass('need-confirm');
1027
+ jQuery(document).on('click', '.active-scaffold .as_cancel:not([data-remote]), .active-scaffold input[type=submit]', function() {
1028
+ jQuery(this).closest('form').removeClass('need-confirm');
1029
1029
  });
1030
1030
  window.onbeforeunload = function() {
1031
- if ($('form.need-confirm').length) return unload_message;
1031
+ if (jQuery('form.need-confirm').length) return unload_message;
1032
1032
  }
1033
1033
  }
1034
1034
  }
@@ -20,8 +20,12 @@ module ActiveScaffold
20
20
  columns = options.keys.sort_by { |column| self.columns[column].weight }
21
21
  [:create, :update, :show, :subform].each do |action|
22
22
  if actions.include? action
23
- send(action).columns.exclude column_name
24
- send(action).columns.add_subgroup(column_name) { |group| group.add *columns }
23
+ if send(action).columns.include? column_name
24
+ send(action).columns.exclude column_name
25
+ send(action).columns.add_subgroup(column_name) { |group| group.add *columns }
26
+ else
27
+ send(action).columns.exclude *columns
28
+ end
25
29
  end
26
30
  end
27
31
  end if model.respond_to?(:bitfields) && model.bitfields.present?
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 39
5
+ PATCH = 40
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.39
4
+ version: 3.4.40
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-07-19 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler