Description
David Cook
2013-04-29 05:05:55 UTC
One fast (albeit ugly) solution could be add in xml an individual entry for each position. xmlControlfield.js write a input text without options if description has a '-' (dash). Result in attached image. Created attachment 17875 [details]
field 008 with decomposed Illustration options
Created attachment 17876 [details]
field 008 with multiple options
This image describe another possible solution, but this requires some JS wizardry to work. Something like this could also be used to dates.
(In reply to comment #2) > Created attachment 17875 [details] > field 008 with decomposed Illustration options Visually, I think that this [the decomposed options] might be the best option. It allows users to see the code and the description of the code, so as to easily make informed decisions. My only concern might be in the label for the positions. "18 - Illustrations - code 1" might be better than "18 - Illustrations position 1". It's not very optimal to have separate entries for 18, 19, 20, 21, but I assume it might not be possible to give one XML element several position attributes. I suppose the 18-21 and 24-27 positions might be special cases, so maybe having separate XML elements for each position within those ranges is acceptable...especially if it means that we're providing a validated list of options to users. Created attachment 17891 [details] [review] Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin Easy workaround This patch expands both options, Illustrations and Nature of.., so each position could be filled independently. To test: 1) edit or add a new recod 2) click on field 008 value builder, positions 18-21 and 24-27 only show an input text box 3) apply the patch 4) reload value_builder page, now each position (18-21,24-27) has it's own pulldown. A similar fix could be used in a similar problem in 006 value builder. Created attachment 18057 [details] [review] [SIGNED OFF] Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin Easy workaround This patch expands both options, Illustrations and Nature of.., so each position could be filled independently. To test: 1) edit or add a new recod 2) click on field 008 value builder, positions 18-21 and 24-27 only show an input text box 3) apply the patch 4) reload value_builder page, now each position (18-21,24-27) has it's own pulldown. A similar fix could be used in a similar problem in 006 value builder. Signed-off-by: David Cook <dcook@prosentient.com.au> I struggled with this test plan at first (until I cleared my memcache), but it works as described. Thanks, Bernardo! Created attachment 19033 [details] [review] Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin Easy workaround This patch expands both options, Illustrations and Nature of.., so each position could be filled independently. To test: 1) edit or add a new recod 2) click on field 008 value builder, positions 18-21 and 24-27 only show an input text box 3) apply the patch 4) reload value_builder page, now each position (18-21,24-27) has it's own pulldown. A similar fix could be used in a similar problem in 006 value builder. Signed-off-by: David Cook <dcook@prosentient.com.au> I struggled with this test plan at first (until I cleared my memcache), but it works as described. Thanks, Bernardo! Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 19034 [details] [review] Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin Easy workaround This patch expands both options, Illustrations and Nature of.., so each position could be filled independently. To test: 1) edit or add a new recod 2) click on field 008 value builder, positions 18-21 and 24-27 only show an input text box 3) apply the patch 4) reload value_builder page, now each position (18-21,24-27) has it's own pulldown. A similar fix could be used in a similar problem in 006 value builder. Signed-off-by: David Cook <dcook@prosentient.com.au> I struggled with this test plan at first (until I cleared my memcache), but it works as described. Thanks, Bernardo! Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Pushed to master. Thanks, Bernardo! This patch has been pushed to 3.12.x, will be in 3.12.2. Thanks Bernardo, great job! |