From 4823c78830edd6eb63d60f494e78f48403048e15 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Apr 2013 10:52:12 -0400 Subject: [PATCH] Bug 10010 - Use jQueryUI Accordion to display constraints in MARC subfield editor The jQueryUI Accordion widget, included by default in Koha, is well-suited to handle the kind of show/hide actions which are used in the MARC subfield editor. This patch replaces the custom-writted JS with jQueryUI JS and markup. To test, load the tag subfield editor: Admin -> MARC frameworks -> MARC structure -> Subfields -> Edit. Confirm that basic, advanced, and other contraints panels are show/hidden correctly. Confirm that tabs work, and that edit operations are not disrupted. Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/css/staff-global.css | 5 +- .../en/modules/admin/marc_subfields_structure.tt | 65 ++++++++------------ 2 files changed, 29 insertions(+), 41 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 7613053..065e492 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2397,7 +2397,10 @@ div.authorizedheading { .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } /* jQuery UI Accordion */ -.ui-accordion-header { font-weight: bold; font-size : 110%; } +.ui-accordion-header, +.ui-widget-content .ui-accordion-header { + font-weight: bold; font-size : 110%; +} video { width: 480px; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index a0177db..0d369ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -4,32 +4,10 @@ [% INCLUDE 'doc-head-close.inc' %] @@ -71,7 +49,6 @@ $(document).ready(function() { -
    @@ -87,9 +64,11 @@ $(document).ready(function() {
[% FOREACH loo IN loop %] -
- -
[% IF ( loo.new_subfield ) %]Add new subfield[% ELSE %]Basic constraints[% END %] +
+ +

Basic constraints

+
+
    [% IF ( subfieldcode == 0 || subfieldcode ) %]
  1. Subfield code: [% loo.subfieldcode %]
  2. @@ -102,12 +81,13 @@ $(document).ready(function() {
  3. [% loo.mandatory %]
  4. [% loo.tab %] (ignore means that the subfield does not display in the record editor)
-
- - Display more constraints - + + +

Advanced constraints

+
+
  1. (see online help)
  2. @@ -116,19 +96,24 @@ $(document).ready(function() {
  3. (e.g., Title or Local-Number) NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.
  4. [% loo.kohafield %]
-
-
- Other Options: (choose one) +
+
+

Other options (choose one)

+
+
  1. [% loo.authorised_value %]
  2. [% loo.authtypes %]
  3. [% loo.value_builder %]
-
-

+
+
[% END %] +
+ Cancel +
[% END %] -- 1.7.2.5