From 912f0cee12b916eff53b4c3a2a12e2d26ea1a3ad Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 Feb 2023 09:56:03 +0100 Subject: [PATCH] Bug 32935: (bug 13614 follow-up) Remove unused basketgroup.js Bug 13614 removed it. On bug 31056 we noticed that one function was still needed but we copied it in the corresponding .tt Now this JS file is no longer used and should be removed from the codebase Test plan: git grep basketgroup.js must not return anything --- .../intranet-tmpl/prog/js/basketgroup.js | 328 ------------------ 1 file changed, 328 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/basketgroup.js diff --git a/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js b/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js deleted file mode 100644 index 0d8a525a464..00000000000 --- a/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js +++ /dev/null @@ -1,328 +0,0 @@ -// Functions for drag-and-drop functionality - -var Dom = YAHOO.util.Dom; -var Event = YAHOO.util.Event; -var DDM = YAHOO.util.DragDropMgr; - -DDApp = { - init: function() { - var uls = document.getElementsByTagName('ul'); - var i,j; - var ddtarget; - for (i=0; i this.lastY) { - this.goingUp = false; - } - this.lastY = y; - }, - - onDragOver: function(e, id) { - - var srcEl = this.getEl(); - var destEl = Dom.get(id); - - // We are only concerned with list items, we ignore the dragover - // notifications for the list. - if (destEl.nodeName.toLowerCase() == "li") { - var orig_p = srcEl.parentNode; - var p = destEl.parentNode; - - if (this.goingUp) { - p.insertBefore(srcEl, destEl); // insert above - } else { - p.insertBefore(srcEl, destEl.nextSibling); // insert below - } - - DDM.refreshCache(); - } - } -}); - -//this traps enters in input fields -function enterpressed(event){ - var keycode; - if (window.event) keycode = window.event.keyCode; - else if (event) keycode = event.which; - else return false; - - if (keycode == 13) - { - return true; - } - else return false; -} - - -//Closes a basketgroup -function closebasketgroup(bgid) { - var answer=confirm(MSG_CONFIRM_CLOSE_BASKETGROUP); - if(! answer){ - return; - } - ulid = 'bg-'+bgid; - var i = 0; - tagname='basketgroup-'+bgid+'-closed'; - var ddtarget; - var closeinput = document.getElementById(tagname); - closeinput.value = 1; - var changed = document.getElementById("basketgroup-"+bgid+"-changed"); - changed.value=1; - - var div = document.getElementById(tagname).parentNode; - var stufftoremove = div.getElementsByTagName('p')[0]; - var ul = document.getElementById(ulid); - var lis = ul.getElementsByTagName('li'); - if (lis.length == 0 ) { - alert(MSG_CLOSE_EMPTY_BASKET); - return; - } - var cantprint = document.createElement('p'); - - div.className = "closed"; - ul.className="closed"; - - for(i=0; i