|
Lines 3-32
Link Here
|
| 3 |
[% INCLUDE 'doc-head-close.inc' %] |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
| 4 |
<script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script> |
4 |
<script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script> |
| 5 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
5 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
|
|
6 |
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script> |
| 6 |
<script type="text/javascript"> |
7 |
<script type="text/javascript"> |
| 7 |
//<![CDATA[ |
8 |
//<![CDATA[ |
| 8 |
|
9 |
|
| 9 |
var fields_in_use = {}; |
|
|
| 10 |
$(document).ready(function() { |
10 |
$(document).ready(function() { |
| 11 |
$('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) { |
11 |
$('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) { |
| 12 |
$("#"+ui.panel.id+" input:eq(0)").focus(); |
12 |
$("#"+ui.panel.id+" input:eq(0)").focus(); |
| 13 |
}); |
13 |
}); |
| 14 |
$('.tag').each(function() { |
14 |
|
| 15 |
var field_id = this.getAttribute('id').substring(0, 7); |
|
|
| 16 |
if (field_id in fields_in_use) { |
| 17 |
fields_in_use[field_id]++; |
| 18 |
} else { |
| 19 |
fields_in_use[field_id] = 1; |
| 20 |
} |
| 21 |
}); |
| 22 |
$('.subfield_line').each(function() { |
| 23 |
var field_id = this.getAttribute('id').substring(0, 12); |
| 24 |
if (field_id in fields_in_use) { |
| 25 |
fields_in_use[field_id]++; |
| 26 |
} else { |
| 27 |
fields_in_use[field_id] = 1; |
| 28 |
} |
| 29 |
}); |
| 30 |
/* check cookie to hide/show marcdocs*/ |
15 |
/* check cookie to hide/show marcdocs*/ |
| 31 |
if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){ |
16 |
if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){ |
| 32 |
hideMARCdocLinks(); |
17 |
hideMARCdocLinks(); |
|
Lines 48-68
function confirmnotdup(redirect){
Link Here
|
| 48 |
Check(); |
33 |
Check(); |
| 49 |
} |
34 |
} |
| 50 |
|
35 |
|
| 51 |
/** |
|
|
| 52 |
* |
| 53 |
* |
| 54 |
*/ |
| 55 |
function Check(){ |
| 56 |
var StrAlert = AreMandatoriesNotOk(); |
| 57 |
if( ! StrAlert ){ |
| 58 |
document.f.submit(); |
| 59 |
return true; |
| 60 |
} else { |
| 61 |
alert(StrAlert); |
| 62 |
return false; |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
function Dopop(link,i) { |
36 |
function Dopop(link,i) { |
| 67 |
defaultvalue = document.getElementById(i).value; |
37 |
defaultvalue = document.getElementById(i).value; |
| 68 |
window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes'); |
38 |
window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes'); |
|
Lines 235-240
function AreMandatoriesNotOk(){
Link Here
|
| 235 |
} |
205 |
} |
| 236 |
} |
206 |
} |
| 237 |
|
207 |
|
|
|
208 |
/** |
| 209 |
* |
| 210 |
* |
| 211 |
*/ |
| 212 |
function Check(){ |
| 213 |
var StrAlert = AreMandatoriesNotOk(); |
| 214 |
if( ! StrAlert ){ |
| 215 |
document.f.submit(); |
| 216 |
return true; |
| 217 |
} else { |
| 218 |
alert(StrAlert); |
| 219 |
return false; |
| 220 |
} |
| 221 |
} |
| 222 |
|
| 238 |
/** |
223 |
/** |
| 239 |
* check if z3950 mandatories are set or not |
224 |
* check if z3950 mandatories are set or not |
| 240 |
*/ |
225 |
*/ |
|
Lines 260-640
function Changefwk(FwkList) {
Link Here
|
| 260 |
f.submit(); |
245 |
f.submit(); |
| 261 |
} |
246 |
} |
| 262 |
|
247 |
|
| 263 |
// returns the subfieldcode based upon subfieldid writing |
|
|
| 264 |
function getSubfieldcode(tagsubfieldid){ |
| 265 |
// 3 : tag +3 : tagnumber +4 : number of _ +8 subfield -1 begins at 0 |
| 266 |
return tagsubfieldid.substr(3+3+4+8-1,1); |
| 267 |
} |
| 268 |
|
| 269 |
// Take the base of tagsubfield information (removing the subfieldcodes and subfieldindexes) |
| 270 |
// returns the filter |
| 271 |
function getTagInputnameFilter(tagsubfieldid){ |
| 272 |
var tagsubfield=tagsubfieldid.substr(0,tagsubfieldid.lastIndexOf("_")); |
| 273 |
var tagcode=tagsubfield.substr(tagsubfield.lastIndexOf("_")); |
| 274 |
tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); |
| 275 |
tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); |
| 276 |
tagsubfield=tagsubfield+"_."+tagcode; |
| 277 |
return tagsubfield; |
| 278 |
} |
| 279 |
|
| 280 |
function openAuth(tagsubfieldid,authtype) { |
| 281 |
// let's take the base of tagsubfield information (removing the indexes and the codes |
| 282 |
var element=document.getElementById(tagsubfieldid); |
| 283 |
var tagsubfield=getTagInputnameFilter(tagsubfieldid); |
| 284 |
var elementsubfcode=getSubfieldcode(element.name); |
| 285 |
var mainmainstring=element.value; |
| 286 |
var mainstring=""; |
| 287 |
var inputs = element.parentNode.parentNode.getElementsByTagName("input"); |
| 288 |
|
| 289 |
for (var myindex =0; myindex<inputs.length;myindex++){ |
| 290 |
if (inputs[myindex].name && inputs[myindex].name.match(tagsubfield)){ |
| 291 |
var subfieldcode=getSubfieldcode(inputs[myindex].name); |
| 292 |
if (isNaN(parseInt(subfieldcode)) && inputs[myindex].value != "" && subfieldcode!=elementsubfcode){ |
| 293 |
mainstring=inputs[myindex].value+" "+mainstring; |
| 294 |
} |
| 295 |
} |
| 296 |
} |
| 297 |
newin=window.open("../authorities/auth_finder.pl?authtypecode="+ authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); |
| 298 |
} |
| 299 |
|
| 300 |
|
| 301 |
function ExpandField(index) { |
| 302 |
var original = document.getElementById(index); //original <div> |
| 303 |
var divs = original.getElementsByTagName('div'); |
| 304 |
for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div |
| 305 |
if(divs[i].getAttribute('id').match(/^subfield/)){ // if it s a subfield |
| 306 |
if (divs[i].style.display == 'block') { |
| 307 |
divs[i].style.display = 'none'; |
| 308 |
} else { |
| 309 |
divs[i].style.display = 'block'; |
| 310 |
} |
| 311 |
} |
| 312 |
} |
| 313 |
} |
| 314 |
|
| 315 |
/** |
| 316 |
* To clone a field or a subfield by clicking on '+' button |
| 317 |
*/ |
| 318 |
function CloneField(index) { |
| 319 |
var original = document.getElementById(index); //original <div> |
| 320 |
fields_in_use[index.substr(0, 7)]++; |
| 321 |
var clone = original.cloneNode(true); |
| 322 |
var new_key = CreateKey(); |
| 323 |
var new_id = original.getAttribute('id')+new_key; |
| 324 |
|
| 325 |
clone.setAttribute('id',new_id); // setting a new id for the parent div |
| 326 |
|
| 327 |
var divs = clone.getElementsByTagName('div'); |
| 328 |
|
| 329 |
[% UNLESS ( hide_marc ) %] // No indicator if hide_marc |
| 330 |
// setting a new name for the new indicator |
| 331 |
for(var i=0; i < 2; i++) { |
| 332 |
var indicator = clone.getElementsByTagName('input')[i]; |
| 333 |
indicator.setAttribute('name',indicator.getAttribute('name')+new_key); |
| 334 |
} |
| 335 |
[% END %] |
| 336 |
|
| 337 |
// settings all subfields |
| 338 |
for(var i=0,divslen = divs.length ; i<divslen ; i++){ // foreach div |
| 339 |
if(divs[i].getAttribute("id").match(/^subfield/)){ // if it s a subfield |
| 340 |
|
| 341 |
// set the attribute for the new 'div' subfields |
| 342 |
divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key); |
| 343 |
|
| 344 |
var inputs = divs[i].getElementsByTagName('input'); |
| 345 |
var id_input = ""; |
| 346 |
|
| 347 |
for( j = 0 ; j < inputs.length ; j++ ) { |
| 348 |
if(inputs[j].getAttribute("id") && inputs[j].getAttribute("id").match(/^tag_/) ){ |
| 349 |
inputs[j].value = ""; |
| 350 |
} |
| 351 |
} |
| 352 |
|
| 353 |
inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key); |
| 354 |
inputs[0].setAttribute('name',inputs[0].getAttribute('name')+new_key); |
| 355 |
var id_input; |
| 356 |
try { |
| 357 |
id_input = inputs[1].getAttribute('id')+new_key; |
| 358 |
inputs[1].setAttribute('id',id_input); |
| 359 |
inputs[1].setAttribute('name',inputs[1].getAttribute('name')+new_key); |
| 360 |
} catch(e) { |
| 361 |
try{ // it s a select if it is not an input |
| 362 |
var selects = divs[i].getElementsByTagName('select'); |
| 363 |
id_input = selects[0].getAttribute('id')+new_key; |
| 364 |
selects[0].setAttribute('id',id_input); |
| 365 |
selects[0].setAttribute('name',selects[0].getAttribute('name')+new_key); |
| 366 |
}catch(e2){ // it is a textarea if it s not a select or an input |
| 367 |
var textaeras = divs[i].getElementsByTagName('textarea'); |
| 368 |
id_input = textaeras[0].getAttribute('id')+new_key; |
| 369 |
textaeras[0].setAttribute('id',id_input); |
| 370 |
textaeras[0].setAttribute('name',textaeras[0].getAttribute('name')+new_key); |
| 371 |
} |
| 372 |
} |
| 373 |
|
| 374 |
[% UNLESS ( advancedMARCEditor ) %] |
| 375 |
// when cloning a subfield, re set its label too. |
| 376 |
var labels = divs[i].getElementsByTagName('label'); |
| 377 |
labels[0].setAttribute('for',id_input); |
| 378 |
[% END %] |
| 379 |
|
| 380 |
[% UNLESS ( hide_marc ) %] |
| 381 |
// updating javascript parameters on button up |
| 382 |
var imgs = divs[i].getElementsByTagName('img'); |
| 383 |
imgs[0].setAttribute('onclick',"upSubfield(\'"+divs[i].getAttribute('id')+"\');"); |
| 384 |
[% END %] |
| 385 |
|
| 386 |
// setting its '+' and '-' buttons |
| 387 |
try { |
| 388 |
var anchors = divs[i].getElementsByTagName('a'); |
| 389 |
for (var j = 0; j < anchors.length; j++) { |
| 390 |
if(anchors[j].getAttribute('class') == 'buttonPlus'){ |
| 391 |
anchors[j].setAttribute('onclick',"CloneSubfield('" + divs[i].getAttribute('id') + "')"); |
| 392 |
} else if (anchors[j].getAttribute('class') == 'buttonMinus') { |
| 393 |
anchors[j].setAttribute('onclick',"UnCloneField('" + divs[i].getAttribute('id') + "')"); |
| 394 |
} |
| 395 |
} |
| 396 |
} |
| 397 |
catch(e){ |
| 398 |
// do nothig if ButtonPlus & CloneButtonPlus don t exist. |
| 399 |
} |
| 400 |
|
| 401 |
// button ... |
| 402 |
var spans=0; |
| 403 |
try { |
| 404 |
spans = divs[i].getElementsByTagName('a'); |
| 405 |
} catch(e) { |
| 406 |
// no spans |
| 407 |
} |
| 408 |
if(spans){ |
| 409 |
var buttonDot; |
| 410 |
if(!CloneButtonPlus){ // it s impossible to have + ... (buttonDot AND buttonPlus) |
| 411 |
buttonDot = spans[0]; |
| 412 |
if(buttonDot){ |
| 413 |
// 2 possibilities : |
| 414 |
try{ |
| 415 |
var buttonDotOnClick = buttonDot.getAttribute('onclick'); |
| 416 |
if(buttonDotOnClick.match('Clictag')){ // -1- It s a plugin |
| 417 |
var re = /\('.*'\)/i; |
| 418 |
buttonDotOnClick = buttonDotOnClick.replace(re,"('"+inputs[1].getAttribute('id')+"')"); |
| 419 |
if(buttonDotOnClick){ |
| 420 |
buttonDot.setAttribute('onclick',buttonDotOnClick); |
| 421 |
} |
| 422 |
} else { |
| 423 |
if(buttonDotOnClick.match('Dopop')) { // -2- It's a auth value |
| 424 |
var re1 = /&index=.*',/; |
| 425 |
var re2 = /,.*\)/; |
| 426 |
|
| 427 |
buttonDotOnClick = buttonDotOnClick.replace(re1,"&index="+inputs[1].getAttribute('id')+"',"); |
| 428 |
buttonDotOnClick = buttonDotOnClick.replace(re2,",'"+inputs[1].getAttribute('id')+"')"); |
| 429 |
|
| 430 |
if(buttonDotOnClick){ |
| 431 |
buttonDot.setAttribute('onclick',buttonDotOnClick); |
| 432 |
} |
| 433 |
} |
| 434 |
} |
| 435 |
try { |
| 436 |
// do not copy the script section. |
| 437 |
var script = spans[0].getElementsByTagName('script')[0]; |
| 438 |
spans[0].removeChild(script); |
| 439 |
} catch(e) { |
| 440 |
// do nothing if there is no script |
| 441 |
} |
| 442 |
}catch(e){} |
| 443 |
} |
| 444 |
} |
| 445 |
} |
| 446 |
[% UNLESS ( hide_marc ) %] |
| 447 |
var buttonUp = divs[i].getElementsByTagName('img')[0]; |
| 448 |
buttonUp.setAttribute('onclick',"upSubfield('" + divs[i].getAttribute('id') + "')"); |
| 449 |
[% END %] |
| 450 |
|
| 451 |
} else { // it's a indicator div |
| 452 |
if(divs[i].getAttribute('id').match(/^div_indicator/)){ |
| 453 |
var inputs = divs[i].getElementsByTagName('input'); |
| 454 |
inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key); |
| 455 |
inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key); |
| 456 |
|
| 457 |
var CloneButtonPlus; |
| 458 |
try { |
| 459 |
var anchors = divs[i].getElementsByTagName('a'); |
| 460 |
for (var j = 0; j < anchors.length; j++) { |
| 461 |
if (anchors[j].getAttribute('class') == 'buttonPlus') { |
| 462 |
anchors[j].setAttribute('onclick',"CloneField('" + new_id + "')"); |
| 463 |
} else if (anchors[j].getAttribute('class') == 'buttonMinus') { |
| 464 |
anchors[j].setAttribute('onclick',"UnCloneField('" + new_id + "')"); |
| 465 |
} else if (anchors[j].getAttribute('class') == 'expandfield') { |
| 466 |
anchors[j].setAttribute('onclick',"ExpandField('" + new_id + "')"); |
| 467 |
} |
| 468 |
} |
| 469 |
} |
| 470 |
catch(e){ |
| 471 |
// do nothig CloneButtonPlus doesn't exist. |
| 472 |
} |
| 473 |
|
| 474 |
} |
| 475 |
} |
| 476 |
} |
| 477 |
|
| 478 |
// insert this line on the page |
| 479 |
original.parentNode.insertBefore(clone,original.nextSibling); |
| 480 |
} |
| 481 |
|
| 482 |
function CloneSubfield(index){ |
| 483 |
var original = document.getElementById(index); //original <div> |
| 484 |
fields_in_use[index.substr(0, 12)]++; |
| 485 |
var clone = original.cloneNode(true); |
| 486 |
var new_key = CreateKey(); |
| 487 |
var new_id = original.getAttribute('id')+new_key; |
| 488 |
// set the attribute for the new 'div' subfields |
| 489 |
var inputs = clone.getElementsByTagName('input'); |
| 490 |
var selects = clone.getElementsByTagName('select'); |
| 491 |
var textareas = clone.getElementsByTagName('textarea'); |
| 492 |
var linkid; |
| 493 |
|
| 494 |
// input |
| 495 |
var id_input = ""; |
| 496 |
for(var i=0,len=inputs.length; i<len ; i++ ){ |
| 497 |
id_input = inputs[i].getAttribute('id')+new_key; |
| 498 |
inputs[i].setAttribute('id',id_input); |
| 499 |
inputs[i].setAttribute('name',inputs[i].getAttribute('name')+new_key); |
| 500 |
linkid = id_input; |
| 501 |
} |
| 502 |
|
| 503 |
// select |
| 504 |
for(var i=0,len=selects.length; i<len ; i++ ){ |
| 505 |
id_input = selects[i].getAttribute('id')+new_key; |
| 506 |
selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key); |
| 507 |
selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key); |
| 508 |
} |
| 509 |
|
| 510 |
// textarea |
| 511 |
for(var i=0,len=textareas.length; i<len ; i++ ){ |
| 512 |
id_input = textareas[i].getAttribute('id')+new_key; |
| 513 |
textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key); |
| 514 |
textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key); |
| 515 |
} |
| 516 |
|
| 517 |
// Changing the "..." link's onclick attribute for plugin callback |
| 518 |
var links = clone.getElementsByTagName('a'); |
| 519 |
var link = links[0]; |
| 520 |
var buttonDotOnClick = link.getAttribute('onclick'); |
| 521 |
if(buttonDotOnClick.match('Clictag')){ // -1- It s a plugin |
| 522 |
var re = /\('.*'\)/i; |
| 523 |
buttonDotOnClick = buttonDotOnClick.replace(re,"('"+linkid+"')"); |
| 524 |
if(buttonDotOnClick){ |
| 525 |
link.setAttribute('onclick',buttonDotOnClick); |
| 526 |
} |
| 527 |
} |
| 528 |
|
| 529 |
|
| 530 |
[% UNLESS ( advancedMARCEditor ) %] |
| 531 |
// when cloning a subfield, reset its label too. |
| 532 |
var label = clone.getElementsByTagName('label')[0]; |
| 533 |
label.setAttribute('for',id_input); |
| 534 |
[% END %] |
| 535 |
|
| 536 |
// setting a new id for the parent div |
| 537 |
clone.setAttribute('id',new_id); |
| 538 |
|
| 539 |
try { |
| 540 |
var buttonUp = clone.getElementsByTagName('img')[0]; |
| 541 |
buttonUp.setAttribute('onclick',"upSubfield('" + new_id + "')"); |
| 542 |
var anchors = clone.getElementsByTagName('a'); |
| 543 |
if(anchors.length){ |
| 544 |
for(var i = 0 ,lenanchors = anchors.length ; i < lenanchors ; i++){ |
| 545 |
if(anchors[i].getAttribute('class') == 'buttonPlus'){ |
| 546 |
anchors[i].setAttribute('onclick',"CloneSubfield('" + new_id + "')"); |
| 547 |
} else if (anchors[i].getAttribute('class') == 'buttonMinus') { |
| 548 |
anchors[i].setAttribute('onclick',"UnCloneField('" + new_id + "')"); |
| 549 |
} |
| 550 |
} |
| 551 |
} |
| 552 |
} |
| 553 |
catch(e){ |
| 554 |
// do nothig if ButtonPlus & CloneButtonPlus don't exist. |
| 555 |
} |
| 556 |
// insert this line on the page |
| 557 |
original.parentNode.insertBefore(clone,original.nextSibling); |
| 558 |
} |
| 559 |
|
| 560 |
/** |
| 561 |
* This function removes or clears unwanted subfields |
| 562 |
*/ |
| 563 |
function UnCloneField(index) { |
| 564 |
var original = document.getElementById(index); |
| 565 |
var field_id; |
| 566 |
if (index.match("tag")) { |
| 567 |
field_id = index.substr(0, 7); |
| 568 |
} else { |
| 569 |
field_id = index.substr(0, 12); |
| 570 |
} |
| 571 |
if (1 == fields_in_use[field_id]) { |
| 572 |
// clear inputs, but don't delete |
| 573 |
$(":input.input_marceditor", original).each(function(){ |
| 574 |
// thanks to http://www.learningjquery.com/2007/08/clearing-form-data for |
| 575 |
// hint about clearing selects correctly |
| 576 |
var type = this.type; |
| 577 |
var tag = this.tagName.toLowerCase(); |
| 578 |
if (type == 'text' || type == 'password' || tag == 'textarea') { |
| 579 |
this.value = ""; |
| 580 |
} else if (type == 'checkbox' || type == 'radio') { |
| 581 |
this.checked = false; |
| 582 |
} else if (tag == 'select') { |
| 583 |
this.selectedIndex = -1; |
| 584 |
} |
| 585 |
}); |
| 586 |
$(":input.indicator", original).val(""); |
| 587 |
} else { |
| 588 |
original.parentNode.removeChild(original); |
| 589 |
fields_in_use[field_id]--; |
| 590 |
} |
| 591 |
} |
| 592 |
|
| 593 |
/** |
| 594 |
* This function create a random number |
| 595 |
*/ |
| 596 |
function CreateKey(){ |
| 597 |
return parseInt(Math.random() * 100000); |
| 598 |
} |
| 599 |
|
| 600 |
/** |
| 601 |
* This function allows to move a subfield up by clickink on the 'up' button . |
| 602 |
*/ |
| 603 |
function upSubfield(index) { |
| 604 |
try{ |
| 605 |
var line = document.getElementById(index); // get the line where the user has clicked. |
| 606 |
} catch(e) { |
| 607 |
return; // this line doesn't exist... |
| 608 |
} |
| 609 |
var tag = line.parentNode; // get the dad of this line. (should be "<div id='tag_...'>") |
| 610 |
|
| 611 |
// getting all subfields for this tag |
| 612 |
var subfields = tag.getElementsByTagName('div'); |
| 613 |
var subfieldsLength = subfields.length; |
| 614 |
|
| 615 |
if(subfieldsLength<=1) return; // nothing to do if there is just one subfield. |
| 616 |
|
| 617 |
// among all subfields |
| 618 |
for(var i=0;i<subfieldsLength;i++){ |
| 619 |
if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked : |
| 620 |
if(i==1){ // if the clicked subfield is on the top |
| 621 |
tag.appendChild(subfields[1]); |
| 622 |
return; |
| 623 |
} else { |
| 624 |
var lineAbove = subfields[i-1]; |
| 625 |
tag.insertBefore(line,lineAbove); |
| 626 |
return; |
| 627 |
} |
| 628 |
} |
| 629 |
} |
| 630 |
} |
| 631 |
|
| 632 |
function unHideSubfield(index,labelindex) { // FIXME :: is it used ? |
| 633 |
subfield = document.getElementById(index); |
| 634 |
subfield.style.display = 'block'; |
| 635 |
label = document.getElementById(labelindex); |
| 636 |
label.style.display='none'; |
| 637 |
} |
| 638 |
//]]> |
248 |
//]]> |
| 639 |
</script> |
249 |
</script> |
| 640 |
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" /> |
250 |
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" /> |
|
Lines 657-662
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
| 657 |
//]]> |
267 |
//]]> |
| 658 |
</script> |
268 |
</script> |
| 659 |
[% INCLUDE 'header.inc' %] |
269 |
[% INCLUDE 'header.inc' %] |
|
|
270 |
|
| 660 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</div> |
271 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</div> |
| 661 |
|
272 |
|
| 662 |
<div id="doc" class="yui-t7"> |
273 |
<div id="doc" class="yui-t7"> |
|
Lines 802-884
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
| 802 |
<input type="hidden" name="breedingid" value="[% breedingid %]" /> |
413 |
<input type="hidden" name="breedingid" value="[% breedingid %]" /> |
| 803 |
|
414 |
|
| 804 |
<div id="addbibliotabs" class="toptabs numbered"> |
415 |
<div id="addbibliotabs" class="toptabs numbered"> |
| 805 |
<ul>[% FOREACH BIG_LOO IN BIG_LOOP %] |
416 |
<ul> |
| 806 |
<li> [% IF ( BIG_LOO.number ) %] |
417 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
| 807 |
<a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a> |
418 |
<li><a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a></li> |
| 808 |
[% ELSE %] |
419 |
[% END %] |
| 809 |
<a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a> |
420 |
</ul> |
| 810 |
[% END %]</li> |
|
|
| 811 |
[% END %]</ul> |
| 812 |
|
421 |
|
| 813 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
422 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
| 814 |
<!-- hide every tab except the 1st --> |
|
|
| 815 |
[% IF ( BIG_LOO.number ) %] |
| 816 |
<div id="tab[% BIG_LOO.number %]XX"> |
| 817 |
[% ELSE %] |
| 818 |
<div id="tab[% BIG_LOO.number %]XX"> |
423 |
<div id="tab[% BIG_LOO.number %]XX"> |
| 819 |
[% END %] |
|
|
| 820 |
|
| 821 |
|
424 |
|
| 822 |
[% FOREACH innerloo IN BIG_LOO.innerloop %] |
425 |
[% FOREACH innerloo IN BIG_LOO.innerloop %] |
| 823 |
[% IF ( innerloo.tag ) %] |
426 |
[% IF ( innerloo.tag ) %] |
| 824 |
<div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> |
427 |
<div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> |
| 825 |
<div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> |
428 |
<div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> |
| 826 |
[% UNLESS hide_marc %] |
429 |
[% UNLESS hide_marc %] |
| 827 |
[% IF advancedMARCEditor %] |
430 |
[% IF advancedMARCEditor %] |
| 828 |
<a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a> |
431 |
<a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a> |
| 829 |
[% ELSE %] |
432 |
[% ELSE %] |
| 830 |
<span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %] |
433 |
<span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %] |
| 831 |
[% IF marcflavour != 'NORMARC' %]<a class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %] |
434 |
[% IF marcflavour != 'NORMARC' %]<a class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %] |
| 832 |
</span> |
435 |
</span> |
| 833 |
[% END %] |
436 |
[% END %] |
| 834 |
[% IF ( innerloo.fixedfield ) %] |
437 |
[% IF ( innerloo.fixedfield ) %] |
| 835 |
<input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" size="1" maxlength="1" value="[% innerloo.indicator1 %]" /> |
438 |
<input type="text" |
| 836 |
<input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" size="1" maxlength="1" value="[% innerloo.indicator2 %]" /> |
439 |
tabindex="1" |
|
|
440 |
class="indicator flat" |
| 441 |
style="display:none;" |
| 442 |
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" |
| 443 |
size="1" |
| 444 |
maxlength="1" |
| 445 |
value="[% innerloo.indicator1 %]" /> |
| 446 |
<input type="text" |
| 447 |
tabindex="1" |
| 448 |
class="indicator flat" |
| 449 |
style="display:none;" |
| 450 |
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" |
| 451 |
size="1" |
| 452 |
maxlength="1" |
| 453 |
value="[% innerloo.indicator2 %]" /> |
| 837 |
[% ELSE %] |
454 |
[% ELSE %] |
| 838 |
<input tabindex="1" class="indicator flat" type="text" name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" size="1" maxlength="1" value="[% innerloo.indicator1 %]" /> |
455 |
<input type="text" |
| 839 |
<input tabindex="1" class="indicator flat" type="text" name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" size="1" maxlength="1" value="[% innerloo.indicator2 %]" /> |
456 |
tabindex="1" |
|
|
457 |
class="indicator flat" |
| 458 |
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" |
| 459 |
size="1" |
| 460 |
maxlength="1" |
| 461 |
value="[% innerloo.indicator1 %]" /> |
| 462 |
<input type="text" |
| 463 |
tabindex="1" |
| 464 |
class="indicator flat" |
| 465 |
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" |
| 466 |
size="1" |
| 467 |
maxlength="1" |
| 468 |
value="[% innerloo.indicator2 %]" /> |
| 840 |
[% END %] - |
469 |
[% END %] - |
| 841 |
[% ELSE %] |
470 |
[% ELSE %] |
| 842 |
[% IF ( innerloo.fixedfield ) %] |
471 |
[% IF ( innerloo.fixedfield ) %] |
| 843 |
<input tabindex="1" type="hidden" name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" value="[% innerloo.indicator1 %]" /> |
472 |
<input type="hidden" |
| 844 |
<input tabindex="1" type="hidden" name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" value="[% innerloo.indicator2 %]" /> |
473 |
tabindex="1" |
|
|
474 |
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" |
| 475 |
value="[% innerloo.indicator1 %]" /> |
| 476 |
<input type="hidden" |
| 477 |
tabindex="1" |
| 478 |
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" |
| 479 |
value="[% innerloo.indicator2 %]" /> |
| 845 |
[% ELSE %] |
480 |
[% ELSE %] |
| 846 |
<input tabindex="1" type="hidden" name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" value="[% innerloo.indicator1 %]" /> |
481 |
<input type="hidden" |
| 847 |
<input tabindex="1" type="hidden" name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" value="[% innerloo.indicator2 %]" /> |
482 |
tabindex="1" |
|
|
483 |
name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" |
| 484 |
value="[% innerloo.indicator1 %]" /> |
| 485 |
<input type="hidden" |
| 486 |
tabindex="1" |
| 487 |
name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" |
| 488 |
value="[% innerloo.indicator2 %]" /> |
| 848 |
[% END %] |
489 |
[% END %] |
| 849 |
[% END %] |
490 |
[% END %] |
| 850 |
|
491 |
|
| 851 |
[% UNLESS advancedMARCEditor %] |
492 |
[% UNLESS advancedMARCEditor %] |
| 852 |
<a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a> |
493 |
<a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a> |
| 853 |
[% END %] |
494 |
[% END %] |
| 854 |
[% IF ( innerloo.repeatable ) %] |
495 |
<span class="field_controls"> |
| 855 |
<span class="subfield_controls"><a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Repeat this Tag"><img src="/intranet-tmpl/prog/img/repeat-tag.png" alt="Repeat this Tag" /></a> |
496 |
[% IF ( innerloo.repeatable ) %] |
| 856 |
[% END %] |
497 |
<a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','[% hide_marc %]','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag"> |
| 857 |
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Delete this Tag"><img src="/intranet-tmpl/prog/img/delete-tag.png" alt="Delete this Tag" /></a></span> |
498 |
<img src="/intranet-tmpl/prog/img/repeat-tag.png" alt="Repeat this Tag" /> |
| 858 |
|
499 |
</a> |
| 859 |
|
500 |
[% END %] |
|
|
501 |
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Delete this Tag"> |
| 502 |
<img src="/intranet-tmpl/prog/img/delete-tag.png" alt="Delete this Tag" /> |
| 503 |
</a> |
| 504 |
</span> |
| 505 |
|
| 860 |
</div> |
506 |
</div> |
| 861 |
|
507 |
|
| 862 |
[% FOREACH subfield_loo IN innerloo.subfield_loop %] |
508 |
[% FOREACH subfield_loo IN innerloo.subfield_loop %] |
| 863 |
<!-- One line on the marc editor --> |
509 |
<!-- One line on the marc editor --> |
| 864 |
<div class="subfield_line" style="[% subfield_loo.visibility %]; float: left; clear: left; width: 100%;" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]"> |
510 |
<div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]"> |
| 865 |
|
511 |
|
| 866 |
[% UNLESS advancedMARCEditor %] |
512 |
[% UNLESS advancedMARCEditor %] |
| 867 |
[% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield"> |
513 |
[% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield"> |
| 868 |
[% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">[% END %] |
514 |
[% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield"> |
| 869 |
[% END %] |
515 |
[% END %] |
|
|
516 |
[% END %] |
| 870 |
|
517 |
|
| 871 |
[% UNLESS hide_marc %] |
518 |
[% UNLESS hide_marc %] |
| 872 |
<span class="subfieldcode">[% IF ( subfield_loo.fixedfield ) %] |
519 |
<span class="subfieldcode"> |
| 873 |
<img class="buttonUp" style="display:none;" src="[% themelang %]/../img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> |
520 |
[% IF ( subfield_loo.fixedfield ) %] |
|
|
521 |
<img class="buttonUp" style="display:none;" src="/intranet-tmpl/prog/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> |
| 874 |
[% ELSE %] |
522 |
[% ELSE %] |
| 875 |
<img class="buttonUp" src="[% themelang %]/../img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> |
523 |
<img class="buttonUp" src="/intranet-tmpl/prog/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> |
| 876 |
[% END %] |
524 |
[% END %] |
| 877 |
<input title="[% subfield_loo.marc_lib_plain %]" style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" type="text" tabindex="0" name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" value="[% subfield_loo.subfield %]" size="1" maxlength="1" class="flat" /> |
525 |
<input type="text" |
| 878 |
</span> |
526 |
title="[% subfield_loo.marc_lib_plain %]" |
|
|
527 |
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" |
| 528 |
name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" |
| 529 |
value="[% subfield_loo.subfield %]" |
| 530 |
size="1" |
| 531 |
maxlength="1" |
| 532 |
class="flat" |
| 533 |
tabindex="0" /> |
| 534 |
</span> |
| 879 |
[% ELSE %] |
535 |
[% ELSE %] |
| 880 |
<input type="hidden" name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" value="[% subfield_loo.subfield %]" /> |
536 |
<input type="hidden" |
| 881 |
</span> |
537 |
name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" |
|
|
538 |
value="[% subfield_loo.subfield %]" /> |
| 882 |
[% END %] |
539 |
[% END %] |
| 883 |
|
540 |
|
| 884 |
[% UNLESS advancedMARCEditor %] |
541 |
[% UNLESS advancedMARCEditor %] |
|
Lines 891-912
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
| 891 |
|
548 |
|
| 892 |
[% subfield_loo.marc_value %] |
549 |
[% subfield_loo.marc_value %] |
| 893 |
|
550 |
|
|
|
551 |
<span class="subfield_controls"> |
| 894 |
[% IF ( subfield_loo.repeatable ) %] |
552 |
[% IF ( subfield_loo.repeatable ) %] |
| 895 |
<span class="subfield_controls"><a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;"><img src="/intranet-tmpl/prog/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /></a> |
553 |
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]','[% advancedMARCEditor %]'); return false;"> |
| 896 |
<a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;"><img src="/intranet-tmpl/prog/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /></a></span> |
554 |
<img src="/intranet-tmpl/prog/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
|
|
555 |
</a> |
| 556 |
<a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;"> |
| 557 |
<img src="/intranet-tmpl/prog/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /> |
| 558 |
</a> |
| 897 |
[% END %] |
559 |
[% END %] |
| 898 |
|
560 |
</span> |
| 899 |
|
561 |
|
| 900 |
</div> |
562 |
</div> |
| 901 |
<!-- End of the line --> |
563 |
<!-- End of the line --> |
| 902 |
|
|
|
| 903 |
[% END %] |
564 |
[% END %] |
| 904 |
</div> |
565 |
|
| 905 |
[% END %]<!-- tag --> |
|
|
| 906 |
[% END %] |
| 907 |
</div> |
566 |
</div> |
| 908 |
[% END %] |
567 |
[% END %]<!-- if innerloo.tag --> |
| 909 |
</div> |
568 |
[% END %]<!-- BIG_LOO.innerloop --> |
|
|
569 |
</div> |
| 570 |
[% END %]<!-- BIG_LOOP --> |
| 571 |
|
| 572 |
</div><!-- tabs --> |
| 573 |
|
| 910 |
<!-- Fields for fast add cataloguing --> |
574 |
<!-- Fields for fast add cataloguing --> |
| 911 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
575 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
| 912 |
<input type="hidden" name="branch" value="[% branch %]" /> |
576 |
<input type="hidden" name="branch" value="[% branch %]" /> |
|
Lines 914-919
function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
Link Here
|
| 914 |
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> |
578 |
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> |
| 915 |
<input type="hidden" name="duedatespec" value="[% duedatespec %]" /> |
579 |
<input type="hidden" name="duedatespec" value="[% duedatespec %]" /> |
| 916 |
<!-- /End of fast add fields --> |
580 |
<!-- /End of fast add fields --> |
|
|
581 |
|
| 917 |
</form> |
582 |
</form> |
| 918 |
|
583 |
|
| 919 |
</div> |
584 |
</div> |