Bug 11299: (follow-up) Rebase on recent changes
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / addbiblio.tt
index be5bc2b..2b5b8ee 100644 (file)
         }
 [% END %]
 
-function confirmnotdup(redirect){
-    $("#confirm_not_duplicate").attr("value","1");
-    $("#redirect").attr("value",redirect);
-    Check();
-}
-
-function Dopop(link,i) {
-    defaultvalue = document.getElementById(i).value;
-    window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
-}
-
-/**
- * this function open a popup to search on z3950 server.
- */
-function PopupZ3950() {
-    var strQuery = GetZ3950Terms();
-    if(strQuery){
-        window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
-    }
-}
-
 /**
 * this function append button for create new authority if not found
 */
@@ -221,7 +200,7 @@ function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) {
             // Create a new form that will be POSTed in the new window
             var form = $('<form>').attr({
             method: 'post',
-            action: "../authorities/authorities.pl",
+            action: "/cgi-bin/koha/authorities/authorities.pl",
             target: "new_auth_popup"
             });
             //add the authtypecode
@@ -252,7 +231,6 @@ function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) {
                     value: $(this).val()
                 }));
             });
-
             $('body').append(form);
             form.submit();
             form.remove();
@@ -272,7 +250,7 @@ function updateHeadingLinks(links) {
 
     // Delete the old message dialog and create a new one
     $('#autolinker_dialog').remove();
-    var message_dialog = $('<div id="autolinker_dialog" class="dialog"><strong>' + _("Automatic authority link results:") + '</strong><ul></ul></div>');
+    var message_dialog = $('<div id="autolinker_dialog" class="dialog message"><strong>' + _("Automatic authority link results:") + '</strong><ul></ul></div>');
     var message_dialog_ul = message_dialog.find('ul');
 
     $.each(links, function(index, heading) {
@@ -286,7 +264,9 @@ function updateHeadingLinks(links) {
 
         // Find the $9 field to update
         var tag_subfield_line = $('.subfield_line[id^=subfield' + heading.tag + '9]').eq(tag_index);
-        var subfield = tag_subfield_line.children('.input_marceditor').eq(0);
+        if( tag_subfield_line.length < 1 ){ return; }
+
+        var subfield = tag_subfield_line.find('.input_marceditor').eq(0);
 
         // Delete the old status if one exists
         tag_subfield_line.children('.subfield_status').remove();