summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorelijahe2013-11-16 17:51:51 (EST)
committer Silenio Quarti2013-11-21 10:16:45 (EST)
commitb527166f66df059dfd9b70a84872732355ecae7b (patch)
tree590833489d23dfad466a8a231b72c50f558021b4
parent2a61751516638029666bbaa2cc350fe955a2589a (diff)
downloadorg.eclipse.orion.client-b527166f66df059dfd9b70a84872732355ecae7b.zip
org.eclipse.orion.client-b527166f66df059dfd9b70a84872732355ecae7b.tar.gz
org.eclipse.orion.client-b527166f66df059dfd9b70a84872732355ecae7b.tar.bz2
Bug 394861 - outliner should provide filtering
- Filter based on item labels rather than ids which don't always match the label. --Signed-off-by: Elijah El-Haddad <elijahe@ca.ibm.com>
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/outliner.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js b/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
index d1f2f13..10da16c 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
@@ -121,14 +121,16 @@ define([
OutlineExplorer.prototype.filterChanged = function (filter) {
var navDict = this.getNavDict();
var itemMap = this.model.getIdItemMap();
+ var item;
for (var id in itemMap) {
if (itemMap.hasOwnProperty(id)) {
- if (-1 === id.indexOf(filter)) {
+ item = itemMap[id];
+ if (-1 === item.label.indexOf(filter)) {
//hide
navDict.getValue(id).rowDomNode.classList.add("hiddenRow"); //$NON-NLS-0$
} else {
- //id matches filter, show row
+ //label matches filter, show row
navDict.getValue(id).rowDomNode.classList.remove("hiddenRow"); //$NON-NLS-0$
}
}