for some reason, use of an anonymous function makes things more readable stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 09 Jul 2009 14:39:56 +0200
branchstable
changeset 2355 359903ef980a
parent 2348 acf4b6a59558
child 2356 ef9e30485ee7
for some reason, use of an anonymous function makes things more readable
web/data/cubicweb.htmlhelpers.js
--- a/web/data/cubicweb.htmlhelpers.js	Thu Jul 09 13:04:28 2009 +0200
+++ b/web/data/cubicweb.htmlhelpers.js	Thu Jul 09 14:39:56 2009 +0200
@@ -260,19 +260,16 @@
 		    ['div.boxTitle, div.boxPrefTitle, div.sideBoxTitle, th.month', 'top 6px'],
 		    ];
 
-function roundedCornersOnLoad() {
-    roundedCorners();
-}
+
 
 function roundedCorners(node) {
-    node == node || document.body;
     node = jQuery(node);
-    for(var r=0; r<CubicWeb.rounded.length;r++){
+    for(var r=0; r < CubicWeb.rounded.length; r++) {
        node.find(CubicWeb.rounded[r][0]).corner(CubicWeb.rounded[r][1]);
     }
 }
 
-jQuery(document).ready(roundedCornersOnLoad);
+jQuery(document).ready(function () {roundedCorners(this.body)});
 
 CubicWeb.provide('htmlhelpers.js');