From: Matthias Schmidt Date: Wed, 28 Oct 2020 16:22:41 +0000 (+0100) Subject: Merge branch '5.3' X-Git-Tag: 5.4.0_Alpha_1~698 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b88a3b7354b9ab7458f938a388b5096161092f62;p=GitHub%2FWoltLab%2FWCF.git Merge branch '5.3' --- b88a3b7354b9ab7458f938a388b5096161092f62 diff --cc wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/ItemList.js index 449a1fe795,3e16e6a3df..0ba161c10c --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/ItemList.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/ItemList.js @@@ -7,34 -7,36 +7,33 @@@ * @module WoltLabSuite/Core/Form/Builder/Field/ItemList * @since 5.2 */ -define(['Core', './Field', 'WoltLabSuite/Core/Ui/ItemList/Static'], function(Core, FormBuilderField, UiItemListStatic) { - "use strict"; - - /** - * @constructor - */ - function FormBuilderFieldItemList(fieldId) { - this.init(fieldId); - }; - Core.inherit(FormBuilderFieldItemList, FormBuilderField, { - /** - * @see WoltLabSuite/Core/Form/Builder/Field/Field#_getData - */ - _getData: function() { - var data = {}; - data[this._fieldId] = []; - - var values = UiItemListStatic.getValues(this._fieldId); - for (var i = 0, length = values.length; i < length; i++) { - if (values[i].objectId) { - data[this._fieldId][values[i].objectId] = values[i].value; - } - else { - data[this._fieldId].push(values[i].value); - } - } - - return data; - } - }); - - return FormBuilderFieldItemList; +define(['Core', './Field', 'WoltLabSuite/Core/Ui/ItemList/Static'], function (Core, FormBuilderField, UiItemListStatic) { + "use strict"; + /** + * @constructor + */ + function FormBuilderFieldItemList(fieldId) { + this.init(fieldId); + } + ; + Core.inherit(FormBuilderFieldItemList, FormBuilderField, { + /** + * @see WoltLabSuite/Core/Form/Builder/Field/Field#_getData + */ + _getData: function () { + var data = {}; + data[this._fieldId] = []; + var values = UiItemListStatic.getValues(this._fieldId); + for (var i = 0, length = values.length; i < length; i++) { - // TODO: data[this._fieldId] is an array but if code assumes object + if (values[i].objectId) { + data[this._fieldId][values[i].objectId] = values[i].value; + } + else { + data[this._fieldId].push(values[i].value); + } + } + return data; + } + }); + return FormBuilderFieldItemList; });