Commit da9778df authored by Bas Lijnse's avatar Bas Lijnse

Added support for customised css styles specified as UI attribute

parent e3da426a
......@@ -65,7 +65,9 @@ itasks.Component = {
//Style the dom element
me.domEl.classList.add(me.cssPrefix + me.cssCls);
if(me.style) {
me.domEl.style = me.style;
}
//Custom initialization after the dom element has been rendered
me.initDOMEl();
//Size the element
......
......@@ -222,6 +222,7 @@ actionIdAttr :: !String -> UIAttributes
editorIdAttr :: !String -> UIAttributes
taskIdAttr :: !String -> UIAttributes
labelAttr :: !String -> UIAttributes
styleAttr :: !String -> UIAttributes
editAttrs :: !String !String !(Maybe JSONNode) -> UIAttributes
choiceAttrs :: !String !String ![Int] ![JSONNode] -> UIAttributes
......
......@@ -192,6 +192,9 @@ editorIdAttr taskId = 'DM'.fromList [("editorId",JSONString taskId)]
labelAttr :: !String -> UIAttributes
labelAttr taskId = 'DM'.fromList [(LABEL_ATTRIBUTE,JSONString taskId)]
styleAttr :: !String -> UIAttributes
styleAttr style = 'DM'.fromList [("style",JSONString style)]
editAttrs :: !String !String !(Maybe JSONNode) -> UIAttributes
editAttrs taskId editorId mbValue
= 'DM'.fromList [("taskId",JSONString taskId),("editorId",JSONString editorId):maybe [] (\value -> [("value",value)]) mbValue]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment