From 0d718b892453018d0a51761b2721d54c1ca3139f Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Thu, 6 Aug 2015 12:48:07 -0600 Subject: [PATCH] Bug 14510: (QA followup) Fix bug with unmapped columns Fall back more smoothly when items subfields are not mapped to a kohafield. Note, however, that this development does not allow applying default settings to subfields that aren't mapped. A note has been added to the columns settings page, as there is no known workaround for this. --- koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc index c5bbdba..9dd454c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -10,7 +10,8 @@ function KohaTable(selector, dt_parameters, columns_settings) { var excluded_ids = []; $(columns_settings).each( function() { var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( 'th' ); - var used_id = named_id == -1 ? id : named_id; + var used_id = this.columnname ? named_id : id; + if ( used_id == -1 ) return; if ( this['is_hidden'] == "1" ) { hidden_ids.push( used_id ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index bb973e6..f4cf802 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -13,7 +13,7 @@ [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] [% FOR tablename IN tables.$pagename.keys.sort %] [% IF pagename == 'additem' AND tablename == 'itemst' %] -
Saving changes to column visibility here will override framework visibility settings for the table of items.
+
Changes made below will only apply to item subfields that are mapped to the items table.
[% END %]
-- 2.5.0