Fixing and refining toolbars, including fixes for Bug 1509.
[wip/koha-chris_n.git] / koha-tmpl / intranet-tmpl / prog / en / includes / members-toolbar.inc
1 <div id="toolbar">
2         <script type="text/javascript">
3         //<![CDATA[
4
5         // prepare DOM for YUI Toolbar
6
7          $(document).ready(function() {
8                 $("#addchild").parent().remove();
9                 $("#addprofessional").parent().remove();
10                 $("#addorganisation").parent().remove();
11             $("#newmenuc").empty();
12             yuiToolbar();
13          });
14
15         // YUI Toolbar Functions
16
17         function yuiToolbar() {
18
19                 var newmenu = [
20                         { text: "Adult Patron",  url: "/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A" },
21                         { text: "Child Patron",  url: "/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C" },
22                         { text: "Professional Patron",  url: "/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=P" },
23                         { text: "Organisation",  url: "/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=I" },
24                 ] 
25         
26             new YAHOO.widget.Button({
27                 type: "menu",
28                 label: "New",
29                 name: "newmenubutton",
30                 menu: newmenu,
31                 container: "newmenuc"
32             });
33         
34         }
35
36         //]]>
37         </script>
38         <ul class="toolbar">
39         <li id="newmenuc"><a id="addadult" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult</a></li>
40 <li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child</a></li>
41 <li><a id="addprofessional" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=P">Professional</a></li>
42 <li><a id="addorganisation" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=I">Organisation</a></li>
43 </ul></div>