| author | Edyta Przymus | 2012-04-17 10:05:05 (EDT) |
|---|---|---|
| committer | Szymon Brandys | 2012-04-17 10:08:20 (EDT) |
| commit | 8860b55a83fd66b90f2529515ffe445a7554d64d (patch) (side-by-side diff) | |
| tree | d69b7af6f05a8a72b58aadbf70e32df5d1e54b73 | |
| parent | 6488e9616f2372de9935fb06fb744992276bc743 (diff) | |
| download | org.eclipse.orion.client-8860b55a83fd66b90f2529515ffe445a7554d64d.zip org.eclipse.orion.client-8860b55a83fd66b90f2529515ffe445a7554d64d.tar.gz org.eclipse.orion.client-8860b55a83fd66b90f2529515ffe445a7554d64d.tar.bz2 | |
Bug 350021 - [client][git] Ambiguous tab titles for Git Status and Gitv20120417-1408
Log pages
| -rw-r--r-- | bundles/org.eclipse.orion.client.git/web/git/git-log.js | 3 | ||||
| -rw-r--r-- | bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js | 35 |
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"); }, |

