[BUGFIX] IRRE: delete, showPossibleRecordsSelector 48/36948/6
authorAndreas Allacher <andreas.allacher@gmx.at>
Mon, 16 Feb 2015 15:19:07 +0000 (16:19 +0100)
committerBenjamin Mack <benni@typo3.org>
Fri, 17 Jul 2015 13:25:54 +0000 (15:25 +0200)
Delete does not work in combination with foreign_unique,
foreign_selector and showPossibleRecordsSelector = FALSE
because JS tries to re-add the deleted option to
the selector but there is no selector available in this case.

Add a check whether a selector is available.

Change-Id: If785e6a0056de8b8117ba43b843b8134adbec2c2
Resolves: #65100
Releases: master
Reviewed-on: http://review.typo3.org/36948
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js

index 2d24a04..b21157f 100644 (file)
@@ -1200,6 +1200,10 @@ var inline = {
        },
 
        readdSelectOption: function ($selectObj, value, unique) {
+               if (!$selectObj.length) {
+                       return;
+               }
+
                var index = null;
                var optionsHash = this.getOptionsHash($selectObj);
                var possibleValues = this.getKeysFromHashMap(unique.possible);