Bug 19758: Move template JavaScript to the footer: Serials, part 1
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / result.tt
index 2c5a14f..1c0c97a 100644 (file)
@@ -1,24 +1,9 @@
+[% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; Search results</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-    $(document).ready(function(){
-        $(".select_title").on("click",function(e){
-            e.preventDefault();
-            var biblionumber = $(this).data("biblionumber");
-            GetIt( biblionumber, $(this) );
-        });
-    });
-    function GetIt(bibno,title) {
-        title = title.parents('tr').find('.title').text();
-        opener.document.f.biblionumber.value = bibno;
-        opener.document.f.title.value = title;
-        window.close();
-    }
-//]]>
-</script>
 </head>
+
 <body id="ser_result" class="ser">
 
 <div id="doc" class="yui-t7">
 
 </div>
 
+[% MACRO jsinclude BLOCK %]
+    <script type="text/javascript">
+        $(document).ready(function(){
+            $(".select_title").on("click",function(e){
+                e.preventDefault();
+                var biblionumber = $(this).data("biblionumber");
+                GetIt( biblionumber, $(this) );
+            });
+        });
+        function GetIt(bibno,title) {
+            title = title.parents('tr').find('.title').text();
+            opener.document.f.biblionumber.value = bibno;
+            opener.document.f.title.value = title;
+            window.close();
+        }
+    </script>
+[% END %]
+
 [% INCLUDE 'intranet-bottom.inc' %]