summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEdyta Przymus2012-04-17 10:05:05 (EDT)
committer Szymon Brandys2012-04-17 10:08:20 (EDT)
commit11a34af074f1ca751e23903e57587b33fe754e6e (patch)
treed69b7af6f05a8a72b58aadbf70e32df5d1e54b73
parentb82b77fe37a7d11f06e4d3ccc35457509caf306f (diff)
downloadorg.eclipse.orion.client-11a34af074f1ca751e23903e57587b33fe754e6e.zip
org.eclipse.orion.client-11a34af074f1ca751e23903e57587b33fe754e6e.tar.gz
org.eclipse.orion.client-11a34af074f1ca751e23903e57587b33fe754e6e.tar.bz2
Bug 350021 - [client][git] Ambiguous tab titles for Git Status and Git
Log pages
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/git-log.js3
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js35
2 files changed, 28 insertions, 10 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-log.js b/bundles/org.eclipse.orion.client.git/web/git/git-log.js
index 4895c82..6cb4cd9 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-log.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-log.js
@@ -298,8 +298,9 @@ function setPageTitle(branchName, cloneName, cloneLocation, isRemote, isBranch){
title = title + " on <a href='" + require.toUrl("git/git-repository.html") + "#" + cloneLocation + "'>" + cloneName + "</a>";
}
pageTitle.innerHTML = title;
+
if(branchName){
- document.title = cloneName ? (branchName + " on " + cloneName) : branchName;
+ document.title = cloneName ? "Log for " + branchName + " on "+ cloneName + " - Git" : "Log for branch " + branchName + " - Git";
}
}
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js b/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
index 1947597..d4b77cc 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
@@ -11,8 +11,8 @@
/*global define dojo dijit document console */
-define(['require', 'dojo', 'orion/compare/compare-container', 'orion/commands', 'orion/globalCommands', 'orion/git/git-commit-navigator', 'orion/git/gitCommands', 'orion/util', 'dijit/layout/ContentPane'], function(
- require, dojo, mCompareContainer, mCommands, mGlobalCommands, mGitCommitNavigator, mGitCommands, mUtil) {
+define(['require', 'dojo', 'orion/compare/compare-container', 'orion/commands', 'orion/globalCommands', 'orion/git/git-commit-navigator', 'orion/git/gitCommands', 'orion/util', 'orion/breadcrumbs', 'dijit/layout/ContentPane'], function(
+ require, dojo, mCompareContainer, mCommands, mGlobalCommands, mGitCommitNavigator, mGitCommands, mUtil, mBreadcrumbs) {
var orion = orion || {};
@@ -764,16 +764,27 @@ orion.GitStatusController = (function() {
_initTitleBar:function(withBranchName){
var title = "Git Status";
- var location = "";
var branchName = this._curBranch ? this._curBranch.Name : "detached";
- if(withBranchName) {
- location = this._curClone.Name + " on " + branchName;
- }
+
//render browser title
- document.title = location;
+ document.title = "Status for " + this._curClone.Name + " - Git ";
//render page title
//FIXME we should not know these global page ids inside component implementations
dojo.place(document.createTextNode(title), "pageTitle", "only");
+ var that = this;
+ var item = {};
+ var location_ = dojo.byId("location");
+
+ item.Name = branchName;
+ item.Parents = [];
+ item.Name = "Status (" + branchName + ")";
+ item.Parents[0] = {};
+ item.Parents[0].Name = this._curClone.Name;
+ item.Parents[0].Location = this._curClone.Location;
+ item.Parents[0].ChildrenLocation = this._curClone.Location;
+ item.Parents[1] = {};
+ item.Parents[1].Name = "Repositories";
+
if(withBranchName) {
//render git status title on local branch
this._logTableRenderer.modifyHeader(branchName);
@@ -782,9 +793,15 @@ orion.GitStatusController = (function() {
//render git log title on remote branch
this._remoteTableRenderer.modifyHeader(branchName);
}
- //render page tilte details (clone name + remote name + local branch name)
- dojo.place(document.createTextNode(this._curClone.Name + " on " + branchName), "location", "only");
}
+
+ new mBreadcrumbs.BreadCrumbs({
+ container: location_,
+ resource: item,
+ makeHref:function(seg, location_){
+ seg.href = "/git/git-repository.html#" + (location_ ? location_ : "");
+ }
+ });
mUtil.forceLayout("pageTitle");
},