Author: abelevich
Date: 2008-09-26 11:02:22 -0400 (Fri, 26 Sep 2008)
New Revision: 10579
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
add mergeStyles function
https://jira.jboss.org/jira/browse/RF-4280
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
---
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-09-26
14:33:23 UTC (rev 10578)
+++
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-09-26
15:02:22 UTC (rev 10579)
@@ -2,6 +2,18 @@
window.Richfaces = {};
}
+Richfaces.mergeStyles = function(userStyles,commonStyles) {
+ var i;
+ for(i in userStyles) {
+ if (typeof userStyles[i] == "object") {
+ this.mergeStyles(userStyles[i],commonStyles[i]);
+ } else {
+ commonStyles[i] += " " + userStyles[i];
+ }
+ }
+ return commonStyles;
+};
+
Richfaces.getComputedStyle = function(eltId, propertyName) {
var elt = $(eltId);