modal button icon class
This commit is contained in:
@@ -58,6 +58,7 @@ class ModalView extends View {
|
||||
* @property {string} [className] An additional class name.
|
||||
* @property {string} [title] A title text.
|
||||
* @property {'primary'|'danger'|'success'|'warning'|'text'} [style] A style.
|
||||
* @property {string} [iconHtml] An icon HTML.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -464,6 +465,10 @@ class ModalView extends View {
|
||||
}
|
||||
}
|
||||
|
||||
if (o.iconHtml && !o.html) {
|
||||
o.html = o.iconHtml + ' ' + this.getHelper().escapeString(o.text);
|
||||
}
|
||||
|
||||
o.onClick = o.onClick || ((d, e) => {
|
||||
const handler = o.handler || (o.data || {}).handler;
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ class SelectRecordsModalView extends ModalView {
|
||||
name: 'create',
|
||||
position: 'right',
|
||||
onClick: () => this.create(),
|
||||
iconHtml: '<span class="fas fa-plus fa-sm"></span>',
|
||||
label: 'Create',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user