UglifyJS does not support ES 2015+
authorAlexander Ebert <ebert@woltlab.com>
Sat, 29 Jun 2019 20:32:49 +0000 (22:32 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 29 Jun 2019 20:32:49 +0000 (22:32 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList.js
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/ExcludedPackages.js
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/Instructions.js
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/OptionalPackages.js
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/RequiredPackages.js

index 3c09870c30d570f830af5ccac4aaf26f72fc2e79..3abd854aea0b3045d9dbc505eaf5fec6f4b5c1b0 100644 (file)
@@ -116,7 +116,7 @@ define(['Dom/ChangeListener', 'Dom/Traverse', 'Dom/Util', 'EventKey', 'Language'
                /**
                 * Empties the input fields.
                 */
-               _emptyInput() {
+               _emptyInput: function() {
                        this._packageIdentifier.value = '';
                },
                
@@ -184,7 +184,7 @@ define(['Dom/ChangeListener', 'Dom/Traverse', 'Dom/Util', 'EventKey', 'Language'
                 * @param       {HTMLElement}   listItem        package list element holding package data
                 * @param       {object}        packageData     package data
                 */
-               _populateListItem(listItem, packageData) {
+               _populateListItem: function(listItem, packageData) {
                        elData(listItem, 'package-identifier', packageData.packageIdentifier);
                },
                
index b2e6b680bb893e715df523329c74bf422dcba37e..80a090ceecf526477be8bfc236259eb6c4e64539 100644 (file)
@@ -47,7 +47,7 @@ define(['./AbstractPackageList', 'Core', 'Language'], function(AbstractPackageLi
                /**
                 * @see WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList#_emptyInput
                 */
-               _emptyInput() {
+               _emptyInput: function() {
                        ExcludedPackages._super.prototype._emptyInput.call(this);
                        
                        this._version.value = '';
@@ -78,7 +78,7 @@ define(['./AbstractPackageList', 'Core', 'Language'], function(AbstractPackageLi
                /**
                 * @see WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList#_populateListItem
                 */
-               _populateListItem(listItem, packageData) {
+               _populateListItem: function(listItem, packageData) {
                        ExcludedPackages._super.prototype._populateListItem.call(this, listItem, packageData);
                        
                        elData(listItem, 'version', packageData.version);
index adfda6f40fc6a9fbc83d3cc971aa89b2ae249f6e..257864c8a35e0b06f1f4300915886253f0a22a96 100644 (file)
@@ -279,12 +279,14 @@ define([
                        this._instructionsList.appendChild(listItem);
                        
                        var instructionListContainer = elById(this._formFieldId + '_instructions' + instructionsId + '_instructionListContainer');
-                       for (var errorMessage of instructionsData.errors || []) {
-                               var small = elCreate('small');
-                               small.className = 'innerError';
-                               small.innerHTML = errorMessage;
-                               
-                               instructionListContainer.parentNode.insertBefore(small, instructionListContainer);
+                       if (Array.isArray(instructionsData.errors)) {
+                               instructionsData.errors.forEach(function(errorMessage) {
+                                       var small = elCreate('small');
+                                       small.className = 'innerError';
+                                       small.innerHTML = errorMessage;
+
+                                       instructionListContainer.parentNode.insertBefore(small, instructionListContainer);
+                               });
                        }
                        
                        new UiSortableList({
@@ -616,18 +618,18 @@ define([
                                DomTraverse.childrenByTag(elById(instructions.id + '_instructionList'), 'LI').forEach(function(instruction, instructionIndex) {
                                        var namePrefix = this._formFieldId + '[' + instructionsIndex + '][instructions][' + instructionIndex + ']';
                                        
-                                       for (var property of ['pip', 'value', 'runStandalone']) {
+                                       ['pip', 'value', 'runStandalone'].forEach((function(property) {
                                                var element = elCreate('input');
                                                elAttr(element, 'type', 'hidden');
-                                               elAttr(element, 'name', namePrefix + '[' + property + ']')
+                                               elAttr(element, 'name', namePrefix + '[' + property + ']');
                                                element.value = elData(instruction, property);
                                                this._form.appendChild(element);
-                                       }
+                                       }).bind(this));
                                        
                                        if (_applicationPips.indexOf(elData(instruction, 'pip')) !== -1) {
                                                var application = elCreate('input');
                                                elAttr(application, 'type', 'hidden');
-                                               elAttr(application, 'name', namePrefix + '[application]')
+                                               elAttr(application, 'name', namePrefix + '[application]');
                                                application.value = elData(instruction, 'application');
                                                this._form.appendChild(application);
                                        }
index e5594f2b15f99f4af6f1e2bff782b1b3e86d1716..ff64710b84bd76e0dd3ab0ea4284b26e014587d1 100644 (file)
@@ -21,7 +21,7 @@ define(['./AbstractPackageList', 'Core', 'Language'], function(AbstractPackageLi
                /**
                 * @see WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList#_populateListItem
                 */
-               _populateListItem(listItem, packageData) {
+               _populateListItem: function(listItem, packageData) {
                        OptionalPackages._super.prototype._populateListItem.call(this, listItem, packageData);
                        
                        listItem.innerHTML = ' ' + Language.get('wcf.acp.devtools.project.optionalPackage.optionalPackage', {
index 474b616ece31c5412af0850a6bac88f412e44318..30a43907cd57ccfa852c7adf14fdad9c64aa3685 100644 (file)
@@ -58,7 +58,7 @@ define(['./AbstractPackageList', 'Core', 'Language'], function(AbstractPackageLi
                /**
                 * @see WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList#_emptyInput
                 */
-               _emptyInput() {
+               _emptyInput: function() {
                        RequiredPackages._super.prototype._emptyInput.call(this);
                        
                        this._minVersion.value = '';
@@ -91,7 +91,7 @@ define(['./AbstractPackageList', 'Core', 'Language'], function(AbstractPackageLi
                /**
                 * @see WoltLabSuite/Core/Form/Builder/Field/Devtools/Project/AbstractPackageList#_populateListItem
                 */
-               _populateListItem(listItem, packageData) {
+               _populateListItem: function(listItem, packageData) {
                        RequiredPackages._super.prototype._populateListItem.call(this, listItem, packageData);
                        
                        elData(listItem, 'min-version', packageData.minVersion);