http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9894

Liz Rea <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16877|0                           |1
        is obsolete|                            |

--- Comment #5 from Liz Rea <[email protected]> ---
Created attachment 16878
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16878&action=edit
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 <[email protected]>
I promise to hug you the next time we meet. This works, and is a reasonable
work around for a very longstanding awkward interface.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to