From b8d3cfa91b78ef44347fd0a6163205b552588a93 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 5 Apr 2011 10:22:23 +0200 Subject: [PATCH] Bug 5546: Follow-up / fixes Suggested by Owen. Signed-off-by: fdurand Signed-off-by: Chris Cormack --- .../en/modules/cataloguing/addbiblio.tmpl | 40 +++++-------------- 1 file changed, 11 insertions(+), 29 deletions(-) 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 b39212c621..a1f130292a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -112,45 +112,19 @@ function _UNIMARCFieldDoc(field, blocknumber) { } } -/* - * Functions to load/unload css from the head element - */ -function loadCSS(id,cssDef) { - - var cssElem=document.createElement("style"); - cssElem.setAttribute("type", "text/css"); - cssElem.setAttribute("id", id); - cssElem.innerHTML = cssDef; - - document.getElementsByTagName("head")[0].appendChild(cssElem); -} - -function unloadCSS(id) { - var elem = document.getElementById(id); - elem.parentNode.removeChild(elem); -} - /* * Functions to hide/show marc docs links */ function hideMARCdocLinks() { - loadCSS("marcDocsCSS",".marcdocs{display: none;}"); + $(".marcdocs").hide(); $.cookie("marcdocs_",'false', { path: "/", expires: 365 }); } function showMARCdocLinks() { - unloadCSS("marcDocsCSS"); + $(".marcdocs").show(); $.cookie("marcdocs_",'true', { path: "/", expires: 365 }); } -function toggleMARCDocs(checked) { - if (checked) { - showMARCdocLinks(); - } else { - hideMARCdocLinks(); - } -} - /** * check if mandatory subfields are written */ @@ -693,7 +667,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?

Editing (Record Number )

Add MARC Record -
Show MARC tag documentation links
+
Show MARC tag documentation links
@@ -738,6 +712,14 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? $("#z3950searchc").empty(); $("#savebutton").empty(); yuiToolbar(); + + $("#marcDocsSelect").click(function(){ + if($(this).attr("checked")){ + showMARCdocLinks(); + } else { + hideMARCdocLinks(); + } + }); }); function redirect(dest){ -- 2.39.5