Bug 5741 - Extra comma causes JavaScript error in Internet Explorer
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / includes / authorities-toolbar.inc
index b67117c..425519e 100644 (file)
@@ -6,6 +6,7 @@
 
         $(document).ready(function() {
            $("#newmenuc").empty();
+           $("#delAuthc").empty();
            yuiToolbar();
         });
 
        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 name="authtypesloop" -->{ text: "<!-- 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",
+               label: _("New Authority"),
                name: "newmenubutton",
                menu: newmenu,
                container: "newmenuc"
            });  
+               
+               var editButton = new YAHOO.widget.Button("editAuth");
+               
+               var delAuthButton = new YAHOO.widget.Button({
+          id: "delAuth", 
+          type: "button", 
+          label: _("Delete"), 
+          container: "delAuthc",
+                 onclick: {fn: confirm_deletion }
+      });
        }
 
        //]]>
        </script>
   <form name="f2" method="post" action="authorities.pl">       
+  
+<!-- TMPL_IF NAME="authid" -->  <a id="editAuth" href="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->">Edit</a>
+    
+    <!-- TMPL_UNLESS name="count" -->
+    <span id="delAuthc"><a id="delAuth" href="javascript:confirm_deletion()">Delete</a></span>
+    <!-- /TMPL_UNLESS --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+  
   <span id="newmenuc">
        <label for="add_authtypecode">New: </label>
         <select id="add_authtypecode" name="authtypecode">