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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 152411df889eae74af885f2b6ce2cb0ecd95ecfa
|
4
|
+
data.tar.gz: a8ecc3993f301bc58f37f0572dc7662f947785b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e71dd16a516c5e81a47dbd0e9266149a2e3711b34d7f5a9ef2f7517ecd60c635079653c2f046813d8b3e778852e3a032572fcf4970689ca5add2a2492f1d48bf
|
7
|
+
data.tar.gz: 2051ccd77aac8d5d9af23d098b1666c4049c6653b02f583315a8bb3b0e0eb20e8740b4da81d2ce211c01686103adc6ddb19dde2c5c6631a015e2114e131a7521
|
data/CHANGELOG
CHANGED
@@ -447,10 +447,10 @@ var ActiveScaffold = {
|
|
447
447
|
jQuery('.as-js-button', element).show();
|
448
448
|
},
|
449
449
|
sliders: function(element) {
|
450
|
-
|
450
|
+
jQuery('.as-slider', element).each(function() {
|
451
451
|
var opts = $(this).data('slider');
|
452
|
-
|
453
|
-
if (opts.disabled)
|
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
|
-
|
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 (
|
985
|
+
if (jQuery.rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {
|
986
986
|
element.trigger('ajax:send', xhr);
|
987
987
|
} else {
|
988
|
-
|
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 =
|
1024
|
-
|
1025
|
-
|
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
|
-
|
1028
|
-
|
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 (
|
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.
|
24
|
-
|
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?
|
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.
|
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-
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|