Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 211092 Details for
Bug 370168
visual polish for git commit page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix v1
clipboard.txt (text/plain), 4.04 KB, created by
Szymon Brandys
on 2012-02-16 05:24:44 EST
(
hide
)
Description:
Fix v1
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2012-02-16 05:24:44 EST
Size:
4.04 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-commit.css b/bundles/org.eclipse.orion.client.git/web/git/git-commit.css >index ba5c354..208d8f1 100644 >--- a/bundles/org.eclipse.orion.client.git/web/git/git-commit.css >+++ b/bundles/org.eclipse.orion.client.git/web/git/git-commit.css >@@ -110,4 +110,6 @@ > background-color: #fdfdfd; > border: 1px solid #ebebeb; > font-family: Courier,"Courier New"; >+ white-space: pre-wrap; >+ width: 60% > } >diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js >index 339c6d7..7d13250 100644 >--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js >+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommitExplorer.js >@@ -162,29 +162,22 @@ > > var extensionListItem = dojo.create( "div", { "class":"git-list-item" }, list ); > var horizontalBox = dojo.create( "div", null, extensionListItem ); >- var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); >+ var detailsView = dojo.create( "div", null, horizontalBox ); > >- var cut = false; >- var commitMessage0 = commit.Message.split(/(\r?\n|$)/)[0]; >- if (commitMessage0.length > 80){ >- cut = true; >- commitMessage0 = commitMessage0.substring(0, 80); >- }; >+ var commitMessages = this._splitCommitMessage(commit.Message); > > var div = dojo.create( "div", null, detailsView ); >- dojo.create( "span", { "class":"gitMainDescription", innerHTML: commitMessage0 + (cut ? "..." : "") }, div ); >+ dojo.create( "span", { "class":"gitMainDescription", innerHTML: commitMessages[0] }, div ); > > dojo.create( "div", {"style":"padding-top:15px"}, detailsView ); > >- var commitMessage1 = commit.Message.substring(commitMessage0.length, commit.Message.length); >- >- if (commitMessage1.trim().length > 0){ >+ if (commitMessages[1] !== null){ > div = dojo.create( "pre", null, detailsView ); >- dojo.place(document.createTextNode(cut ? "..." + commitMessage1 : commitMessage1.trim()), div); >+ dojo.place(document.createTextNode(commitMessages[1]), div); > dojo.create( "div", {"style":"padding-top:15px"}, detailsView ); > } > >- dojo.create( "span", { "class":"gitSecondaryDescription", innerHTML: " commit: " + commit.Name}, detailsView ); >+ dojo.create( "span", { "class":"gitSecondaryDescription", innerHTML: "commit: " + commit.Name}, detailsView ); > > if (commit.Parents && commit.Parents.length > 0){ > dojo.create( "div", null, detailsView ); >@@ -209,7 +202,7 @@ > } > > dojo.create( "span", { "class":"gitSecondaryDescription", >- innerHTML: " authored by " + commit.AuthorName + " (" + commit.AuthorEmail >+ innerHTML: "authored by " + commit.AuthorName + " (" + commit.AuthorEmail > + ") on " + dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})}, detailsView ); > > dojo.create( "div", null, detailsView ); >@@ -217,6 +210,29 @@ > innerHTML: "committed by " + commit.CommitterName + " (" + commit.CommitterEmail + ")"}, detailsView ); > }; > >+ GitCommitExplorer.prototype._splitCommitMessage = function(commitMessage){ >+ var cut = false; >+ var mainMessageMaxLength = 100; >+ >+ var commitMessage0 = commitMessage.split(/(\r?\n|$)/)[0].trim(); >+ if (commitMessage0.length > mainMessageMaxLength){ >+ var cutPoint = commitMessage0.indexOf(" ", mainMessageMaxLength - 10); >+ commitMessage0 = commitMessage0.substring(0, (cutPoint !== -1 ? cutPoint : mainMessageMaxLength)); >+ cut = true; >+ }; >+ >+ var commitMessage1 = commitMessage.substring(commitMessage0.length + 1, commitMessage.length).trim(); >+ if (commitMessage1.length > 0){ >+ commitMessage1 = (cut ? "..." + commitMessage1 : commitMessage1); >+ } else { >+ commitMessage1 = null; >+ } >+ >+ commitMessage0 += (cut ? "..." : ""); >+ >+ return [commitMessage0, commitMessage1]; >+ }; >+ > // Git diffs > > GitCommitExplorer.prototype.displayDiffs = function(commit){
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 370168
:
210285
|
210366
|
210367
|
210368
|
210493
|
210494
| 211092