--- a/web/data/cubicweb.ajax.js Wed Jul 08 12:51:04 2009 +0200
+++ b/web/data/cubicweb.ajax.js Wed Jul 08 13:58:37 2009 +0200
@@ -59,8 +59,8 @@
if (typeof buildWidgets != 'undefined') {
buildWidgets(node);
}
- if (typeof roundedCornersOnLoad != 'undefined') {
- roundedCornersOnLoad();
+ if (typeof roundedCorners != 'undefined') {
+ roundedCorners(node);
}
loadDynamicFragments(node);
jQuery(CubicWeb).trigger('ajax-loaded');
@@ -231,6 +231,7 @@
// make sure the component is visible
removeElementClass(node, "hidden");
swapDOM(node, domnode);
+ postAjaxLoad(domnode);
}
});
d.addCallback(resetCursor);
--- a/web/data/cubicweb.htmlhelpers.js Wed Jul 08 12:51:04 2009 +0200
+++ b/web/data/cubicweb.htmlhelpers.js Wed Jul 08 13:58:37 2009 +0200
@@ -1,4 +1,5 @@
CubicWeb.require('python.js');
+CubicWeb.require('jquery.corner.js');
/* returns the document's baseURI. (baseuri() uses document.baseURI if
* available and inspects the <base> tag manually otherwise.)
@@ -253,13 +254,25 @@
}
//============= page loading events ==========================================//
+
+CubicWeb.rounded = [
+ ['div.sideBoxBody', 'bottom 6px'],
+ ['div.boxTitle, div.boxPrefTitle, div.sideBoxTitle, th.month', 'top 6px'],
+ ];
+
function roundedCornersOnLoad() {
- jQuery('div.sideBoxBody').corner('bottom 6px');
- jQuery('div.boxTitle, div.boxPrefTitle, div.sideBoxTitle, th.month').corner('top 6px');
+ roundedCorners();
+}
+
+function roundedCorners(node) {
+ node == node || document.body;
+ node = jQuery(node);
+ for(var r=0; r<CubicWeb.rounded.length;r++){
+ node.find(CubicWeb.rounded[r][0]).corner(CubicWeb.rounded[r][1]);
+ }
}
jQuery(document).ready(roundedCornersOnLoad);
-
CubicWeb.provide('htmlhelpers.js');