From bb76948c3e4383612958d86cf95ae9368a6e48fb Mon Sep 17 00:00:00 2001 From: Jan Wennrich <jan@pcsg.de> Date: Wed, 15 Nov 2017 12:54:26 +0100 Subject: [PATCH] feat: FormList has attribute for "Add Entry"-button text (closes #31) --- qui/controls/elements/FormList.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qui/controls/elements/FormList.js b/qui/controls/elements/FormList.js index 7809075f..4d45409a 100644 --- a/qui/controls/elements/FormList.js +++ b/qui/controls/elements/FormList.js @@ -34,7 +34,8 @@ define('qui/controls/elements/FormList', [ ], options: { - entry: '' + entry: '', + buttonText: 'Add entry' }, initialize: function (options) { @@ -65,7 +66,7 @@ define('qui/controls/elements/FormList', [ this.$Buttons = this.$Elm.getElement('.qui-controls-formlist-buttons'); new QUIButton({ - text : 'Eintrag hinzufügen', // #locale + text : this.getAttribute('buttonText'), textimage: 'icon-plus fa fa-add', events : { onClick: this.$createEntry @@ -184,6 +185,8 @@ define('qui/controls/elements/FormList', [ change: this.$refreshData }); + console.log(Child); + QUI.parse(Child).then(function() { this.$refreshData(); this.fireEvent('parsed', [this, Child]); -- GitLab