From fd0b82b613731ffe789f67fa62a6148d545d88bc Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 24 Nov 2008 17:44:58 +0100 Subject: [PATCH] creating update database for 3.0.1 - adds 2 new sys prefs AllowRenewalOverride and MergeAuthoritiesOnupdate AllowRenewallOverride MergeAuthoritiesOnUpdate - set null issues.issuedate to lastreneweddate - Adding some changes in Database for bugfixes only UNIMARC Signed-off-by: Henri-Damien LAURENT --- cataloguing/addbiblio.pl | 5 +-- .../en/modules/cataloguing/addbiblio.tmpl | 40 ++++++++++++++++--- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 49be064199..0773f2eb4f 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -395,9 +395,8 @@ sub create_input { size=\"67\" maxlength=\"$max_length\" readonly=\"readonly\" - \/> - {$tag}->{$subfield}->{authtypecode}."&index=$subfield_data{id}&mainmainstring=$value','$subfield_data{id}'); return false;\" title=\"Tag Editor\">... + \/>{$tag}->{$subfield}->{authtypecode}."'); return false;\" title=\"Tag Editor\">... "; } # it's a plugin field diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index ab869f94cf..1db25f94a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -138,12 +138,40 @@ function Changefwk(FwkList) { } -function openAuth(tagid,authtype,X) { -// defaultid=document.getElementById(subfieldid); -// alert("X"+X); - Y=X.parentNode.getAttribute("id"); -// alert("tagid"+Y); - newin=window.open("../authorities/auth_finder.pl?authtypecode="+ authtype+ "&tagid="+Y, "value builder",'width=700,height=550,toolbar=false,scrollbars=yes'); +// returns the subfieldcode based upon subfieldid writing +function getSubfieldcode(tagsubfieldid){ + // 3 : tag +3 : tagnumber +4 : number of _ +8 subfield -1 begins at 0 + return tagsubfieldid.substr(3+3+4+8-1,1); +} + +// Take the base of tagsubfield information (removing the subfieldcodes and subfieldindexes) +// returns the filter +function getTagInputnameFilter(tagsubfieldid){ + var tagsubfield=tagsubfieldid.substr(0,tagsubfieldid.lastIndexOf("_")); + var tagcode=tagsubfield.substr(tagsubfield.lastIndexOf("_")); + tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); + tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); + tagsubfield=tagsubfield+"_."+tagcode; + return tagsubfield; +} + +function openAuth(tagsubfieldid,authtype) { + // let's take the base of tagsubfield information (removing the indexes and the codes + var element=document.getElementById(tagsubfieldid); + var tagsubfield=getTagInputnameFilter(tagsubfieldid); + var elementsubfcode=getSubfieldcode(element.name); + var mainmainstring=element.value; + var mainstring=""; + var inputs = document.getElementsByTagName("input"); + for (var myindex =0; myindex