View | Details | Raw Unified | Return to bug 8956
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-13 / +63 lines)
Lines 138-147 function init_pattern() { Link Here
138
	irregular_issues = new IrregularPattern();
138
	irregular_issues = new IrregularPattern();
139
}
139
}
140
function reset_pattern() {
140
function reset_pattern() {
141
	document.getElementById("numberpattern").value = '';
141
    document.getElementById("numberpattern").value = '';
142
    document.getElementById("irregularity").innerHTML = '';
142
    document.getElementById("irregularity").innerHTML = '';
143
	init_pattern();
143
    $('.label_field').val('').hide();
144
	reset_num_pattern();
144
145
    init_pattern();
146
    reset_num_pattern();
145
}
147
}
146
148
147
// common pre defined number patterns
149
// common pre defined number patterns
Lines 164-170 var patternchoice = document.getElementById("numberpattern").value; Link Here
164
        document.f.lastvalue1.value=1;
166
        document.f.lastvalue1.value=1;
165
        document.f.lastvalue2.value=1;
167
        document.f.lastvalue2.value=1;
166
        document.f.lastvalue3.value=1;
168
        document.f.lastvalue3.value=1;
167
        document.f.numberingmethod.value=_("Vol {X}, No {Y}, Issue {Z}");
169
        $(document.f.x_label).val( _("Vol") ).parent().show();
170
        $(document.f.y_label).val( _("No") ).parent().show();
171
        $(document.f.z_label).val( _("Issue") ).parent().show();
172
        document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}, {ZL} {Z}");
168
        moreoptions(text[1],text[0],text[2]);
173
        moreoptions(text[1],text[0],text[2]);
169
        display_table(0); // toggle info box on (1) or off (0)
174
        display_table(0); // toggle info box on (1) or off (0)
170
        break;
175
        break;
Lines 184-190 var patternchoice = document.getElementById("numberpattern").value; Link Here
184
        document.f.lastvalue1.value=1;
189
        document.f.lastvalue1.value=1;
185
        document.f.lastvalue2.value=1;
190
        document.f.lastvalue2.value=1;
186
        document.f.lastvalue3.value='';
191
        document.f.lastvalue3.value='';
187
        document.f.numberingmethod.value=_("Vol {X}, No {Y}");
192
        $(document.f.x_label).val( _("Vol") ).parent().show();
193
        $(document.f.y_label).val( _("No") ).parent().show();
194
        $(document.f.z_label).val('').parent().hide();
195
        document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}");
188
        moreoptions(text[1],text[0]);
196
        moreoptions(text[1],text[0]);
189
        display_table(0);
197
        display_table(0);
190
        break;
198
        break;
Lines 204-210 var patternchoice = document.getElementById("numberpattern").value; Link Here
204
        document.f.lastvalue1.value=1;
212
        document.f.lastvalue1.value=1;
205
        document.f.lastvalue2.value=1;
213
        document.f.lastvalue2.value=1;
206
        document.f.lastvalue3.value='';
214
        document.f.lastvalue3.value='';
207
        document.f.numberingmethod.value=_("Vol {X}, Issue {Y}");
215
        $(document.f.x_label).val( _("Vol") ).parent().show();
216
        $(document.f.y_label).val( _("Issue") ).parent().show();
217
        $(document.f.z_label).val('').parent().hide();
218
        document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}");
208
        moreoptions(text[1],text[2]);
219
        moreoptions(text[1],text[2]);
209
        display_table(0);
220
        display_table(0);
210
        break;
221
        break;
Lines 223-229 var patternchoice = document.getElementById("numberpattern").value; Link Here
223
        document.f.setto1.value=0;
234
        document.f.setto1.value=0;
224
        document.f.setto2.value=1;
235
        document.f.setto2.value=1;
225
        document.f.setto3.value='';
236
        document.f.setto3.value='';
226
        document.f.numberingmethod.value=_("No {X}, Issue {Y}");
237
        $(document.f.x_label).val( _("No") ).parent().show();
238
        $(document.f.y_label).val( _("Issue") ).parent().show();
239
        $(document.f.z_label).val('').parent().hide();
240
        document.f.numberingmethod.value=_("{XL} {X}, {YL} {Y}");
227
        moreoptions(text[0],text[2]);
241
        moreoptions(text[0],text[2]);
228
        display_table(0);
242
        display_table(0);
229
        break;
243
        break;
Lines 246-251 var patternchoice = document.getElementById("numberpattern").value; Link Here
246
        document.f.setto2.value='1';
260
        document.f.setto2.value='1';
247
        document.f.setto3.value='';
261
        document.f.setto3.value='';
248
        document.f.periodicity.value='8';
262
        document.f.periodicity.value='8';
263
        $(document.f.x_label).val('').parent().show();
264
        $(document.f.y_label).val('').parent().show();
265
        $(document.f.z_label).val('').parent().hide();
249
        document.f.numberingmethod.value=_("{Y} {X}");
266
        document.f.numberingmethod.value=_("{Y} {X}");
250
        moreoptions_seasons(text[15],sYear);
267
        moreoptions_seasons(text[15],sYear);
251
        document.f.lastvalue1temp.value=document.f.lastvalue1.value=sYear;
268
        document.f.lastvalue1temp.value=document.f.lastvalue1.value=sYear;
Lines 256-261 var patternchoice = document.getElementById("numberpattern").value; Link Here
256
        display_table(1);
273
        display_table(1);
257
        document.getElementById("more_options").innerHTML = '';
274
        document.getElementById("more_options").innerHTML = '';
258
        document.f.irreg_check.value=1; 
275
        document.f.irreg_check.value=1; 
276
        $(document.f.x_label).val('').parent().show();
277
        $(document.f.y_label).val('').parent().show();
278
        $(document.f.z_label).val('').parent().show();
259
        break;
279
        break;
260
    case "8":  // Year/Number
280
    case "8":  // Year/Number
261
        var d = (document.f.firstacquidate.value) ? new Date( document.f.firstacquidate.value) : new Date() ;
281
        var d = (document.f.firstacquidate.value) ? new Date( document.f.firstacquidate.value) : new Date() ;
Lines 313-318 var patternchoice = document.getElementById("numberpattern").value; Link Here
313
            default:
333
            default:
314
          } 
334
          } 
315
        document.f.lastvalue3.value='';
335
        document.f.lastvalue3.value='';
336
        $(document.f.x_label).val('').parent().show();
337
        $(document.f.y_label).val('').parent().show();
338
        $(document.f.z_label).val('').parent().hide();
316
        document.f.numberingmethod.value=_("{X} / {Y}");
339
        document.f.numberingmethod.value=_("{X} / {Y}");
317
        moreoptions(text[16],text[0]);
340
        moreoptions(text[16],text[0]);
318
     //   document.f.lastvalue1temp.value=sYear;
341
     //   document.f.lastvalue1temp.value=sYear;
Lines 335-340 var patternchoice = document.getElementById("numberpattern").value; Link Here
335
        document.f.lastvalue1.value=1;
358
        document.f.lastvalue1.value=1;
336
        document.f.lastvalue2.value='';
359
        document.f.lastvalue2.value='';
337
        document.f.lastvalue3.value='';
360
        document.f.lastvalue3.value='';
361
        $(document.f.x_label).val('').parent().show();
362
        $(document.f.y_label).val('').parent().hide();
363
        $(document.f.z_label).val('').parent().hide();
338
        document.f.numberingmethod.value='{X}';
364
        document.f.numberingmethod.value='{X}';
339
//        moreoptions_daily_check(text[0]);
365
//        moreoptions_daily_check(text[0]);
340
        moreoptions(text[0]);
366
        moreoptions(text[0]);
Lines 350-358 function display_table(n) { Link Here
350
    } else if(n==0){
376
    } else if(n==0){
351
        document.getElementById("basetable").style.display = 'none';
377
        document.getElementById("basetable").style.display = 'none';
352
    } else {
378
    } else {
353
		var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ;
379
        var disp_val = ( document.getElementById("basetable").style.display == 'none' ) ? 'block' : 'none' ;
354
			document.getElementById("basetable").style.display = disp_val;
380
        document.getElementById("basetable").style.display = disp_val;
355
	}
381
    }
356
}
382
}
357
383
358
function set_num_pattern_from_template_vars() {
384
function set_num_pattern_from_template_vars() {
Lines 914-919 function Check(f) { Link Here
914
}
940
}
915
941
916
$(document).ready(function() {
942
$(document).ready(function() {
943
    $('.label_field').parent().hide();
944
    $('#add1').change(function() {
945
        if( $(this).val() ) {
946
          $('#x_label').parent().show();
947
        } else {
948
          $('#x_label').parent().hide();
949
        }
950
    });
951
    $('#add2').change(function() {
952
        if( $(this).val() ) {
953
          $('#y_label').parent().show();
954
        } else {
955
          $('#y_label').parent().hide();
956
        }
957
    });
958
    $('#add3').change(function() {
959
        if( $(this).val() ) {
960
          $('#z_label').parent().show();
961
        } else {
962
          $('#z_label').parent().hide();
963
        }
964
    });
965
917
    init_pattern();
966
    init_pattern();
918
    // http://jqueryui.com/demos/datepicker/#date-range
967
    // http://jqueryui.com/demos/datepicker/#date-range
919
    var dates = $( "#histstartdate, #histenddate" ).datepicker({
968
    var dates = $( "#histstartdate, #histenddate" ).datepicker({
Lines 1309-1316 $(document).ready(function() { Link Here
1309
           <label for="to"> Subscription end date:</label>
1358
           <label for="to"> Subscription end date:</label>
1310
                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="to" class="datepickerto" />
1359
                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="to" class="datepickerto" />
1311
        </li>
1360
        </li>
1312
    <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" />
1361
        <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>
1313
    </li>
1362
        <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>
1363
        <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>
1364
        <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" /></li>
1314
    </ol>
1365
    </ol>
1315
	</fieldset>
1366
	</fieldset>
1316
1367
1317
- 

Return to bug 8956