Bugzilla – Attachment 17019 Details for
Bug 9894
'hidden' value is hard to understand in frameworks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9894 - Followup: Add support for "flagged" values
Bug-9894---Followup-Add-support-for-flagged-values.patch (text/plain), 9.15 KB, created by
Liz Rea
on 2013-03-29 09:55:21 UTC
(
hide
)
Description:
Bug 9894 - Followup: Add support for "flagged" values
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2013-03-29 09:55:21 UTC
Size:
9.15 KB
patch
obsolete
>From c9ae7bb8a57e807763ccbac67db7776c3c7726ec Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Fri, 29 Mar 2013 22:33:33 +1300 >Subject: [PATCH] Bug 9894 - Followup: Add support for "flagged" values >Content-Type: text/plain; charset="utf-8" > >Even though we don't know what they mean or do. > >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. >- Click the "Flagged" checkbox - it should disable the other checkboxes as this setting is (apparently) exclusive to the others. >- Step through several tabs and set your visibilities as you like. >- 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. > >Bug 9894 - Help file updates > >To test: > >Click the Help link in the upper right hand corner of the MARC subfield editor >Verify that the epic list of values is gone >Verify that the help page overall looks alright >Verify that the help makes sense and is understandable. >--- > .../en/modules/admin/marc_subfields_structure.tt | 40 +++++++++++++++++--- > .../modules/help/admin/marc_subfields_structure.tt | 35 +++++------------ > 2 files changed, 43 insertions(+), 32 deletions(-) > >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 c9ba8e7..2318d95 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 >@@ -21,6 +21,7 @@ $(document).ready(function() { > $("input[id^='hidden-']").each(function() { > populateHiddenCheckboxes($(this).attr('id').split('-')[1]); > }); >+ > }); > > /*function displayMoreConstraint(numlayer){ >@@ -38,13 +39,30 @@ $(document).ready(function() { > function setHiddenValue() { > > var tab = $(this).attr('id').split('_')[2]; >+ var flagged_checked = $("#hidden_flagged_" + tab).is(':checked'); > var opac_checked = $("#hidden_opac_" + tab).is(':checked'); > var intranet_checked = $("#hidden_intranet_" + tab).is(':checked'); > var editor_checked = $("#hidden_editor_" + tab).is(':checked'); > var collapsed_checked = $("#hidden_collapsed_" + tab).is(':checked'); > var hidden_value = ""; > >- if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) { >+ $(function() { >+ enable_cb(); >+ $("#hidden_flagged_" + tab).click(enable_cb()); >+ }); >+ >+ function enable_cb() { >+ if ($("#hidden_flagged_" + tab).is(':checked')) { >+ $('.inclusive_' + tab).attr('disabled',true).removeAttr('checked'); >+ } >+ else { >+ $('.inclusive_' + tab).removeAttr('disabled'); >+ } >+ } >+ >+ if ( flagged_checked ) { >+ hidden_value='-8'; >+ } else if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) { > hidden_value='-7'; > } else if ( opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) { > hidden_value='-6'; >@@ -79,6 +97,7 @@ function setHiddenValue() { > } > > $('#hidden-' + tab).val(hidden_value); >+ > } > > function populateHiddenCheckboxes(tab) { >@@ -89,8 +108,13 @@ function populateHiddenCheckboxes(tab) { > var intranet_checked = false; > var editor_checked = false; > var collapsed_checked = false; >+ var flagged_checked = false; > >- if ( hidden_value == '-7') { >+ >+ >+ if ( hidden_value == '-8' ) { >+ flagged_checked = true; >+ } else if ( hidden_value == '-7') { > opac_checked = true; > collapsed_checked = true; > } else if ( hidden_value == '-6' ) { >@@ -139,10 +163,13 @@ function populateHiddenCheckboxes(tab) { > collapsed_checked = true; > } // else if ( hidden_value == '8') { skip } > >+ > $("#hidden_opac_" + tab).attr('checked',opac_checked); > $("#hidden_intranet_" + tab).attr('checked',intranet_checked); > $("#hidden_editor_" + tab).attr('checked',editor_checked); > $("#hidden_collapsed_" + tab).attr('checked',collapsed_checked); >+ >+ > } > > //]]> >@@ -228,10 +255,11 @@ function populateHiddenCheckboxes(tab) { > <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> > <li><input type="hidden" id="hidden-[% loo.row %]" name="hidden" value="[% loo.hidden %]" /> > <label for="hidden[% loo.row %]">Visibility: </label> >- <input class="radio" type="checkbox" id="hidden_opac_[% loo.row %]" name="hidden_opac_[% loo.row %]"/> OPAC >- <input type="checkbox" id="hidden_intranet_[% loo.row %]" name="hidden_intranet_[% loo.row %]"/> Intranet >- <input type="checkbox" id="hidden_editor_[% loo.row %]" name="hidden_editor_[% loo.row %]"/> Editor >- <input type="checkbox" id="hidden_collapsed_[% loo.row %]" name="hidden_collapsed_[% loo.row %]"/> Collapsed >+ <input type="checkbox" id="hidden_opac_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_opac_[% loo.row %]"/> OPAC >+ <input type="checkbox" id="hidden_intranet_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_intranet_[% loo.row %]"/> Intranet >+ <input type="checkbox" id="hidden_editor_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_editor_[% loo.row %]"/> Editor >+ <input type="checkbox" id="hidden_collapsed_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_collapsed_[% loo.row %]"/> Collapsed >+ <input type="checkbox" id="hidden_flagged_[% loo.row %]" name="flagged_[% loo.row %]"/> Flagged > </li> > <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li> > <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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt >index ca8f434..2a598bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc_subfields_structure.tt >@@ -54,32 +54,15 @@ To edit the subfields associated with the tag, click 'Subfields' to the right of > </li> > </ul> > <ul> >- <li>hidden >-<ul> >- <li>allows you to select from 19 possible visibility conditions, 17 of which are implemented. They are the following: >-<ul> >- <li>-9 => Future use</li> >- <li>-8 => Flag</li> >- <li>-7 => OPAC !Intranet !Editor Collapsed</li> >- <li>-6 => OPAC Intranet !Editor !Collapsed</li> >- <li>-5 => OPAC Intranet !Editor Collapsed</li> >- <li>-4 => OPAC !Intranet !Editor !Collapsed</li> >- <li>-3 => OPAC !Intranet Editor Collapsed</li> >- <li>-2 => OPAC !Intranet Editor !Collapsed</li> >- <li>-1 => OPAC Intranet Editor Collapsed</li> >- <li>0 => OPAC Intranet Editor !Collapsed</li> >- <li>1 => !OPAC Intranet Editor Collapsed</li> >- <li>2 => !OPAC !Intranet Editor !Collapsed</li> >- <li>3 => !OPAC !Intranet Editor Collapsed</li> >- <li>4 => !OPAC Intranet Editor !Collapsed</li> >- <li>5 => !OPAC !Intranet !Editor Collapsed</li> >- <li>6 => !OPAC Intranet !Editor !Collapsed</li> >- <li>7 => !OPAC Intranet !Editor Collapsed</li> >- <li>8 => !OPAC !Intranet !Editor !Collapsed</li> >- <li>9 => Future use</li> >-</ul> >-</li> >- <li>( ! means 'not visible' or in the case of Collapsed 'not Collapsed')</li> >+ <li>Visibility >+<ul> >+ <li>Allows you to set the visibility options for a MARC field.</li> >+ <ul> >+ <li><strong>OPAC</strong> - Checking this box determines whether the subfield is visible in the public interface. Unchecking it hides the field in the public interface.</li> >+ <li><strong>Intranet</strong> - Checking this box determines whether the subfield is visible in the staff interface. Unchecking it hides the field in the staff interface.</li> >+ <li><strong>Editor</strong> - Checking this box makes the subfield available to the MARC editor. Unchecking it indicates the field should not be shown in the editor.</li> >+ <li><strong>Collapsed</strong> - Checking this box determines whether the subfield is expanded or collapsed in the MARC editor; the subfield will appear as a clickable link to expand and edit the subfield. Unchecking it indicates that the field will be expanded by default.</li> >+ <li><strong>Flagged</strong> - This setting is exclusive of all other visibility options, and flags the field.</li> > </ul> > </li> > </ul> >-- >1.7.9.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 9894
:
16876
|
16877
|
16878
|
17019
|
17176
|
17177
|
17181
|
17259
|
17260
|
17278
|
17279
|
17280
|
17281