Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 355753 - Directory name should come first in page title

  • Loading branch information...
commit 0335cef6cd1db896cf6ddd20177d5665f21cab8b 1 parent f14f592
@mamacdon mamacdon authored
View
11 bundles/org.eclipse.orion.client.core/web/navigate/table.js
@@ -186,7 +186,16 @@ dojo.addOnLoad(function(){
// commandService.registerCommandContribution("eclipse.cloneGitRepository", 100, "pageActions", "eclipse.gitGroup");
mFileCommands.createAndPlaceFileCommandsExtension(serviceRegistry, commandService, explorer, "pageActions", "selectionTools", "eclipse.fileGroup", "eclipse.selectionGroup");
-
+
+ // when new item is fetched, display it in the page title
+ dojo.connect(explorer, "onchange", function(item) {
+ var title = "Navigator";
+ if (item) {
+ title = "/" + item.Name + " - " + title;
+ }
+ document.title = title;
+ });
+
//every time the user manually changes the hash, we need to load the workspace with that name
dojo.subscribe("/dojo/hashchange", explorer, function() {
refresh();
View
7 bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
@@ -237,6 +237,7 @@ define(['dojo', 'orion/util', 'orion/explorer', 'orion/breadcrumbs', 'orion/file
mFileCommands.updateNavTools(this.registry, this, this.toolbarId, this.selectionToolsId, this.treeRoot);
this.model = new Model(this.registry, this.treeRoot, this.fileClient);
this.createTree(this.parentId, this.model);
+ this.onchange && this.onchange(this.treeRoot);
}),
dojo.hitch(self, function(error) {
clearTimeout(progressTimeout);
@@ -248,6 +249,12 @@ define(['dojo', 'orion/util', 'orion/explorer', 'orion/breadcrumbs', 'orion/file
);
}
};
+ /**
+ * Clients can connect to this function to receive notification when the root item changes.
+ * @param {Object} item
+ */
+ FileExplorer.prototype.onchange = function(item) {
+ };
FileExplorer.prototype.constructor = FileExplorer;
//return module exports
Please sign in to comment.
Something went wrong with that request. Please try again.