Bug 9648 - Replace YUI buttons on authorized values administration page with Bootstrap
authorOwen Leonard <oleonard@myacpl.org>
Sat, 16 Feb 2013 21:07:20 +0000 (16:07 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 18 Feb 2013 12:55:33 +0000 (07:55 -0500)
This patch converts the toolbar on the authorised values administration
page to to Bootstrap, replacing YUI button code with Bootstrap markup.

To test, view the authorised values administration page and confirm that
the "New authorized value..." and "New cateogry" buttons look correct
and works correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Both buttons works and look correctly. No errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, no problems found.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt

index e464617..8b6aeb2 100644 (file)
      });
 //]]>
 </script>
+[% IF ( else ) %]
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function() {
+    $('#category').find("input:submit").hide();
+    $('#searchfield').change(function() {
+        $('#category').submit();
+    });
+});
+//]]>
+</script>
+[% END %]
+
 <style type="text/css">
        fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
     fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
 
 [% IF ( else ) %]
 
-<div id="toolbar">
-       <script type="text/javascript">
-       //<![CDATA[
-
-       // prepare DOM for YUI Toolbar
-
-        $(document).ready(function() {
-           yuiToolbar();
-               $('#category').find("input:submit").hide();
-               $('#searchfield').change(function() {
-               $('#category').submit();
-               });
-        });
-
-       // YUI Toolbar Functions
-
-       function yuiToolbar() {
-           new YAHOO.widget.Button("addauth");
-           new YAHOO.widget.Button("addcat");
-       }
-
-       //]]>
-       </script>
-       <ul class="toolbar">
-     <li><a id="addauth" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category %]">New authorized value for [% category %]</a></li>
-    <li><a id="addcat" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form">New category</a></li>
-</ul></div>
+<div id="toolbar" class="btn-toolbar">
+    <a id="addauth" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category %]">New authorized value for [% category %]</a>
+    <a id="addcat" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form">New category</a>
+</div>
 
 <h1>Authorized values</h1>
 <div class="note"><strong>NOTE:</strong> If you change an authorized value, existing records using it won't be updated.</div>