From 2ad21c3f7cec8e865af8bdd1bf73ca6a8bcb3943 Mon Sep 17 00:00:00 2001
From: Henning Leutz <leutz@pcsg.de>
Date: Wed, 15 Nov 2017 16:44:18 +0100
Subject: [PATCH] fix: quiqqer/package-bricks#73

---
 qui/controls/elements/FormList.js | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/qui/controls/elements/FormList.js b/qui/controls/elements/FormList.js
index ea12f974..8de74f76 100644
--- a/qui/controls/elements/FormList.js
+++ b/qui/controls/elements/FormList.js
@@ -5,11 +5,6 @@
  *
  * @module qui/controls/elements/FormList
  * @author www.pcsg.de (Henning Leutz)
- *
- * @require qui/QUI
- * @require qui/controls/Control
- * @require qui/controls/buttons/Button
- * @require css!qui/controls/elements/FormList.css
  */
 define('qui/controls/elements/FormList', [
 
@@ -34,7 +29,7 @@ define('qui/controls/elements/FormList', [
         ],
 
         options: {
-            entry: '',
+            entry     : '',
             buttonText: 'Add entry'
         },
 
@@ -59,7 +54,7 @@ define('qui/controls/elements/FormList', [
             this.$Elm = new Element('div', {
                 'class': 'qui-controls-formlist',
                 html   : '<div class="qui-controls-formlist-buttons"></div>' +
-                         '<div class="qui-controls-formlist-container"></div>'
+                '<div class="qui-controls-formlist-container"></div>'
             });
 
             this.$Container = this.$Elm.getElement('.qui-controls-formlist-container');
@@ -85,9 +80,9 @@ define('qui/controls/elements/FormList', [
 
             var nodeName = this.$Input.nodeName;
 
-            if (nodeName == 'INPUT' ||
-                nodeName == 'TEXTAREA' ||
-                nodeName == 'SELECT') {
+            if (nodeName === 'INPUT' ||
+                nodeName === 'TEXTAREA' ||
+                nodeName === 'SELECT') {
                 this.$Input.type = 'hidden';
             }
 
@@ -111,8 +106,7 @@ define('qui/controls/elements/FormList', [
 
                     for (key in value[i]) {
                         if (value[i].hasOwnProperty(key)) {
-                            Node.getElements('[name="' + key + '"]')
-                                .set('value', value[i][key]);
+                            Node.getElements('[name="' + key + '"]').set('value', value[i][key]);
                         }
                     }
                 }
@@ -163,13 +157,13 @@ define('qui/controls/elements/FormList', [
             var Child = new Element('div', {
                 'class': 'qui-controls-formlist-entry',
                 html   : '<div class="qui-controls-formlist-entry-delete"></div>' +
-                         '<div class="qui-controls-formlist-entry-data">' +
-                         this.getAttribute('entry') +
-                         '</div>'
+                '<div class="qui-controls-formlist-entry-data">' +
+                this.getAttribute('entry') +
+                '</div>'
             }).inject(this.$Container);
 
             new QUIButton({
-                icon  : 'icon-trash',
+                icon  : 'icon-trash fa fa-trash',
                 events: {
                     onClick: function () {
                         Child.destroy();
@@ -185,7 +179,7 @@ define('qui/controls/elements/FormList', [
                 change: this.$refreshData
             });
 
-            QUI.parse(Child).then(function() {
+            QUI.parse(Child).then(function () {
                 this.$refreshData();
                 this.fireEvent('parsed', [this, Child]);
             }.bind(this));
-- 
GitLab