From f2c49c1ed3cf85dcc9340593c1625eafb2a59408 Mon Sep 17 00:00:00 2001 From: kados Date: Fri, 9 Mar 2007 21:39:21 +0000 Subject: [PATCH] removing npl template files from head --- koha-tmpl/opac-tmpl/npl/en/includes/basket.js | 365 ------- .../opac-tmpl/npl/en/includes/favicon.ico | Bin 1406 -> 0 bytes .../opac-tmpl/npl/en/includes/marc-editor.css | 91 -- koha-tmpl/opac-tmpl/npl/en/includes/opac.css | 942 ------------------ koha-tmpl/opac-tmpl/npl/en/includes/print.css | 211 ---- koha-tmpl/opac-tmpl/npl/en/includes/script.js | 66 -- 6 files changed, 1675 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/basket.js delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/favicon.ico delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/marc-editor.css delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/opac.css delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/print.css delete mode 100644 koha-tmpl/opac-tmpl/npl/en/includes/script.js diff --git a/koha-tmpl/opac-tmpl/npl/en/includes/basket.js b/koha-tmpl/opac-tmpl/npl/en/includes/basket.js deleted file mode 100644 index 4126ddd205..0000000000 --- a/koha-tmpl/opac-tmpl/npl/en/includes/basket.js +++ /dev/null @@ -1,365 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// BASIC FUNCTIONS FOR COOKIE MANGEMENT // -////////////////////////////////////////////////////////////////////////////// - -var CGIBIN = "/cgi-bin/koha/"; - - -var nameCookie = "bib_list"; -var valCookie = readCookie(nameCookie); - -if(valCookie){ - var arrayRecords = valCookie.split("/"); - if(arrayRecords.length > 0){ - var basketcount = " ("+(arrayRecords.length-1)+")"; - } else { - var basketcount = ""; - } -} else { - var basketcount = ""; -} - -function writeCookie(name, val, wd) { - if (wd) { - parent.opener.document.cookie = name + "=" + val; - } - else { - parent.document.cookie = name + "=" + val; - } -} - -function readCookieValue (str, val_beg) { - var val_end = str.indexOf(";", val_end); - if (val_end == -1) - val_end = str.length; - return str.substring(val_beg, val_end); -} - -function readCookie(name, wd) { - var str_name = name + "="; - var str_len = str_name.length; - var str_cookie = ""; - if (wd) { - str_cookie = parent.opener.document.cookie; - } - else { - str_cookie = parent.document.cookie; - } - var coo_len = str_cookie.length; - var i = 0; - - while (i < coo_len) { - var j = i + str_len; - if (str_cookie.substring(i, j) == str_name) - return readCookieValue(str_cookie, j); - i = str_cookie.indexOf(" ", i) + 1; - if (i == 0) - break; - } - - return null; -} - -function delCookie(name) { - var exp = new Date(); - exp.setTime(exp.getTime()-1); - parent.opener.document.cookie = name + "=null; expires=" + exp.toGMTString(); -} - - -/////////////////////////////////////////////////////////////////// -// SPECIFIC FUNCTIONS USING COOKIES // -/////////////////////////////////////////////////////////////////// - -function openBasket() { - var strCookie = ""; - - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie); - if (valCookie) { - strCookie = nameCookie + "=" + valCookie; - } - - if (strCookie) { - var iW = 620; - var iH = 450; - - var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,height="+iH+",width="+iW; - var loc = CGIBIN + "opac-basket.pl?" + strCookie; - var basket = open(loc, "basket", optWin); - } - else { - alert(MSG_BASKET_EMPTY); - } -} - - -function addRecord(val, selection) { - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie); - var write = 0; - - if ( ! valCookie ) { // empty basket - valCookie = val + '/'; - write = 1; - updateBasket(1,document); - } - else { - // is this record already in the basket ? - var found = false; - var arrayRecords = valCookie.split("/"); - - for (var i = 0; i < valCookie.length - 1; i++) { - if (val == arrayRecords[i]) { - found = true; - break; - } - } - - if ( found ) { - if (selection) { - return 0; - } - alert(MSG_RECORD_IN_BASKET); - } - else { - valCookie += val + '/'; - write = 1; - updateBasket(arrayRecords.length,document); - } - } - - if (write) { - writeCookie(nameCookie, valCookie); - if (selection) { // when adding a selection of records - return 1; - } - alert(MSG_RECORD_ADDED); - } -} - - -function addMultiple(){ - var c_value = ""; - if(document.myform.bibid.length > 0) { - for (var i=0; i < document.myform.bibid.length; i++) { - if (document.myform.bibid[i].checked) { - c_value = c_value + document.myform.bibid[i].value + "/"; - } - } - addSelRecords(c_value); - } else { - c_value = c_value + document.myform.bibid.value + "/"; - addSelRecords(c_value); - } -} - - -function addSelRecords(valSel) { // function for adding a selection of biblios to the basket - // from the results list - var arrayRecords = valSel.split("/"); - var i = 0; - var nbAdd = 0; - for (i=0;i nbAdd) { - msg = nbAdd+" "+MSG_NRECORDS_ADDED+", "+(i-nbAdd)+" "+MSG_NRECORDS_IN_BASKET; - } - else { - msg = nbAdd+" "+MSG_NRECORDS_ADDED; - } - } - else { - if (i < 1) { - msg = MSG_NO_RECORD_SELECTED; - } - else { - msg = MSG_NO_RECORD_ADDED+" ("+MSG_NRECORDS_IN_BASKET+") !"; - } - } - alert(msg); -} - - -function selRecord(num, status) { - var str = document.myform.records.value - if (status){ - str += num+"/"; - } - else { - str = delRecord(num, str); - } - - document.myform.records.value = str; -} - - -function delSelRecords() { - var recordsSel = 0; - var end = 0; - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie, 1); - - if (valCookie) { - var str = document.myform.records.value; - if (str.length > 0){ - recordsSel = 1; - var str2 = valCookie; - while (!end){ - s = str.indexOf("/"); - if (s>0){ - num = str.substring(0, s) - str = delRecord(num,str); - str2 = delRecord(num,str2); - } else { - end = 1; - } - } - - if (str2.length == 0) { // equivalent to emptying the basket - var rep = false; - rep = confirm(MSG_CONFIRM_DEL_BASKET); - if (rep) { - delCookie(nameCookie); - document.location = "about:blank"; - updateBasket(0,top.opener.document); - window.close(); - } else { - return; - } - } else { - writeCookie(nameCookie, str2, 1); - } - } - } - - if (recordsSel) { - var strCookie = ""; - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie, 1); - strCookie = nameCookie + "=" + valCookie; - var arrayRecords = valCookie.split("/"); - updateBasket(arrayRecords.length-1,top.opener.document); - document.location = CGIBIN + "opac-basket.pl?" + strCookie; - } - else { - alert(MSG_NO_RECORD_SELECTED); - } -} - - -function delRecord (n, s) { - var re = /\d/; - var aux = s; - var found = 0; - var pos = -1; - - while (!found) { - pos = aux.indexOf(n, pos+1); - var charAfter = aux.charAt(pos+n.length); // character right after the researched string - if (charAfter.match(re)) { // record number inside another one - continue; - } - else { // good record number - aux = s.substring(0, pos)+ s.substring(pos+n.length+1, s.length); - s = aux; - found = 1; - } - } - - return s; -} - - -function delBasket() { - var nameCookie = "bib_list"; - - var rep = false; - rep = confirm(MSG_CONFIRM_DEL_BASKET); - if (rep) { - delCookie(nameCookie); - document.location = "about:blank"; - updateBasket(0,top.opener.document); - window.close(); - } -} - - -function quit() { - if (document.myform.records.value) { - var rep = false; - rep = confirm(MSG_CONFIRM_DEL_RECORDS); - if (rep) { - delSelRecords(); - } - } - updateBasket(arrayRecords.length-1,top.opener.document); - window.close(); -} - -function sendBasket() { - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie); - var strCookie = nameCookie + "=" + valCookie; - - var loc = CGIBIN + "opac-sendbasket.pl?" + strCookie; - - var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=400,top=50,left=100"; - var win_form = open(loc,"win_form",optWin); -} - -function printBasket() { - var loc = document.location + "&print=1"; - document.location = loc; -} - -function showMore() { - var strCookie = ""; - - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie); - if (valCookie) { - strCookie = nameCookie + "=" + valCookie; - } - var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=1"; - document.location = loc; -} - -function showLess() { - var strCookie = ""; - - var nameCookie = "bib_list"; - var valCookie = readCookie(nameCookie); - if (valCookie) { - strCookie = nameCookie + "=" + valCookie; - } - var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=0"; - document.location = loc; -} - -function updateBasket(updated_value,target) { - if(typeof document.getElementById != "undefined") { - target.getElementById('basket').innerHTML = " ("+updated_value+")"; - } else if (typeof document.layers != "undefined") { - target.layers['basket'].open(); - target.layers['basket'].write(" ("+updated_value+")"); - target.layers['basket'].close(); - } else if(typeof document.all != "undefined" && typeof -document.getElementById == "undefined") { - target.all['basket'].innerHTML = " ("+updated_value+")"; - } -} - -function openBiblio(biblionumber) { - openerURL="opac-detail.pl?bib="+biblionumber; - opener.document.location = openerURL; -} \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/npl/en/includes/favicon.ico b/koha-tmpl/opac-tmpl/npl/en/includes/favicon.ico deleted file mode 100644 index 586bd559d9cd6d67a69a1e0f5b96cc7a1b95ca46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmeH`J&#gB6o#Mcdf62fk=5&>a$VQ2tDr8dvVLy@KZ1gW4ht&6KOlqvJ&84;0ct8b zLT5stAc2AcC`f4dNFYGM^)3Qon{DjOzLPUK&zUos%sUwnv|%)&&3pV5K>`#lv=WC} zoYybY$?souyIp)fAHiUd;c&=cFu-cH5{X2Z&*v-_3!>2|Hk*xHF2`&(V=|dAolXgd z!?@jUMxzm}R*O_BMKYPB)9GNh+i5nN`2BuFQN&;{P%f9z>2zc=8H&Xsi9~{YK2N1m zp-?Cg2n1-i+lDddNRoss%cRq3JRT46c$|8@j??M9%$BRQD+m5-2UJx(|1%e*6}Kb^8hrb% z*Z(*;+t<=1?>J9SKYjl4bw{_2Zgt^4oXsjT)``Un#HOSeN*Bzy3KdUT(2! zk)IqsJ$kn8S05Zm=7*0SZ`gR(w14luv|;_tTenrioeitH-Mt$ct 12) - { alert("Your card number is invalid, please verify it."); - bOK = false; - } - else - { if (pos > 2) - car = patron_id.substring(i,i+1); - else - car = ""; - new_patron_id = new_patron_id + car; - } - } // end for i - while (bOK && (new_patron_id.length < 7)) - new_patron_id = "0" + new_patron_id; - if (new_patron_id.length > 7) - { alert("Your library card number is too long."); - bOK = false; - } - if (bOK) - document.forms['auth'].userid.value = new_patron_id; - else - { - document.forms['auth'].userid.value = ""; - document.forms['auth'].userid.focus(); - } - } -} - -function CheckAll() -{ -count = document.mainform.elements.length; - for (i=0; i < count; i++) - { - if(document.mainform.elements[i].checked == 1){ - document.mainform.elements[i].checked = 0; - } else { - document.mainform.elements[i].checked = 1; - } - } -} - -function confirmDelete(message) { - var agree = confirm(message); - if(agree) { - return true; - } else { - return false; - } -} - -function Dopop(link) { - newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); - } \ No newline at end of file -- 2.39.2