summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEdyta Przymus2012-08-21 13:59:52 (EDT)
committer Szymon Brandys2012-08-22 06:14:57 (EDT)
commita71ac4d15b8a29e7ed2d3df7363c55e71dc59309 (patch)
tree45e0f6259de368cb87fb08431996dfa2a215833d
parentbf075a4598c9338278a7cf7c83a7377cdef0b187 (diff)
downloadorg.eclipse.orion.client-a71ac4d15b8a29e7ed2d3df7363c55e71dc59309.zip
org.eclipse.orion.client-a71ac4d15b8a29e7ed2d3df7363c55e71dc59309.tar.gz
org.eclipse.orion.client-a71ac4d15b8a29e7ed2d3df7363c55e71dc59309.tar.bz2
Bug 386845 - 'Pull Request' page should have better descriptions and header titlev20120822-1014
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/git-commit.js1
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/reviewRequest.css (renamed from bundles/org.eclipse.orion.client.git/web/git/pullRequest.css)0
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html (renamed from bundles/org.eclipse.orion.client.git/web/git/pullRequest.html)12
-rw-r--r--bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js (renamed from bundles/org.eclipse.orion.client.git/web/git/pullRequest.js)8
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js10
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js24
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js (renamed from bundles/org.eclipse.orion.client.git/web/orion/git/gitPullRequestExplorer.js)95
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ReviewRequestDialog.js (renamed from bundles/org.eclipse.orion.client.git/web/orion/git/widgets/GetPullRequestUrlDialog.js)18
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ReviewRequestDialog.html (renamed from bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/GetPullRequestUrlDialog.html)4
9 files changed, 112 insertions, 60 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-commit.js b/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
index 3e7d9be..1fbe029 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
@@ -47,7 +47,6 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/bootstrap', 'orion
// define the command contributions - where things appear, first the groups
commandService.addCommandGroup("pageActions", "eclipse.gitGroup", 100); //$NON-NLS-1$ //$NON-NLS-0$
commandService.registerCommandContribution("pageActions", "eclipse.orion.git.cherryPick", 100, "eclipse.gitGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- commandService.registerCommandContribution("pageActions", "eclipse.orion.git.getPullRequestUrl", 101, "eclipse.gitGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandService.registerCommandContribution("pageActions", "eclipse.orion.git.askForReviewCommand", 101, "eclipse.gitGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandService.registerCommandContribution("pageActions", "eclipse.orion.git.openCommitCommand", 102, "eclipse.gitGroup", true, new mCommands.CommandKeyBinding('h', true, true)); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.css b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.css
index 5d2457d..5d2457d 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.css
+++ b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.css
diff --git a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.html b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html
index 4ceb240..76bdb7c 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.html
+++ b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html
@@ -4,8 +4,8 @@
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2012." >
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Git Pull Request</title>
- <link rel="stylesheet" type="text/css" href="pullRequest.css" />
+ <title>Git Review Request</title>
+ <link rel="stylesheet" type="text/css" href="reviewRequest.css" />
<link rel="shortcut icon" href="/commit.ico" />
<script type="text/javascript" src="../requirejs/require.js"></script>
<script type="text/javascript">
@@ -38,17 +38,21 @@
domReady: 'requirejs/domReady'
}
});
- require(["pullRequest.js"]);
+ require(["reviewRequest.js"]);
</script>
</head>
- <body id="orion-pullRequest" style="height: 100%;" class="claro orionPage">
+ <body id="orion-reviewRequest" style="height: 100%;" class="claro orionPage">
<div class="content-fixedHeight">
<div class="fixedToolbarHolder mainpane mainPanelLayout">
<div class="mainToolbar toolComposite" id="pageToolbar"></div>
<div id="mainNode" class="toolbarTarget">
+ <div id="welcomeDiv" class="displayTable settings">
+ </div>
<div id="commitDiv" class="displayTable settings">
</div>
+ <div id="moreOptionsDiv" class="displayTable settings">To review the commit you can also
+ </div>
<div id="fetchDiv" class="displayTable settings">
</div>
<div id="remoteDiv" class="displayTable settings">
diff --git a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.js b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js
index c581e60..be9807c 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/pullRequest.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js
@@ -14,11 +14,11 @@ var eclipse;
/*browser:true*/
define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/bootstrap', 'orion/status', 'orion/progress', 'orion/commands', 'orion/dialogs', 'orion/selection',
'orion/fileClient', 'orion/operationsClient', 'orion/searchClient', 'orion/globalCommands',
- 'orion/git/gitPullRequestExplorer', 'orion/git/gitCommands', 'orion/git/gitClient', 'orion/ssh/sshTools', 'orion/links', 'orion/contentTypes',
+ 'orion/git/gitReviewRequestExplorer', 'orion/git/gitCommands', 'orion/git/gitClient', 'orion/ssh/sshTools', 'orion/links', 'orion/contentTypes',
'dojo/hash'],
function(messages, require, dojo, mBootstrap, mStatus, mProgress, mCommands, mDialogs, mSelection,
mFileClient, mOperationsClient, mSearchClient, mGlobalCommands,
- mGitPullRequestExplorer, mGitCommands, mGitClient, mSshTools, mLinks, mContentTypes) {
+ mGitReviewRequestExplorer, mGitCommands, mGitClient, mSshTools, mLinks, mContentTypes) {
mBootstrap.startup().then(function(core) {
var serviceRegistry = core.serviceRegistry;
@@ -39,9 +39,9 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/bootstrap', 'orion
var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
var searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandService, fileService: fileClient});
- var explorer = new mGitPullRequestExplorer.GitPullRequestExplorer(fileClient, commandService, serviceRegistry, gitClient); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var explorer = new mGitReviewRequestExplorer.GitReviewRequestExplorer(fileClient, commandService, serviceRegistry, gitClient); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
mGlobalCommands.setPageCommandExclusions(["eclipse.git.status2", "eclipse.git.status"]); //$NON-NLS-1$ //$NON-NLS-0$
- mGlobalCommands.generateBanner("orion-pullRequest", serviceRegistry, commandService, preferences, searcher, explorer); //$NON-NLS-0$
+ mGlobalCommands.generateBanner("orion-reviewRequest", serviceRegistry, commandService, preferences, searcher, explorer); //$NON-NLS-0$
// define commands
mGitCommands.createFileCommands(serviceRegistry, commandService, explorer, "pageActions", "selectionTools"); //$NON-NLS-1$ //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
index 01d552b..9bf20ed 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
@@ -898,11 +898,11 @@ eclipse.GitService = (function() {
handleAs: "json", //$NON-NLS-0$
timeout: 15000,
postData : dojo.toJson({
- "PullReqCommit": commit,
- "PullReqUrl" : url, //$NON-NLS-0$
- "PullReqNotifyLogin" : login, //$NON-NLS-0$
- "PullReqAuthorName" : authorName,
- "PullReqMessage" : message
+ "ReviewReqCommit": commit,
+ "ReviewReqUrl" : url, //$NON-NLS-0$
+ "ReviewReqNotifyLogin" : login, //$NON-NLS-0$
+ "ReviewReqAuthorName" : authorName,
+ "ReviewMessage" : message
}),
load: function(jsonData, xhrArgs) {
dojo.hitch(service, service._getGitServiceResponse)(clientDeferred, jsonData, xhrArgs);
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
index e0a5591..88a03c3 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
@@ -13,7 +13,7 @@
/*jslint browser:true eqeqeq:false laxbreak:true */
define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'orion/commands', 'orion/util', 'orion/git/util', 'orion/compare/compareUtils', 'orion/git/widgets/CloneGitRepositoryDialog',
'orion/git/widgets/AddRemoteDialog', 'orion/git/widgets/GitCredentialsDialog', 'orion/widgets/NewItemDialog',
- 'orion/git/widgets/RemotePrompterDialog', 'orion/git/widgets/ApplyPatchDialog', 'orion/git/widgets/OpenCommitDialog', 'orion/git/widgets/ConfirmPushDialog', 'orion/git/widgets/GetPullRequestUrlDialog',
+ 'orion/git/widgets/RemotePrompterDialog', 'orion/git/widgets/ApplyPatchDialog', 'orion/git/widgets/OpenCommitDialog', 'orion/git/widgets/ConfirmPushDialog', 'orion/git/widgets/ReviewRequestDialog',
'orion/git/widgets/ContentDialog', 'orion/git/widgets/CommitDialog', 'orion/git/widgets/AddRemoteRepositoryPrompterDialog'],
function(messages, require, dojo, mCommands, mUtil, mGitUtil, mCompareUtils) {
@@ -1708,8 +1708,8 @@ var exports = {};
function(clone){
var nonHash = window.location.href.split('#')[0]; //$NON-NLS-0$
var orionHome = nonHash.substring(0, nonHash.length - window.location.pathname.length);
- var pullRequestUrl = orionHome + "/git/pullRequest.html#" + clone.Children[0].GitUrl + "_" + item.Name;
- serviceRegistry.getService("orion.git.provider").sendCommitReviewRequest(commitName, headLocation, reviewerName, pullRequestUrl, authorName, commitMessage).then(
+ var reviewRequestUrl = orionHome + "/git/reviewRequest.html#" + clone.Children[0].GitUrl + "_" + item.Name;
+ serviceRegistry.getService("orion.git.provider").sendCommitReviewRequest(commitName, headLocation, reviewerName, reviewRequestUrl, authorName, commitMessage).then(
function(result) {
var display = {};
display.Severity = "Ok"; //$NON-NLS-0$
@@ -1729,10 +1729,10 @@ var exports = {};
function(clone){
var nonHash = window.location.href.split('#')[0]; //$NON-NLS-0$
var orionHome = nonHash.substring(0, nonHash.length - window.location.pathname.length);
- var pullRequestUrl = orionHome + "/git/pullRequest.html#" + clone.Children[0].GitUrl + "_" + item.Name;
- var dialog = new orion.git.widgets.GetPullRequestUrlDialog({
+ var reviewRequestUrl = orionHome + "/git/reviewRequest.html#" + clone.Children[0].GitUrl + "_" + item.Name;
+ var dialog = new orion.git.widgets.ReviewRequestDialog({
title: messages["Contribution Review Request"],
- url: pullRequestUrl,
+ url: reviewRequestUrl,
func: sendNotificationFunction
});
dialog.startup();
@@ -1983,10 +1983,10 @@ var exports = {};
});
commandService.addCommand(cloneGitRepositoryCommand);
- var cloneGitRepositoryCommandPullReq = new mCommands.Command({
+ var cloneGitRepositoryCommandReviewReq = new mCommands.Command({
name : messages["Clone Repository"],
tooltip : messages["Clone an existing Git repository to a folder"],
- id : "eclipse.cloneGitRepositoryPullReq", //$NON-NLS-0$
+ id : "eclipse.cloneGitRepositoryReviewReq", //$NON-NLS-0$
//parameters: cloneParameters,
callback : function(data) {
var gitService = serviceRegistry.getService("orion.git.provider"); //$NON-NLS-0$
@@ -2024,12 +2024,12 @@ var exports = {};
return true;
}
});
- commandService.addCommand(cloneGitRepositoryCommandPullReq);
+ commandService.addCommand(cloneGitRepositoryCommandReviewReq);
- var addRemotePullRequestCommand = new mCommands.Command({
+ var addRemoteReviewRequestCommand = new mCommands.Command({
name : messages["Add Remote"],
tooltip : messages["Add a new remote to the repository"],
- id : "eclipse.addRemotePullRequestCommand", //$NON-NLS-0$
+ id : "eclipse.addRemoteReviewRequestCommand", //$NON-NLS-0$
imageClass: "git-sprite-fetch", //$NON-NLS-0$
spriteClass: "gitCommandSprite", //$NON-NLS-0$
callback : function(data) {
@@ -2126,7 +2126,7 @@ var exports = {};
return true;
}
});
- commandService.addCommand(addRemotePullRequestCommand);
+ commandService.addCommand(addRemoteReviewRequestCommand);
var initRepositoryParameters = new mCommands.ParametersDescription([new mCommands.CommandParameter("folderName", "text", messages['New folder:'])], {hasOptionalParameters: true}); //$NON-NLS-1$ //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitPullRequestExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
index f338f21..7631dd3 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitPullRequestExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
@@ -18,33 +18,33 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
function(messages, require, dojo, dijit , mSection, i18nUtil, mGlobalCommands, mDiffProvider , mCompareContainer, mGitCommands, mNavUtils) {
var exports = {};
- exports.GitPullRequestExplorer = (function() {
+ exports.GitReviewRequestExplorer = (function() {
/**
- * Creates a new Git Pull Request explorer.
- * @class Git Pull Request explorer
- * @name orion.git.GitPullRequestExplorer
+ * Creates a new Git Review Request explorer.
+ * @class Git Review Request explorer
+ * @name orion.git.GitReviewRequestExplorer
* @param fileClient
* @param commandService
* @param serviceRegistry
* @param gitClient
*/
- function GitPullRequestExplorer(fileClient, commandService, serviceRegistry, gitClient){
+ function GitReviewRequestExplorer(fileClient, commandService, serviceRegistry, gitClient){
this.fileClient = fileClient;
this.registry = serviceRegistry;
this.gitClient = gitClient;
this.commandService = commandService;
}
- GitPullRequestExplorer.prototype.changedItem = function(parent, children) {
+ GitReviewRequestExplorer.prototype.changedItem = function(parent, children) {
this.redisplay();
};
- GitPullRequestExplorer.prototype.redisplay = function(){
+ GitReviewRequestExplorer.prototype.redisplay = function(){
this.display(dojo.hash());
};
- GitPullRequestExplorer.prototype.display = function(remote_sha){
+ GitReviewRequestExplorer.prototype.display = function(remote_sha){
this.progressService = this.registry.getService("orion.page.message"); //$NON-NLS-0$
this.loadingDeferred = new dojo.Deferred();
var that = this;
@@ -64,6 +64,7 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
this.url = params[2];
this.initTitleBar(params[1], params[0]);
+ dojo.empty(dojo.byId("welcomeDiv"));
dojo.empty(dojo.byId("cloneDiv"));
dojo.empty(dojo.byId("commitDiv"));
dojo.empty(dojo.byId("fetchDiv"));
@@ -71,11 +72,14 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
this.fileClient.loadWorkspace().then(
function(workspace){
+ that.defaultPath = workspace.ChildrenLocation;
that.commandService.registerCommandContribution("fetch", "eclipse.orion.git.fetch", 200);
that.commandService.registerCommandContribution("fetch", "eclipse.orion.git.fetchForce", 250);
- that.commandService.registerCommandContribution("add", "eclipse.addRemotePullRequestCommand", 300);
+ that.commandService.registerCommandContribution("add", "eclipse.addRemoteReviewRequestCommand", 300);
var tableNode = dojo.byId("cloneDiv");
+ dojo.create("div", {"class" : "stretch", id : "instruction", style: "width: 500px height: 100px" }, dojo.byId("welcomeDiv"));
+ dojo.create("div", {id : "instruction1", style: "padding-top: 20px" }, dojo.byId("welcomeDiv"));
var titleWrapper1 = new mSection.Section(dojo.byId("commitDiv"), {
id: "open commit from existing repository", //$NON-NLS-0$
title: "Commit not found", //$NON-NLS-0$
@@ -109,23 +113,35 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
content: '<div id="remoteNode" class="mainPadding"></list>' //$NON-NLS-0$
});
+ dojo.byId("commitDiv").style.display = " none ";
+ dojo.byId("fetchDiv").style.display = " none ";
+ dojo.byId("remoteDiv").style.display = " none ";
+
that.renderCloneSection(params);
if(workspace.Children.length === 0){
dojo.byId("addTitle").innerHTML = "There are no repositories in the workspace";
+ var text = "You are trying to review contribution " + params[1] + " from " + params[0] + " <br><br>Unfortunately the commit can not be found in your workspace. To see it try one of the following: ";
+ dojo.create("span", {"class" : "gitSecondaryDescription", innerHTML : text}, dojo.byId("instruction"));
+ dojo.create("span", {"class" : "gitSecondaryDescription", innerHTML: "<br>"}, dojo.byId("instruction"));
+ dojo.byId("commitDiv").style.display = " none ";
+ dojo.byId("fetchDiv").style.display = " none ";
+ dojo.byId("remoteDiv").style.display = " none ";
+
}
- that.renderSections(workspace.Children, params[0], params[2], params[1]);
+ that.renderSections(workspace.Children, params[0], params[2], params[1]);
}
+
);
};
- GitPullRequestExplorer.prototype.renderCloneSection = function(params){
+ GitReviewRequestExplorer.prototype.renderCloneSection = function(params){
var that = this;
- that.commandService.registerCommandContribution("clone", "eclipse.cloneGitRepositoryPullReq", 200);
+ that.commandService.registerCommandContribution("clone", "eclipse.cloneGitRepositoryReviewReq", 200);
that.commandService.renderCommands("clone", dojo.byId("cloneNode"), "clone", that, "button", params[0]);;
dojo.create("span", { style: "padding: 0px; text-align: left;", class: "gitMainDescription", innerHTML : " using " + params[0] }, dojo.byId("cloneNode"));
};
- GitPullRequestExplorer.prototype.renderSections = function(repositories, url1, url2, sha){
+ GitReviewRequestExplorer.prototype.renderSections = function(repositories, url1, url2, sha){
var that = this;
var findCommitLocation = function (repositories, commitName, deferred, that) {
@@ -148,9 +164,10 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
return deferred;
};
-
-
if (repositories.length > 0) {
+ dojo.empty(dojo.byId("instruction"));
+ var text = "You are trying to review contribution " + sha + " from " + url1 + " <br><br>Unfortunately the commit can not be found in your workspace. To see it try one of the following: ";
+ dojo.create("span", {"class" : "gitSecondaryDescription", innerHTML : text}, dojo.byId("instruction"));
repositories[0].Content = {};
var path = "root / "; //$NON-NLS-0$
if (repositories[0].Parents !== null && repositories[0].Parents !== undefined){
@@ -185,7 +202,12 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
var link2 = dojo.create("a", {style: "padding: 0px; text-align: left; display: inline-block; width: 150px", innerHTML: repositories[0].Name , href: repoURL }, dojo.byId(resp.Children[0].Id + "div"));
dojo.create("span", {class: "gitSecondaryDescription", innerHTML: "location: " + repositories[0].Content.Path},dojo.byId(resp.Children[0].Id + "div"));
var link = dojo.create("a", {id : resp.Children[0].Id + "a", style: "padding: 0px; text-align: left; width: 50px", innerHTML: "Open Commit", href: commitPageURL }, dojo.byId(resp.Children[0].Id + "divCommands"));
- dojo.byId("open commit from existing repositoryTitle").innerHTML = "Open Commit";
+ dojo.byId("open commit from existing repositoryTitle").innerHTML = "The commit can be found on the following repositories";
+ dojo.byId("commitDiv").style.display = " block ";
+ dojo.byId("moreOptionsDiv").style.display = " block ";
+ dojo.empty(dojo.byId("instruction"));
+ var text2 = "You are trying to review contribution " + sha + " from " + url1;
+ dojo.create("span", {"class" : "gitSecondaryDescription", innerHTML : text2}, dojo.byId("instruction"));
var tooltipDialog = new orion.git.widgets.CommitTooltipDialog({
commit: that.currentCommit.Children[0],
@@ -236,7 +258,22 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
dojo.create("a", {id : resp.Children[0].Id, style: "padding: 0px; text-align: left; display: inline-block; width: 150px", innerHTML: resp.Children[0].Name + " " , href: repoURL }, dojo.byId(resp.Children[0].Id + "div"));
dojo.create("span", {class: "gitSecondaryDescription", innerHTML: "location: " + repositories[0].Content.Path},dojo.byId(resp.Children[0].Id + "div"));
that.commandService.renderCommands("fetch", dojo.byId(resp.Children[0].Id + "divCommands"), remotes.Children[index], that, "tool");
- dojo.byId("fetch sectionTitle").innerHTML = "Fetch from repository with the remote attached";
+ dojo.byId("fetch sectionTitle").innerHTML = "Try to update your repositories";
+ dojo.byId("fetchDiv").style.display = " block ";
+ dojo.empty(dojo.byId("instruction"));
+ var style = dojo.style("commitDiv", "display");
+ var text2;
+ if(style === "block"){
+ dojo.byId("moreOptionsDiv").style.display = " block ";
+ text2 = "You are trying to review contribution " + sha + " from " + url1;
+ }
+ if(style === "none"){
+ text2 = "You are trying to review contribution " + sha + " from " + url1 + " <br><br>Unfortunately the commit can not be found in your workspace. To see it try one of the following: ";
+ dojo.byId("moreOptionsDiv").style.display = " none ";
+ }
+ dojo.create("span", {"class" : "gitSecondaryDescription", innerHTML : text2}, dojo.byId("instruction"));
+
+
}
);
} else {
@@ -247,7 +284,19 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
dojo.create("a", {id : resp.Children[0].Id, style: "padding: 0px; text-align: left; display: inline-block; width: 150px", innerHTML: resp.Children[0].Name + " " , href: repoURL }, dojo.byId(resp.Children[0].Id + "div"));
dojo.create("span", {class: "gitSecondaryDescription", innerHTML: "location: " + repositories[0].Content.Path},dojo.byId(resp.Children[0].Id + "div"));
that.commandService.renderCommands("add", dojo.byId(resp.Children[0].Id + "divCommands"), resp.Children[0], that, "tool", url1);
- dojo.byId("addTitle").innerHTML = "Attach remote " + url1 + " to existing repository and fetch";
+ dojo.byId("addTitle").innerHTML = "Attach the remote to one of existing repositories";
+ dojo.byId("remoteDiv").style.display = " block ";
+ dojo.byId("moreOptionsDiv").style.display = " block ";
+ var style = dojo.style("commitDiv", "display");
+ var text2;
+ if(style === "block"){
+ dojo.byId("moreOptionsDiv").style.display = " block ";
+ text2 = "You are trying to review contribution " + sha + " from " + url1;
+ }
+ if(style === "none"){
+ text2 = "You are trying to review contribution " + sha + " from " + url1 + " <br><br>Unfortunately the commit can not be found in your workspace. To see it try one of the following: ";
+ dojo.byId("moreOptionsDiv").style.display = " none ";
+ }
for(var i=0;i<remotes.Children.length;i++){
dojo.create("div", {}, dojo.byId(resp.Children[0].Id + "div"));
resp.Children[0].RemoteLocation = "/gitapi/remote" + repositories[0].Location;
@@ -255,7 +304,7 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
}
}
- that.renderSections(repositories.slice(1), url1, url2, sha);
+ that.renderSections(repositories.slice(1), url1, url2, sha);
}
);
}
@@ -263,19 +312,19 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section',
}
};
- GitPullRequestExplorer.prototype.initTitleBar = function(commit, url){
- var title = "Pull Request for " + commit + " on " + url;
+ GitReviewRequestExplorer.prototype.initTitleBar = function(commit, url){
+ var title = "Contribution Review Request for " + commit + " on " + url;
var item = {};
item.Name = title;
mGlobalCommands.setPageTarget({
- task: "Pull Request",
+ task: "Contribution Review Request",
breadcrumbTarget: item
});
};
- return GitPullRequestExplorer;
+ return GitReviewRequestExplorer;
}());
return exports;
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/GetPullRequestUrlDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ReviewRequestDialog.js
index 976e234..bbe118c 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/GetPullRequestUrlDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ReviewRequestDialog.js
@@ -13,17 +13,17 @@
/*global define orion window dojo dijit*/
define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'dijit', "orion/util", 'dijit/Dialog', 'dijit/form/TextBox',
- 'orion/widgets/_OrionDialogMixin', 'text!orion/git/widgets/templates/GetPullRequestUrlDialog.html'], function(messages, require, dojo, dijit, mUtil) {
+ 'orion/widgets/_OrionDialogMixin', 'text!orion/git/widgets/templates/ReviewRequestDialog.html'], function(messages, require, dojo, dijit, mUtil) {
/**
- * Usage: <code>new orion.git.widgets.GetPullRequestUrlDialog(options).show();</code>
+ * Usage: <code>new orion.git.widgets.ReviewRequestDialog(options).show();</code>
*
- * @name orion.git.widgets.GetPullRequestUrlDialog
+ * @name orion.git.widgets.ReviewRequestDialog
*/
-var GetPullRequestUrlDialog = dojo.declare("orion.git.widgets.GetPullRequestUrlDialog", [dijit.Dialog, orion.widgets._OrionDialogMixin], //$NON-NLS-0$
- /** @lends orion.git.widgets.GetPullRequestUrlDialog.prototype */ {
+var ReviewRequestDialog = dojo.declare("orion.git.widgets.ReviewRequestDialog", [dijit.Dialog, orion.widgets._OrionDialogMixin], //$NON-NLS-0$
+ /** @lends orion.git.widgets.ReviewRequestDialog.prototype */ {
widgetsInTemplate : true,
- templateString : dojo.cache('orion', 'git/widgets/templates/GetPullRequestUrlDialog.html'), //$NON-NLS-1$ //$NON-NLS-0$
+ templateString : dojo.cache('orion', 'git/widgets/templates/ReviewRequestDialog.html'), //$NON-NLS-1$ //$NON-NLS-0$
SEARCH_DELAY: 500,
timeoutId: null,
@@ -52,7 +52,7 @@ var GetPullRequestUrlDialog = dojo.declare("orion.git.widgets.GetPullRequestUrlD
/** @private */
postCreate: function() {
this.inherited(arguments);
- this.PullReqUrl.set("value", this.options.url);
+ this.ReviewReqUrl.set("value", this.options.url);
},
@@ -61,7 +61,7 @@ var GetPullRequestUrlDialog = dojo.declare("orion.git.widgets.GetPullRequestUrlD
*/
show: function() {
this.inherited(arguments);
- this.PullReqUrl.focus();
+ this.ReviewReqUrl.focus();
},
/** @private */
@@ -77,5 +77,5 @@ var GetPullRequestUrlDialog = dojo.declare("orion.git.widgets.GetPullRequestUrlD
}
});
-return GetPullRequestUrlDialog;
+return ReviewRequestDialog;
});
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/GetPullRequestUrlDialog.html b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ReviewRequestDialog.html
index 190a674..2ff3a37 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/GetPullRequestUrlDialog.html
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ReviewRequestDialog.html
@@ -9,12 +9,12 @@
<div style="display:table">
<div style="display:table-row">
<div style="display:table-cell; padding:5;">
- <label for="PullReqUrl" style="padding-right:10">${selectFile}</label>
+ <label for="ReviewReqUrl" style="padding-right:10">${selectFile}</label>
</div>
</div>
<div style="display:table-row">
<div style="display:table-cell; padding:5;">
- <input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="PullReqUrl"
+ <input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="ReviewReqUrl"
style="width:30em;">
</div>
</div>