Bugzilla – Attachment 17259 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]
[SIGNED-OFF] Bug 9894 - (3.12) Small followup
SIGNED-OFF-Bug-9894---312-Small-followup.patch (text/plain), 3.09 KB, created by
Bernardo Gonzalez Kriegel
on 2013-04-07 15:03:45 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9894 - (3.12) Small followup
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-04-07 15:03:45 UTC
Size:
3.09 KB
patch
obsolete
>From 360240f4c4b13bdd691b950b29c43544e00d6a54 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 3 Apr 2013 15:50:49 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 9894 - (3.12) Small followup >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Liz's patch adds the 'flagged' value back, but there's a problem with its logic that prevents it to work on startup (works fine for changing values) > >Regards >To+ > >Sponsored-by: Universidad Nacional de Córdoba >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > .../en/modules/admin/marc_subfields_structure.tt | 31 +++++++++----------- > 1 file changed, 14 insertions(+), 17 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 d27ba8b..6d7d011 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 >@@ -35,6 +35,16 @@ $(document).ready(function() { > } > }*/ > >+/* Function to enable/disable hidden values checkboxes when Flag is (de)selected */ >+function enable_cb(tab) { >+ if ($("#hidden_flagged_" + tab).is(':checked')) { >+ $('.inclusive_' + tab).attr('disabled',true).removeAttr('checked'); >+ } >+ else { >+ $('.inclusive_' + tab).removeAttr('disabled'); >+ } >+} >+ > /* Function to serialize and set the 'hidden' field */ > function setHiddenValue() { > >@@ -46,20 +56,6 @@ function setHiddenValue() { > var collapsed_checked = $("#hidden_collapsed_" + tab).is(':checked'); > var hidden_value = ""; > >- $(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 ) { >@@ -96,6 +92,8 @@ function setHiddenValue() { > hidden_value='8'; > } > >+ enable_cb(tab); >+ > $('#hidden-' + tab).val(hidden_value); > > } >@@ -110,8 +108,6 @@ function populateHiddenCheckboxes(tab) { > var collapsed_checked = false; > var flagged_checked = false; > >- >- > if ( hidden_value == '-8' ) { > flagged_checked = true; > } else if ( hidden_value == '-7') { >@@ -163,12 +159,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); >+ $("#hidden_flagged_" + tab).attr('checked',flagged_checked); > >+ enable_cb(tab); > > } > >-- >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