* Follow-up to #1104: fix 'required' validation for IRRE records
authorTobias Liebig <mail@etobi.de>
Mon, 15 Mar 2010 20:20:35 +0000 (20:20 +0000)
committerTobias Liebig <mail@etobi.de>
Mon, 15 Mar 2010 20:20:35 +0000 (20:20 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7112 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/jsfunc.tbe_editor.js

index 0808b9c..742d9cc 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-15  Tobias Liebig  <mail_typo3@etobi.de>
+
+       * Follow-up to #1104: fix 'required' validation for IRRE records
+
 2010-03-14  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #13283: Thumbnail generation broken for PDF files (thanks to Michael Stucki & Andy Grunwald)
index a74acf3..5ee4d37 100755 (executable)
@@ -206,19 +206,21 @@ var TBE_EDITOR = {
                                        }
                                }
                        } else if (type == 'range' && elementData.range) {
+                               var numberOfElements = 0;
                                form = document[TBE_EDITOR.formname][elementName+'_list'];
                                if (!form) {
                                                // special treatment for IRRE fields:
                                        var tempObj = document[TBE_EDITOR.formname][elementName];
                                        if (tempObj && Element.hasClassName(tempObj, 'inlineRecord')) {
                                                form = tempObj.value ? tempObj.value.split(',') : [];
+                                               numberOfElements = form.length;
                                        }
 
                                } else {
                                                // special treatment for file uploads
                                        var tempObj = document[TBE_EDITOR.formname][elementName.replace(/^data/, 'data_files')];
-                                       var numberOfElements = form.length;
-
+                                       numberOfElements = form.length;
+                                       
                                        if (tempObj && tempObj.type == 'file' && tempObj.value) {
                                                numberOfElements++; // Add new uploaded file to the number of elements
                                        }