Bugzilla – Attachment 16350 Details for
Bug 8956
Split serials enumeration data into separate fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8956 - Split serials enumeration data into separate fields - Part 5 - Add label fields to subscription editor.
Bug-8956---Split-serials-enumeration-data-into-sep.patch (text/plain), 8.18 KB, created by
Kyle M Hall (khall)
on 2013-03-19 09:54:32 UTC
(
hide
)
Description:
Bug 8956 - Split serials enumeration data into separate fields - Part 5 - Add label fields to subscription editor.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-19 09:54:32 UTC
Size:
8.18 KB
patch
obsolete
>From 474ab4731e97f18af776d30aa0974610745b8ea6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 24 Oct 2012 11:32:17 -0400 >Subject: [PATCH] Bug 8956 - Split serials enumeration data into separate fields - Part 5 - Add label fields to subscription editor. > >--- > .../prog/en/modules/serials/subscription-add.tt | 75 ++++++++++++++++--- > 1 files changed, 63 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 35d4187..b9e2b9a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -138,10 +138,12 @@ function init_pattern() { > irregular_issues = new IrregularPattern(); > } > function reset_pattern() { >- document.getElementById("numberpattern").value = ''; >+ document.getElementById("numberpattern").value = ''; > document.getElementById("irregularity").innerHTML = ''; >- init_pattern(); >- reset_num_pattern(); >+ $('.label_field').val('').hide(); >+ >+ init_pattern(); >+ reset_num_pattern(); > } > > // common pre defined number patterns >@@ -164,7 +166,10 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.lastvalue1.value=1; > document.f.lastvalue2.value=1; > document.f.lastvalue3.value=1; >- document.f.numberingmethod.value=_("Vol {X}, No {Y}, Issue {Z}"); >+ $(document.f.x_label).val( _("Vol") ).parent().show(); >+ $(document.f.y_label).val( _("No") ).parent().show(); >+ $(document.f.z_label).val( _("Issue") ).parent().show(); >+ document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}, {ZL} {Z}"); > moreoptions(text[1],text[0],text[2]); > display_table(0); // toggle info box on (1) or off (0) > break; >@@ -184,7 +189,10 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.lastvalue1.value=1; > document.f.lastvalue2.value=1; > document.f.lastvalue3.value=''; >- document.f.numberingmethod.value=_("Vol {X}, No {Y}"); >+ $(document.f.x_label).val( _("Vol") ).parent().show(); >+ $(document.f.y_label).val( _("No") ).parent().show(); >+ $(document.f.z_label).val('').parent().hide(); >+ document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}"); > moreoptions(text[1],text[0]); > display_table(0); > break; >@@ -204,7 +212,10 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.lastvalue1.value=1; > document.f.lastvalue2.value=1; > document.f.lastvalue3.value=''; >- document.f.numberingmethod.value=_("Vol {X}, Issue {Y}"); >+ $(document.f.x_label).val( _("Vol") ).parent().show(); >+ $(document.f.y_label).val( _("Issue") ).parent().show(); >+ $(document.f.z_label).val('').parent().hide(); >+ document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}"); > moreoptions(text[1],text[2]); > display_table(0); > break; >@@ -223,7 +234,10 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.setto1.value=0; > document.f.setto2.value=1; > document.f.setto3.value=''; >- document.f.numberingmethod.value=_("No {X}, Issue {Y}"); >+ $(document.f.x_label).val( _("No") ).parent().show(); >+ $(document.f.y_label).val( _("Issue") ).parent().show(); >+ $(document.f.z_label).val('').parent().hide(); >+ document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}"); > moreoptions(text[0],text[2]); > display_table(0); > break; >@@ -246,6 +260,9 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.setto2.value='1'; > document.f.setto3.value=''; > document.f.periodicity.value='8'; >+ $(document.f.x_label).val('').parent().show(); >+ $(document.f.y_label).val('').parent().show(); >+ $(document.f.z_label).val('').parent().hide(); > document.f.numberingmethod.value=_("{Y} {X}"); > moreoptions_seasons(text[15],sYear); > document.f.lastvalue1temp.value=document.f.lastvalue1.value=sYear; >@@ -256,6 +273,9 @@ var patternchoice = document.getElementById("numberpattern").value; > display_table(1); > document.getElementById("more_options").innerHTML = ''; > document.f.irreg_check.value=1; >+ $(document.f.x_label).val('').parent().show(); >+ $(document.f.y_label).val('').parent().show(); >+ $(document.f.z_label).val('').parent().show(); > break; > case "8": // Year/Number > var d = (document.f.firstacquidate.value) ? new Date( document.f.firstacquidate.value) : new Date() ; >@@ -313,6 +333,9 @@ var patternchoice = document.getElementById("numberpattern").value; > default: > } > document.f.lastvalue3.value=''; >+ $(document.f.x_label).val('').parent().show(); >+ $(document.f.y_label).val('').parent().show(); >+ $(document.f.z_label).val('').parent().hide(); > document.f.numberingmethod.value=_("{X} / {Y}"); > moreoptions(text[16],text[0]); > // document.f.lastvalue1temp.value=sYear; >@@ -335,6 +358,9 @@ var patternchoice = document.getElementById("numberpattern").value; > document.f.lastvalue1.value=1; > document.f.lastvalue2.value=''; > document.f.lastvalue3.value=''; >+ $(document.f.x_label).val('').parent().show(); >+ $(document.f.y_label).val('').parent().hide(); >+ $(document.f.z_label).val('').parent().hide(); > document.f.numberingmethod.value='{X}'; > // moreoptions_daily_check(text[0]); > moreoptions(text[0]); >@@ -350,9 +376,9 @@ function display_table(n) { > } else if(n==0){ > document.getElementById("basetable").style.display = 'none'; > } else { >- var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ; >- document.getElementById("basetable").style.display = disp_val; >- } >+ var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ; >+ document.getElementById("basetable").style.display = disp_val; >+ } > } > > function set_num_pattern_from_template_vars() { >@@ -914,6 +940,29 @@ function Check(f) { > } > > $(document).ready(function() { >+ $('.label_field').parent().hide(); >+ $('#add1').change(function() { >+ if( $(this).val() ) { >+ $('#x_label').parent().show(); >+ } else { >+ $('#x_label').parent().hide(); >+ } >+ }); >+ $('#add2').change(function() { >+ if( $(this).val() ) { >+ $('#y_label').parent().show(); >+ } else { >+ $('#y_label').parent().hide(); >+ } >+ }); >+ $('#add3').change(function() { >+ if( $(this).val() ) { >+ $('#z_label').parent().show(); >+ } else { >+ $('#z_label').parent().hide(); >+ } >+ }); >+ > init_pattern(); > // http://jqueryui.com/demos/datepicker/#date-range > var dates = $( "#histstartdate, #histenddate" ).datepicker({ >@@ -1309,8 +1358,10 @@ $(document).ready(function() { > <label for="to"> Subscription end date:</label> > <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="to" class="datepickerto" /> > </li> >- <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" /> >- </li> >+ <li><label for="numberingmethod">{X} Label:</label> <input type="text" name="x_label" id="x_label" class="label_field"/><i>Appears in numbering formula as {XL}</i></li> >+ <li><label for="numberingmethod">{Y} Label:</label> <input type="text" name="y_label" id="y_label" class="label_field"/><i>Appears in numbering formula as {YL}</i></li> >+ <li><label for="numberingmethod">{Z} Label:</label> <input type="text" name="z_label" id="z_label" class="label_field"/><i>Appears in numbering formula as {ZL}</i></li> >+ <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" /></li> > </ol> > </fieldset> > >-- >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 8956
:
13041
|
13042
|
13043
|
13044
|
13045
|
13046
|
13047
|
15914
|
15915
|
15916
|
15917
|
15918
|
15919
|
15920
|
16346
|
16347
|
16348
|
16349
|
16350
|
16351
|
16352
|
16353
|
18554
|
18555
|
18556
|
18557
|
18558
|
18559
|
18560
|
18561
|
18568
|
18569
|
18570
|
18571
|
18572
|
18573
|
18574
|
18575
|
18576
|
18577
|
18578
|
18579
|
18580
|
18581
|
18582
|
18583
|
18679