Commit 4e95b8de authored by Bas Lijnse's avatar Bas Lijnse

Fixed clientside handling of changes in css class attribute

parent d47b4d7a
Pipeline #35266 passed with stage
in 7 minutes and 1 second
......@@ -231,7 +231,7 @@ itasks.Component = {
me.beforeChildRemove(idx,child);
if(me.initialized && child.domEl) {
me.containerEl.removeChild(me.containerEl.childNodes[idx]);
me.containerEl.removeChild(child.domEl);
}
me.children.splice(idx,1);
me.afterChildRemove(idx);
......@@ -280,13 +280,12 @@ itasks.Component = {
var me = this;
me.attributes[name] = value;
me.onAttributeChange(name,value);
me._onAttributeChange(name,value);
},
onAttributeChange: function(name,value) {
_onAttributeChange: function(name,value) {
var me = this;
if(name == 'class') {
me.domEl.className = '';
me.domEl.className = me.cssPrefix + me.cssCls;
if(Array.isArray(value)) {
value.forEach(function(cls) {
me.domEl.classList.add(cls);
......@@ -294,8 +293,11 @@ itasks.Component = {
} else {
me.domEl.classList.add(value);
}
} else {
me.onAttributeChange(name,value);
}
},
onAttributeChange: function(name,value) {},
onUIChange: function(change) {
var me = this;
me.world=me.world.then (function(){
......
......@@ -248,7 +248,7 @@ workOnChosenTask choiceOption options =
( layoutSubUIs
( SelectAND
(SelectByDepth 1)
(SelectByAttribute "visible" $ \val -> val =: (JSONBool True))
(SelectByAttribute "visible" $ \val -> val =: (JSONBool False))
)
(addCSSClass "itasks-hidden")
)
......
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