feature: Removed unimplemented CSS rules from config, but added ID for buttons to allow for easy theming (#255)
This commit is contained in:
parent
19b4340e18
commit
709223bd46
|
|
@ -8,7 +8,6 @@ type Action struct {
|
||||||
Icon string
|
Icon string
|
||||||
Shell string
|
Shell string
|
||||||
ShellAfterCompleted string
|
ShellAfterCompleted string
|
||||||
CSS map[string]string `mapstructure:"omitempty"`
|
|
||||||
Timeout int
|
Timeout int
|
||||||
Acls []string
|
Acls []string
|
||||||
Entity string
|
Entity string
|
||||||
|
|
@ -48,7 +47,6 @@ type EntityFile struct {
|
||||||
File string
|
File string
|
||||||
Name string
|
Name string
|
||||||
Icon string
|
Icon string
|
||||||
CSS map[string]string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PermissionsList defines what users can do with an action.
|
// PermissionsList defines what users can do with an action.
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@ class ActionButton extends ExecutionFeedbackButton {
|
||||||
|
|
||||||
// DOM Attributes
|
// DOM Attributes
|
||||||
this.setAttribute('role', 'none')
|
this.setAttribute('role', 'none')
|
||||||
|
this.setAttribute('id', 'actionButton-' + this.actionId)
|
||||||
|
|
||||||
|
this.btn.setAttribute('id', 'actionButtonInner-' + this.actionId)
|
||||||
this.btn.title = json.title
|
this.btn.title = json.title
|
||||||
this.btn.onclick = () => {
|
this.btn.onclick = () => {
|
||||||
if (json.arguments.length > 0) {
|
if (json.arguments.length > 0) {
|
||||||
|
|
@ -56,8 +59,6 @@ class ActionButton extends ExecutionFeedbackButton {
|
||||||
|
|
||||||
this.domTitle.innerText = this.btn.title
|
this.domTitle.innerText = this.btn.title
|
||||||
this.domIcon.innerHTML = this.unicodeIcon
|
this.domIcon.innerHTML = this.unicodeIcon
|
||||||
|
|
||||||
this.setAttribute('id', 'actionButton-' + this.actionId)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFromJson (json) {
|
updateFromJson (json) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue