Bugzilla – Attachment 3275 Details for
Bug 5546
Ability to hide MARC documentation links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Cleanup, simplify, by Owen Leonard
0002-Bug-5546-Follow-up-fixes.patch (text/plain), 2.96 KB, created by
Tomás Cohen Arazi (tcohen)
on 2011-03-09 18:37:18 UTC
(
hide
)
Description:
Cleanup, simplify, by Owen Leonard
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2011-03-09 18:37:18 UTC
Size:
2.96 KB
patch
obsolete
>From 2a12e1b3a59cf64a152d6eba332333c383fa96bd Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 9 Mar 2011 14:55:21 -0300 >Subject: [PATCH 2/2] [Bug 5546] Follow-up / fixes >Content-Type: text/plain; charset="utf-8" > >Suggested by Owen. >--- > .../prog/en/modules/cataloguing/addbiblio.tmpl | 40 +++++-------------- > 1 files 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 8692faa..a0dd3a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >@@ -113,44 +113,18 @@ 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_<!-- TMPL_VAR NAME="borrowernumber" -->",'false', { path: "/", expires: 365 }); > } > > function showMARCdocLinks() { >- unloadCSS("marcDocsCSS"); >+ $(".marcdocs").show(); > $.cookie("marcdocs_<!-- TMPL_VAR NAME="borrowernumber" -->",'true', { path: "/", expires: 365 }); > } > >-function toggleMARCDocs(checked) { >- if (checked) { >- showMARCdocLinks(); >- } else { >- hideMARCdocLinks(); >- } >-} >- > /** > * check if mandatory subfields are written > */ >@@ -691,7 +665,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > > > <h1><!-- TMPL_IF NAME="biblionumber" -->Editing <em><!-- TMPL_VAR NAME="title" escape="html" --></em> (Record Number <!-- TMPL_VAR name="biblionumber" -->)</h1><!-- TMPL_ELSE -->Add MARC Record</h1><!-- /TMPL_IF --> >-<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" onclick="toggleMARCDocs(this.checked)"/> Show MARC tag documentation links<br/></div> >+<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div> > > <!-- TMPL_UNLESS name="number" --> > <!-- show duplicate warning on tab 0 only --> >@@ -736,6 +710,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){ >-- >1.7.1 >
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 5546
:
2911
|
2922
|
3230
| 3275 |
3623