diff --git a/t3lib/js/extjs/tree/tree.js b/t3lib/js/extjs/tree/tree.js
index 95ff4b2..b2c35b0 100644
--- a/t3lib/js/extjs/tree/tree.js
+++ b/t3lib/js/extjs/tree/tree.js
@@ -78,16 +78,17 @@ Ext.extend(TYPO3.Components.Tree.StandardTree, Ext.tree.TreePanel, {
});
TYPO3.Components.Tree.StandardTree.superclass.initComponent.call(this);
},
- filterTree: function(filterText) {
+ filterTree: function() {
+ var filterText = this.getTopToolbar().getComponent('filterText');
+ var filterChecked = this.getTopToolbar().getComponent('filterChecked');
+ var onlyChecked = filterChecked.pressed;
+
var text = filterText.getValue();
Ext.each(this.hiddenNodes, function(node) {
node.ui.show();
node.ui.removeClass('bgColor6');
});
- if (!text) {
- this.filter.clear();
- return;
- }
+
this.expandAll();
var regText = (this.filterOptionStartsWith ? '^' : '') + Ext.escapeRe(text);
var re = new RegExp(regText, 'i');
@@ -97,7 +98,7 @@ Ext.extend(TYPO3.Components.Tree.StandardTree, Ext.tree.TreePanel, {
var me = this;
this.root.cascade(function(node) {
if (node.ui.ctNode.offsetHeight < 3) {
- if (!re.test(node.text)) {
+ if (!re.test(node.text) || (onlyChecked && !node.ui.isChecked())) {
node.ui.hide();
me.hiddenNodes.push(node);
} else {
@@ -111,7 +112,14 @@ Ext.extend(TYPO3.Components.Tree.StandardTree, Ext.tree.TreePanel, {
TYPO3.Components.Tree.Toolbar = function(items, scope) {
items = items || [];
items.push([
- ' ',
+ {
+ iconCls: 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-document-select',
+ tooltip: TYPO3.lang['tcatree.filter.onlyChecked'],
+ itemId: 'filterChecked',
+ enableToggle: true,
+ toggleHandler: scope.filterTree,
+ scope: scope
+ },
{
iconCls: 't3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-tree-search-open',
menu: {
@@ -122,7 +130,7 @@ TYPO3.Components.Tree.Toolbar = function(items, scope) {
group: 'searchStartsWith',
handler: function(item) {
scope.filterOptionStartsWith = true;
- scope.filterTree(scope.getTopToolbar().getComponent('filterText'));
+ scope.filterTree();
},
scope: scope
},
@@ -132,7 +140,7 @@ TYPO3.Components.Tree.Toolbar = function(items, scope) {
group: 'searchStartsWith',
handler: function(item) {
scope.filterOptionStartsWith = false;
- scope.filterTree(scope.getTopToolbar().getComponent('filterText'));
+ scope.filterTree();
},
scope: scope
}
diff --git a/typo3/sysext/lang/locallang_csh_corebe.xml b/typo3/sysext/lang/locallang_csh_corebe.xml
index d7855af..56ea248 100755
--- a/typo3/sysext/lang/locallang_csh_corebe.xml
+++ b/typo3/sysext/lang/locallang_csh_corebe.xml
@@ -97,6 +97,7 @@ If you click the folder title in the Folder Tree you will see the sub-module loa
+