More minor style changes, and markup fix for Bug 1321.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / authorities-toolbar.inc
index 03d0d37..0a101ae 100644 (file)
@@ -1,6 +1,36 @@
 <div id="toolbar">
+<script type="text/javascript">
+       //<![CDATA[
 
-  <form name="f2" method="post" action="authorities.pl">
+       // prepare DOM for YUI Toolbar
+
+        $(document).ready(function() {
+           $("#newmenuc").empty();
+           yuiToolbar();
+        });
+
+       // YUI Toolbar Functions
+
+       function yuiToolbar() {   
+       
+               var newmenu = [
+                       <!-- TMPL_LOOP name="authtypesloop" -->{ text: "New <!-- TMPL_VAR name="authtypetext" -->", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=<!-- TMPL_VAR name="value" -->"},
+<!-- /TMPL_LOOP -->
+               ]
+
+           new YAHOO.widget.Button({
+               type: "menu",
+               label: "New Authority",
+               name: "newmenubutton",
+               menu: newmenu,
+               container: "newmenuc"
+           });  
+       }
+
+       //]]>
+       </script>
+       
+  <span id="newmenuc"><form name="f2" method="post" action="authorities.pl">
        <label for="add_authtypecode">New: </label>
         <select id="add_authtypecode" name="authtypecode">
 <!-- TMPL_LOOP name="authtypesloop" -->
@@ -12,5 +42,5 @@
 <!-- /TMPL_LOOP -->
         </select>
       <input type="submit" value="Add" class="button" />
-  </form>
+  </form></span>
 </div>
\ No newline at end of file