web/data/cubicweb.htmlhelpers.js
branchstable
changeset 2355 359903ef980a
parent 2338 3f7c7fbae94e
child 2357 e65e352cfde3
equal deleted inserted replaced
2348:acf4b6a59558 2355:359903ef980a
   258 CubicWeb.rounded = [
   258 CubicWeb.rounded = [
   259 		    ['div.sideBoxBody', 'bottom 6px'],
   259 		    ['div.sideBoxBody', 'bottom 6px'],
   260 		    ['div.boxTitle, div.boxPrefTitle, div.sideBoxTitle, th.month', 'top 6px'],
   260 		    ['div.boxTitle, div.boxPrefTitle, div.sideBoxTitle, th.month', 'top 6px'],
   261 		    ];
   261 		    ];
   262 
   262 
   263 function roundedCornersOnLoad() {
   263 
   264     roundedCorners();
       
   265 }
       
   266 
   264 
   267 function roundedCorners(node) {
   265 function roundedCorners(node) {
   268     node == node || document.body;
       
   269     node = jQuery(node);
   266     node = jQuery(node);
   270     for(var r=0; r<CubicWeb.rounded.length;r++){
   267     for(var r=0; r < CubicWeb.rounded.length; r++) {
   271        node.find(CubicWeb.rounded[r][0]).corner(CubicWeb.rounded[r][1]);
   268        node.find(CubicWeb.rounded[r][0]).corner(CubicWeb.rounded[r][1]);
   272     }
   269     }
   273 }
   270 }
   274 
   271 
   275 jQuery(document).ready(roundedCornersOnLoad);
   272 jQuery(document).ready(function () {roundedCorners(this.body)});
   276 
   273 
   277 CubicWeb.provide('htmlhelpers.js');
   274 CubicWeb.provide('htmlhelpers.js');
   278 
   275