Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
Tomas Cohen Arazi 557857cf2c Bug 9894 - (3.12) de-serialize the 'hidden' value for subfields in frameworks
This patch aims to provide a non-intrusive way (with respect to Koha's code, so
it could have got into 3.12) for the users to easily choose the visibility settings
for each subfield.

This patch is also known to have arrived late for 3.12. I've been struggling with
other stuff at work, but I just wanted to put this somewhere just in case it can
be reused or something else.

The patch adds two JavaScript functions that deal with (de)serialization of the 'hidden'
value for subfields. One each way. Listeners are added to the checkboxes so the (actually, heh)
'hidden' value gets correctly updated on each checkbox change.

There's a costly function to update all checkboxes on every tab to match the 'hidden' value on page load.

To test:
- open the docs to have at hand the list of codes/visibility options combinations and
try changing several subfields from a single tagfield. Save, and reopen the "Edit subfields" page.
- I had a MySQL shell opened to repeatedly run this query (i tested against field 886
  on the default framework):
>  SELECT tagfield,tagsubfield,hidden FROM marc_subfield_structure WHERE frameworkcode='' AND tagfield=886;
- Compare what was saved on the DB with the docs for that visibility selection.

Regards
To+

PS: I promise I'll work on the proper patch for 3.14, which would involve DB structure changes and
(more than I expected) rewriten code.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I promise to hug you the next time we meet. This works, and is a reasonable work around for a very longstanding awkward interface.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-18 07:55:18 -04:00
..
preferences Bug 7740 - Followup - Add Non-XSLT Caveaut to system preference 2013-03-22 22:57:32 -04:00
searchengine/solr Bug 9265 - Switch to HTML5 doctype in OPAC and staff client 2013-01-31 11:47:04 -05:00
admin-home.tt Bug 7440 - Remove NoZebra vestiges 2013-03-19 21:17:04 -04:00
aqbudget_user_search.tt Bug 7304: More permissions for budgets 2012-06-27 16:25:44 +02:00
aqbudgetperiods.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
aqbudgets.tt Bug 9877: Followup: FIX if the table is empty. 2013-04-03 06:16:15 -04:00
aqcontract.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
aqplan.tt Bug 8181 [REVISED] Replace DynArch calendar widget with jQueryUI version 2012-06-25 18:26:26 +02:00
auth_subfields_structure.tt Bug 7483 follow-up replacing tabs by 4 spaces in both templates 2012-10-22 17:07:37 +02:00
auth_tag_structure.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
authorised_values.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
authtypes.tt Bug 9623 - Replace YUI button on authority types administration page with Bootstrap 2013-02-18 08:07:13 -05:00
biblio_framework.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
branch_transfer_limits.tt Bug 9430 [Revised] Use DataTables on library transfer limits page 2013-03-07 10:50:19 -05:00
branches.tt Bug 9172 - Move TinyMCE library outside of language-specific directory 2013-04-15 09:31:39 -04:00
categorie.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
checkmarc.tt Bug 2780 - Capitalize strings consistently (Admin pages) 2012-04-10 10:03:21 +02:00
cities.tt Bug 9436 [Revised] Use DataTables on cities administration page 2013-03-15 19:24:31 -04:00
classsources.tt Bug 9631 - Replace YUI buttons on classification sources administration page with Bootstrap 2013-02-18 08:50:22 -05:00
clone-rules.tt Bug 2780 - Capitalize strings consistently (Admin pages) 2012-04-10 10:03:21 +02:00
currency.tt Bug 9632 - Replace YUI button on the currencies administration page with Bootstrap 2013-02-18 08:51:45 -05:00
didyoumean.tt Bug 8726: Followup FIX save didyoumean syspref 2012-09-28 17:14:17 +02:00
fieldmapping.tt Bug 6037 [Follow-up] Invalid markup, missing breadcrumbs on Keyword to MARC Mapping page 2012-10-08 17:11:12 +02:00
item_circulation_alerts.tt Bug 8942: Translation process breaks javascript 2013-01-31 11:00:24 -05:00
itemtypes.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00
koha2marclinks.tt Bug 2780 - Capitalize strings consistently (Admin pages) 2012-04-10 10:03:21 +02:00
marc_subfields_structure.tt Bug 9894 - (3.12) de-serialize the 'hidden' value for subfields in frameworks 2013-04-18 07:55:18 -04:00
marctagstructure.tt Bug 9443 [Revised] Use DataTables on MARC frameworks administration 2013-03-31 08:17:40 -04:00
matching-rules.tt Bug 9640 - Replace YUI button on record matching rules page with Bootstrap 2013-02-18 09:04:46 -05:00
oai_set_mappings.tt Bug 8906: Followup replace 'Clear' with 'Delete' 2013-02-15 09:08:10 -05:00
oai_sets.tt Bug 9689 - Replace YUI buttons on the OAI sets administration page with Bootstrap 2013-03-07 10:16:36 -05:00
patron-attr-types.tt Bug 9642 - Replace YUI button on the patron attribute types page with Bootstrap 2013-02-18 09:06:49 -05:00
preferences.tt Bug 8061: Follow up - RTL CSS overrides (staff client) 2013-04-07 12:51:54 -04:00
printers.tt Bug 9646 - Replace YUI button on the printers administration page with Bootstrap 2013-02-18 09:11:25 -05:00
roadtype.tt Bug 9643 - Replace YUI button on the road types administration page with Bootstrap 2013-02-18 09:07:33 -05:00
smart-rules.tt Bug 9933: Unable to edit or add rules for any branch except default 2013-04-15 08:31:41 -04:00
stopwords.tt Bug 9265 - Switch to HTML5 doctype in OPAC and staff client 2013-01-31 11:47:04 -05:00
systempreferences.tt Bug 9760: Simplify local use preferences 2013-03-13 08:56:30 -04:00
transport-cost-matrix.tt Bug 8935 - transport cost matrix could be prettier 2012-10-22 17:51:11 +02:00
z3950servers.tt Bug 9446 [Revised] Use DataTables on Z39.50 servers administration page 2013-03-20 15:27:49 -04:00