[BUGFIX] Filter pages in page tree by uid 05/55405/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 18 Jan 2018 12:08:36 +0000 (13:08 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 18 Jan 2018 17:05:11 +0000 (18:05 +0100)
Brings back the possibility to filter pages by uid
in the new SVG page tree.

Resolves: #83245
Releases: master
Change-Id: Ideded401d222c812fd0fcab1892082d2bd63a7c6
Reviewed-on: https://review.typo3.org/55405
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/PageTree/PageTreeToolbar.js

index 705d94b..dfbf4f3 100644 (file)
@@ -202,12 +202,12 @@ define(['jquery',
      */
     TreeToolbar.prototype.search = function (input) {
       var _this = this;
-      var name = $(input).val();
+      var name = $(input).val().trim();
 
       this.tree.nodes[0].expanded = false;
       this.tree.nodes.forEach(function (node) {
         var regex = new RegExp(name, 'i');
-        if (regex.test(node.name) || regex.test(node.alias)) {
+        if (node.identifier.toString() === name || regex.test(node.name) || regex.test(node.alias)) {
           _this.showParents(node);
           node.expanded = true;
           node.hidden = false;