From c9e288968639b781513506617e5b9fc642526c67 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Sun, 3 Feb 2013 15:06:34 -0500
Subject: [PATCH] Bug 9647 - Replace YUI buttons on Z39.50 servers
 administration page with Bootstrap
Content-Type: text/plain; charset="utf-8"

This patch converts the toolbar on the Z39.50 administration
page to to Bootstrap, replacing YUI button code with Bootstrap markup.

To test, view the Z39.50 administration page and confirm that
the "New Z39.50 server" button looks correct and works correctly.
---
 .../prog/en/modules/admin/z3950servers.tt          |   41 +++++++++-----------
 1 file changed, 19 insertions(+), 22 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
index a2f473d..adf707d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt
@@ -63,7 +63,22 @@
         }
         //]]>
 </script>
-        [% END %]
+[% END %]
+[% IF ( else ) %]
+    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+    <script type="text/javascript">
+    //<![CDATA[
+     $(document).ready(function() {
+        [% IF ( loop ) %]$.tablesorter.defaults.widgets = ['zebra'];
+        $("#serverst").tablesorter({
+            sortList: [[0,0]],
+            headers: { 2: {sorter:false},3: { sorter: false },4: { sorter: false },7: { sorter: false },8: { sorter: false },9: { sorter: false },10: { sorter: false }}
+        });[% END %]
+     });
+    //]]>
+    </script>
+[% END %]
+
 </head>
 <body id="admin_z3950servers" class="admin">
 [% INCLUDE 'header.inc' %]
@@ -259,27 +274,9 @@
 
 [% IF ( else ) %]
 
-<div id="toolbar">
-		<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-	<script type="text/javascript">
-	//<![CDATA[
-	// prepare DOM for YUI Toolbar
-	 $(document).ready(function() {
-	    yuiToolbar();
-		[% IF ( loop ) %]$.tablesorter.defaults.widgets = ['zebra'];
-		$("#serverst").tablesorter({
-			sortList: [[0,0]],
-			headers: { 2: {sorter:false},3: { sorter: false },4: { sorter: false },7: { sorter: false },8: { sorter: false },9: { sorter: false },10: { sorter: false }}
-		});[% END %]
-	 });
-	// YUI Toolbar Functions
-	function yuiToolbar() {
-	    new YAHOO.widget.Button("newserver");
-	}	//]]>
-	</script>
-	<ul class="toolbar">
-    <li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 server</a></li>
-</ul></div>
+<div id="toolbar" class="btn-toolbar">
+    <a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form"><i class="icon-plus"></i> New Z39.50 server</a>
+</div>
 
 <h3>Z39.50 servers administration</h3>
 
-- 
1.7.10.4