[BUGFIX] Wrong each function in FormEngineValidation.js 31/41831/3
authorFrank Nägler <typo3@naegler.net>
Wed, 22 Jul 2015 16:22:38 +0000 (18:22 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 22 Jul 2015 16:37:02 +0000 (18:37 +0200)
Resolves: #68471
Releases: master
Change-Id: Ib2e3881bea17f63bc6603cbbc64505d385ca57e0
Reviewed-on: http://review.typo3.org/41831
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js

index 747987a..50fcea5 100644 (file)
@@ -237,11 +237,11 @@ define('TYPO3/CMS/Backend/FormEngineValidation', ['jquery', 'TYPO3/CMS/Backend/F
        FormEngineValidation.validateField = function($field, value) {
                value = value || FormEngineValidation.ltrim($field.val());
 
-               var $rules = $field.data('formengine-validation-rules');
+               var rules = $field.data('formengine-validation-rules');
                var markParent = false;
                var selected = 0;
                var returnValue = value;
-               $.each($rules, function(k, rule) {
+               $.each(rules, function(k, rule) {
                        switch (rule.type) {
                                case 'required':
                                        if (value === '') {
@@ -897,7 +897,8 @@ define('TYPO3/CMS/Backend/FormEngineValidation', ['jquery', 'TYPO3/CMS/Backend/F
         */
        FormEngineValidation.markParentTab = function($element) {
                var $panes = $element.parents('.tab-pane');
-               $.each($panes, function(k, $pane) {
+               $panes.each(function() {
+                       var $pane = $(this);
                        var id = $pane.attr('id');
                        $(document)
                                .find('a[href="#' + id + '"]')