[BUGFIX] Backend typolink fields not saved 22/35622/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 9 Apr 2013 18:35:46 +0000 (20:35 +0200)
committerFrank Nägler <typo3@naegler.net>
Tue, 23 Dec 2014 17:59:20 +0000 (18:59 +0100)
Adds a trailing slash on input and a call to onchange for that field.

Change-Id: Ib17216aba9c0190018a44a04e2081cac19c0b84a
Resolves: #25946
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/35622
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index 68650f1..77a844d 100644 (file)
@@ -603,11 +603,13 @@ class ElementBrowser {
                                                        cur_params = cur_params.replace(/\\bid\\=.*?(\\&|$)/, "");
                                                }
                                                input = input + " " + cur_target + " " + cur_class + " " + cur_title + " " + cur_params;
+                                               input = input.replace(/^\s+|\s+$/g, "");
                                                if(field.value && field.className.search(/textarea/) != -1) {
                                                        field.value += "\\n" + input;
                                                } else {
                                                        field.value = input;
                                                }
+                                               field.onchange();
                                                ' . $update . '
                                        }
                                }