--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ not defined - +if( typeof(YAHOO) === "object"){ (function() { var Dom = YAHOO.util.Dom; @@ -234,7 +234,7 @@ YAHOO.extend(DDList, YAHOO.util.DDProxy, { } }); })(); - +} --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 280 +++++++++++++++--------------- 1 file changed, 140 insertions(+), 140 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -60,181 +60,181 @@ function isNum(v,maybenull) { //======================================================================= // Functions for drag-and-drop functionality +if( typeof(YAHOO) === "object"){ + (function() { -(function() { - -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; - }, + if (y < this.lastY) { + this.goingUp = true; + } else if (y > this.lastY) { + this.goingUp = false; + } + this.lastY = y; + }, - onDragOver: function(e, id) { + onDragOver: function(e, id) { - var srcEl = this.getEl(); - var destEl = Dom.get(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; + // 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 - } + if (this.goingUp) { + p.insertBefore(srcEl, destEl); // insert above + } else { + p.insertBefore(srcEl, destEl.nextSibling); // insert below + } - DDM.refreshCache(); + DDM.refreshCache(); + } } - } -}); -})(); - + }); + })(); +} --