active_scaffold 4.3.1 → 4.3.2
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
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d91707ceb87840fe28313d879f1c013d577ee96ed32bebe8943a39179cdbf380
|
|
4
|
+
data.tar.gz: 43e8949c1b351f672f11c99f6df2cf274262df5e3fbd7ce1c75b10f49c290ef3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a28f9c8088844f67c7cd5dea3c9221f15d998d6fcb89617639bb5092501e21a5ac2d5c49927877244d5b2b99579da370272203caec7b3159c9035dafdc02f7c1
|
|
7
|
+
data.tar.gz: c49905306ccda62812b8ca6ed24d25fc4c490948f56cfd2a1ab9e403fc483962080f4b0911e29db9dce97572fd82473a5a65de3f0c5a26bce95a1449058fcece
|
data/CHANGELOG.rdoc
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
= 4.3.2
|
|
2
|
+
- Fix adding tab in tabbed forms
|
|
3
|
+
|
|
4
|
+
= 4.3.1
|
|
5
|
+
- Support Ruby 4
|
|
6
|
+
- Fix date picker options translated as strings, preserving boolean and integer values
|
|
7
|
+
- Fix escaping URLs in JavaScript responses, fixing auto pagination and actions with render_parent
|
|
2
8
|
|
|
3
9
|
= 4.3.0
|
|
4
10
|
- Support translating enums (or options for :select form_ui on any column) nested in the pluralized name of the column, activerecord.attributes.model_name.pluralized_column.enum_value, defaults to old way activerecord.attributes.model_name.enum_value
|
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
if (opts.disabled) jQuery(this).find('.ui-slider-handle').hide();
|
|
151
151
|
});
|
|
152
152
|
},
|
|
153
|
+
activate_tab: function(tab_ctrl) {
|
|
154
|
+
tab_ctrl = jQuery(tab_ctrl);
|
|
155
|
+
var tabbed = tab_ctrl.closest('.tabbed');
|
|
156
|
+
tabbed.find('.nav-tabs .active').removeClass('active');
|
|
157
|
+
tabbed.find('.tab-content .active').removeClass('in active');
|
|
158
|
+
tab_ctrl.addClass('active');
|
|
159
|
+
jQuery(tab_ctrl.attr('href')).addClass('in active');
|
|
160
|
+
},
|
|
153
161
|
load_embedded: function(element) {
|
|
154
162
|
jQuery('.active-scaffold-component .load-embedded', element).each(function(index, item) {
|
|
155
163
|
item = jQuery(item);
|
|
@@ -1572,11 +1580,7 @@
|
|
|
1572
1580
|
jQuery(document).on('click', '.active-scaffold .tabbed .nav-tabs a', function(e) {
|
|
1573
1581
|
if (typeof jQuery().tab == 'function') return; // bootstrap tab plugin is loaded and will handle tabs
|
|
1574
1582
|
e.preventDefault();
|
|
1575
|
-
|
|
1576
|
-
tabbed.find('.nav-tabs .active').removeClass('active');
|
|
1577
|
-
tabbed.find('.tab-content .active').removeClass('in active');
|
|
1578
|
-
tab_ctrl.closest('li').addClass('active');
|
|
1579
|
-
jQuery(tab_ctrl.attr('href')).addClass('in active');
|
|
1583
|
+
ActiveScaffold.activate_tab(this);
|
|
1580
1584
|
});
|
|
1581
1585
|
|
|
1582
1586
|
jQuery(document).on('turbolinks:before-visit turbo:before-visit', function() {
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
tab_content = render('form', columns: @column, subsection_id: "#{subsection_id}-#{tab_id_suffix}", form_action: @form_action, scope: @scope, tab_value: tab_record || tab_value, tab_id: tab_id_suffix, tabbed_by: @column.tabbed_by)
|
|
9
9
|
tab = active_scaffold_tab_content(tab_id, true, tab_content)
|
|
10
10
|
%>
|
|
11
|
-
jQuery('#<%= subsection_id %> .tab-content > .tab-pane.active').removeClass('in active');
|
|
12
11
|
ActiveScaffold.create_associated_record_form('<%= subsection_id %> .tab-content', '<%= j tab %>', {singular: false});
|
|
13
|
-
jQuery('#<%= subsection_id %> .nav-tabs').find('
|
|
12
|
+
ActiveScaffold.activate_tab(jQuery('<%= j active_scaffold_tab(tab_label, tab_id, true) %>').appendTo('#<%= subsection_id %> .nav-tabs').find('a'));
|
|
14
13
|
jQuery('#<%= @source_id %> option[value=<%= tab_value %>]').hide().parent().val('');
|
|
15
|
-
<% end %>
|
|
14
|
+
<% end %>
|
|
@@ -6,7 +6,7 @@ module ActiveScaffold
|
|
|
6
6
|
module TabsHelpers
|
|
7
7
|
def active_scaffold_tabbed_by(column, record, scope, subsection_id, &)
|
|
8
8
|
add_tab_url = params_for(action: 'render_field', tabbed_by: column.tabbed_by, id: record.to_param, column: column.label)
|
|
9
|
-
refresh_opts = {refresh_link: {text: 'Add tab', class: 'refresh-link add-tab'}}
|
|
9
|
+
refresh_opts = {field_selector: "##{subsection_id}_input", refresh_link: {text: 'Add tab', class: 'refresh-link add-tab'}}
|
|
10
10
|
tab_options = send(override_helper_per_model(:active_scaffold_tab_options, record.class), column, record)
|
|
11
11
|
used_tabs = send(override_helper_per_model(:active_scaffold_current_tabs, record.class), column, record, tab_options)
|
|
12
12
|
input_helper = override_helper_per_model(:active_scaffold_input_for_tabbed, record.class)
|
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: 4.3.
|
|
4
|
+
version: 4.3.2
|
|
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: 2026-
|
|
11
|
+
date: 2026-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ice_nine
|