aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-12-12 16:03:41 (EST)
committerGerrit Code Review @ Eclipse.org2013-12-17 10:57:33 (EST)
commit5a451bd6d2f65e7ff8c17465247cde1afab45008 (patch)
tree347b591941e07298bf2af230ca0cf0092f80e82c
parentdbacdea3ffe58c5f0799c40923ca62e5e203594e (diff)
downloadorg.eclipse.orion.client-5a451bd6d2f65e7ff8c17465247cde1afab45008.zip
org.eclipse.orion.client-5a451bd6d2f65e7ff8c17465247cde1afab45008.tar.gz
org.eclipse.orion.client-5a451bd6d2f65e7ff8c17465247cde1afab45008.tar.bz2
Bug 423962 - [Outliner] Outlines should scroll, not wrap and haverefs/changes/31/19731/2
correct indenting Change-Id: I336103e1e42acf758c3b3674e6f6c1f5ac7b2db5 Signed-off-by: Curtis Windatt <cwindatt@ca.ibm.com>
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/edit/common.css6
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/outliner.js40
2 files changed, 29 insertions, 17 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/common.css b/bundles/org.eclipse.orion.client.ui/web/edit/common.css
index bbbcd65..26afdd5 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/common.css
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/common.css
@@ -12,6 +12,7 @@
.outlineExplorer {
overflow-y: hidden;
+ white-space:nowrap;
}
.outlineFilter {
@@ -31,6 +32,11 @@
display: none;
}
+.outlineLeafIndent {
+ display: inline-block;
+ width: 16px; /*16px standard indent*/
+}
+
.findOptionsDiv {
display: inline-block;
margin: 0;
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 622d27a..4bc297c 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
@@ -41,23 +41,29 @@ define([
return;
}
var elementNode = document.createElement("span"); //$NON-NLS-0$
- tableRow.appendChild(elementNode);
- if (item.className) {
- elementNode.classList.add(item.className);
- }
- if (item.children) {
- this.getExpandImage(tableRow, elementNode);
- }
- if (item.href) {
- this._createLink(item.label, item.href, elementNode);
- } else if (item.line || item.column || item.start) {
- var href = new URITemplate("#{,resource,params*}").expand({resource: this.title, params: item}); //$NON-NLS-0$
- this._createLink(item.label, href, elementNode);
- item.outlineLink = href;
- } else if (item.label) {
- elementNode.appendChild(document.createTextNode(item.label)); //$NON-NLS-0$
- }
- };
+ var expandNode = document.createElement("span");
+ var contentsNode = document.createElement("span");
+ tableRow.appendChild(elementNode);
+ elementNode.appendChild(expandNode);
+ elementNode.appendChild(contentsNode);
+ if (item.className) {
+ contentsNode.classList.add(item.className);
+ }
+ if (item.children) {
+ this.getExpandImage(tableRow, expandNode);
+ } else {
+ expandNode.classList.add("outlineLeafIndent");
+ }
+ if (item.href) {
+ this._createLink(item.label, item.href, contentsNode);
+ } else if (item.line || item.column || item.start) {
+ var href = new URITemplate("#{,resource,params*}").expand({resource: this.title, params: item}); //$NON-NLS-0$
+ this._createLink(item.label, href, contentsNode);
+ item.outlineLink = href;
+ } else if (item.label) {
+ contentsNode.appendChild(document.createTextNode(item.label)); //$NON-NLS-0$
+ }
+ };
OutlineRenderer.prototype._createLink = function(text, href, parentNode) {
var link = document.createElement("a"); //$NON-NLS-0$