- Fix default button image was not working

- Fix disabled="false" in template sort-of disabled buttons instead of them working normally

This fixes CRM view close button
This commit is contained in:
nathan 2021-09-16 13:35:41 -06:00
parent 5e2995234b
commit abd2e3804a
2 changed files with 7 additions and 2 deletions

View File

@ -178,13 +178,13 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton))
let image = this._get_default_image(this._widget_id);
if(image != this._image)
{
this.image = this._get_default_image(this._widget_id);
this.image = image;
}
}
let default_class = this._get_default_class(this._widget_id);
if(default_class && !this.classList.contains(default_class))
{
this.classList.add(this._get_default_class(this._widget_id));
this.classList.add(default_class);
}
}
}

View File

@ -57,6 +57,11 @@ const Et2InputWidgetMixin = (superclass) =>
attribute: 'readonly',
reflect: true,
},
// readonly is what is in the templates
// I put this in here so loadWebComponent finds it when it tries to set it from the template
readonly: {
type: Boolean
}
};
}