Bug 15940 - Remove unused JavaScript from authorities MARC subfield structure
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Feb 2016 18:39:16 +0000 (13:39 -0500)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 3 Mar 2016 22:29:22 +0000 (22:29 +0000)
The authorities MARC subfield structure template contains some unused
JavaScript, "function displayMoreConstraint()" This patch removes it.

To test, apply the patch and go to Administration -> Authority types ->
MARC structure -> Subfields -> Edit subfields and confirm that there are
no JavaScript errors and tab switching works correctly.

A search of the source code should show no instances of
"displayMoreConstraint."

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  No regression, no JS warning.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt

index 4b7e873..0d5bff3 100644 (file)
@@ -3,22 +3,9 @@
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript">
 //<![CDATA[
-
      $(document).ready(function() {
         $('#subfieldtabs').tabs();
      });
-
-function displayMoreConstraint(numlayer){
-    var thisdiv = document.getElementById(numlayer);
-    if(thisdiv.getAttribute("class") == "content_hidden"){
-        thisdiv.removeAttribute('class');
-        thisdiv.setAttribute("class","content_visible");
-    } else {
-        thisdiv.removeAttribute('class');
-        thisdiv.setAttribute("class","content_hidden");
-    }
-}
-
 //]]>
 </script>
 </head>