Bugzilla – Attachment 17382 Details for
Bug 10010
Use jQueryUI Accordion to display constraints in MARC subfield editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10010 - Use jQueryUI Accordion to display constraints in MARC subfield editor
Bug-10010---Use-jQueryUI-Accordion-to-display-cons.patch (text/plain), 7.19 KB, created by
Kyle M Hall (khall)
on 2013-04-12 12:33:31 UTC
(
hide
)
Description:
Bug 10010 - Use jQueryUI Accordion to display constraints in MARC subfield editor
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-12 12:33:31 UTC
Size:
7.19 KB
patch
obsolete
>From 4823c78830edd6eb63d60f494e78f48403048e15 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <kyle@bywatersolutions.com> >--- > .../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' %] > <script type="text/javascript"> > //<![CDATA[ >- >-$(document).ready(function() { >- $('#subfieldtabs').tabs(); >- $("a.displaymore").click(function(){ >- var link = $(this); >- var constraints = $("#"+$(this).attr("href").replace("#","")); >- constraints.toggle(); >- if($(constraints).is(':visible')){ >- link.html(_("Hide constraints")); >- } else { >- link.html(_("Display more constraints")); >- } >+ $(document).ready(function() { >+ $( ".constraints" ).accordion(); >+ $('#subfieldtabs').tabs(); > }); >-}); >- >-/*function displayMoreConstraint(numlayer){ >- var thisdiv = document.getElementById(numlayer); >- if(thisdiv.getAttribute("class") == "content_hidden"){ >- thisdiv.removeAttribute('class'); >- thisdiv.setAttribute("class","content_visible"); >- } else { >- thisdiv.removeAttribute('class'); >- thisdiv.setAttribute("class","content_hidden"); >- } >-}*/ >- > //]]> > </script> > </head> >@@ -71,7 +49,6 @@ $(document).ready(function() { > <input type="hidden" name="op" value="add_validate" /> > <input type="hidden" name="tagfield" value="[% tagfield %]" /> > <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> >- <input type="submit" value="Save changes" /> > > <div id="subfieldtabs" class="toptabs numbered"> > <ul> >@@ -87,9 +64,11 @@ $(document).ready(function() { > </ul> > > [% FOREACH loo IN loop %] >- <div id="sub[% loo.urisubfieldcode %]field"> >- >- <fieldset class="rows" style="float:none;"><legend>[% IF ( loo.new_subfield ) %]Add new subfield[% ELSE %]Basic constraints[% END %]</legend> >+ <div class="constraints" id="sub[% loo.urisubfieldcode %]field"> >+ >+ <h3><a href="#basic[% loo.urisubfieldcode %]">Basic constraints</a></h3> >+ <div id="basic[% loo.urisubfieldcode %]"> >+ <fieldset class="rows"> > <ol> > [% IF ( subfieldcode == 0 || subfieldcode ) %] > <li><span class="label">Subfield code:</span> [% loo.subfieldcode %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode %]" /></li> >@@ -102,12 +81,13 @@ $(document).ready(function() { > <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li> > <li><label for="tab[% loo.row %]">Managed in tab: </label>[% loo.tab %] (ignore means that the subfield does not display in the record editor)</li> > </ol> >- </fieldset> >- >- <a class="displaymore" href="#more[% loo.urisubfieldcode %]">Display more constraints</a> >- <div id="more[% loo.urisubfieldcode %]" style="display:none; clear: both"> >- <fieldset class="rows" style="float:none;"> >- <legend>Advanced constraints:</legend> >+ </fieldset> >+ </div> >+ >+ >+ <h3><a href="#adv[% loo.urisubfieldcode %]">Advanced constraints</a></h3> >+ <div id="adv[% loo.urisubfieldcode %]"> >+ <fieldset class="rows"> > <ol><li><label for="defaultvalue[% loo.row %]">Default value:</label> > <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li> > <li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li> >@@ -116,19 +96,24 @@ $(document).ready(function() { > <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li> > <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li> > </ol> >- </fieldset> >- <fieldset class="rows" style="float:none;"> >- <legend>Other Options: (choose one)</legend> >+ </fieldset> >+ </div> >+ <h3><a href="#oth[% loo.urisubfieldcode %]">Other options (choose one)</a></h3> >+ <div id="oth[% loo.urisubfieldcode %]"> >+ <fieldset class="rows"> > <ol> > <li><label for="authorised_value[% loo.row %]">Authorized value:</label>[% loo.authorised_value %]</li> > <li><label for="authtypecode[% loo.row %]">Thesaurus:</label>[% loo.authtypes %]</li> > <li><label for="value_builder[% loo.row %]">Plugin:</label>[% loo.value_builder %]</li> > </ol> >- </fieldset> >- </div><br class="clear" /><!-- /more --> >+ </fieldset> >+ </div> > </div><!-- /content_sub --> > [% END %] > </div><!-- /content --> >+ <fieldset class="action"> >+ <input type="submit" value="Save changes" /> <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&frameworkcode=[% frameworkcode %]" class="cancel">Cancel</a> >+ </fieldset> > </form> > [% END %] > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10010
:
17310
|
17312
|
17382
|
17679
|
18943
|
19048