From: Jan Schneider Date: Thu, 24 Jun 2010 14:54:57 +0000 (+0200) Subject: Hot fixes to make this work with a compressor. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9b8087dc95430062395b40e3a3eb2381e825442c;p=horde.git Hot fixes to make this work with a compressor. --- diff --git a/kronolith/templates/javascript/goto.js b/kronolith/templates/javascript/goto.js index ea4626ca5..0c78b041d 100644 --- a/kronolith/templates/javascript/goto.js +++ b/kronolith/templates/javascript/goto.js @@ -11,10 +11,8 @@ function weekOfYear(d) } var D3 = Date.UTC(year, d.getMonth(), d.getDate()) + ms3d; var wk = Math.floor(D3 / ms7d); - with (new Date(wk * ms7d)) { - var yy = getUTCFullYear(); - } - return 1 + wk - Math.floor((Date.UTC(yy, 0, 4) + ms3d) / ms7d) + var yy = new Date(wk * ms7d).getUTCFullYear(); + return 1 + wk - Math.floor((Date.UTC(yy, 0, 4) + ms3d) / ms7d); } function formatDate(year, month, day) @@ -104,7 +102,7 @@ function openKGoto(d, event) Element.hide('kgoto_iefix'); } return false; - } + }; link.appendChild(document.createTextNode('x')); cell.appendChild(link); row.appendChild(cell); @@ -120,7 +118,7 @@ function openKGoto(d, event) newDate = new Date(currentYear - 1, currentDate.getMonth(), 1); openKGoto(newDate); return false; - } + }; cell.appendChild(link); row.appendChild(cell); @@ -149,7 +147,7 @@ function openKGoto(d, event) newDate = new Date(currentYear + 1, currentDate.getMonth(), 1); openKGoto(newDate); return false; - } + }; cell.appendChild(link); row.appendChild(cell); thead.appendChild(row); @@ -170,7 +168,7 @@ function openKGoto(d, event) newDate = new Date(newYear, newMonth, currentDate.getDate()); openKGoto(newDate); return false; - } + }; cell.appendChild(link); row.appendChild(cell); @@ -199,7 +197,7 @@ function openKGoto(d, event) newDate = new Date(currentYear, currentDate.getMonth() + 1, 1); openKGoto(newDate); return false; - } + }; cell.appendChild(link); row.appendChild(cell); thead.appendChild(row);