Skip to content

Commit

Permalink
Bug 355753 - Directory name should come first in page title
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Macdonald committed Aug 31, 2011
1 parent f14f592 commit 0335cef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bundles/org.eclipse.orion.client.core/web/navigate/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 0335cef

Please sign in to comment.