Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 371400 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/gitCommitInfo.js (-4 / +28 lines)
Lines 102-112 Link Here
102
			var detailsDiv = document.createElement("td"); //$NON-NLS-0$
102
			var detailsDiv = document.createElement("td"); //$NON-NLS-0$
103
			detailsDiv.className = "gitCommitDetailsCell"; //$NON-NLS-0$
103
			detailsDiv.className = "gitCommitDetailsCell"; //$NON-NLS-0$
104
			row.appendChild(detailsDiv);
104
			row.appendChild(detailsDiv);
105
	
105
106
			var headerMessage = util.trimCommitMessage(commit.Message);
106
			var headerMessage = util.trimCommitMessage(commit.Message);
107
			var headerMessageSplit = headerMessage.split(" ");
108
			var bugID ="null";
109
			if(headerMessageSplit[0] === "Bug"){
110
				bugID = headerMessageSplit[1];
111
			}
112
107
			var displayMessage = this.showMessage === undefined || this.showMessage;
113
			var displayMessage = this.showMessage === undefined || this.showMessage;
108
			if (displayMessage) {
114
			if (displayMessage) {
109
				var link;
115
				var link;
116
				
110
				if (this.commitLink) {
117
				if (this.commitLink) {
111
					link = document.createElement("a"); //$NON-NLS-0$
118
					link = document.createElement("a"); //$NON-NLS-0$
112
					link.className = "navlinkonpage"; //$NON-NLS-0$
119
					link.className = "navlinkonpage"; //$NON-NLS-0$
Lines 122-139 Link Here
122
				if (headerMessage.length < commit.Message.length) {
129
				if (headerMessage.length < commit.Message.length) {
123
					 text += "..."; //$NON-NLS-0$
130
					 text += "..."; //$NON-NLS-0$
124
				}
131
				}
132
				
125
				link.appendChild(document.createTextNode(text));
133
				link.appendChild(document.createTextNode(text));
126
				detailsDiv.appendChild(link);
134
				if(bugID !== "null"){
135
					//This leads to a conflict when commitLink is true and bugID is not "null": 
136
					//it will ignore the commitLink and just add the bugzilla link. 
137
					//(I also don't know which one we should display in this case)
138
					this.registry.getService("orion.core.textlink").addLinks(text, detailsDiv);
139
				} else {
140
					detailsDiv.appendChild(link);
141
				}		
127
			}
142
			}
128
			if (this.fullMessage && (this.onlyFullMessage || headerMessage.length < commit.Message.length)) {
143
			if (this.fullMessage && (this.onlyFullMessage || headerMessage.length < commit.Message.length)) {
129
				var fullMessage = document.createElement("div"); //$NON-NLS-0$
144
				var fullMessage = document.createElement("div"); //$NON-NLS-0$
130
				fullMessage.className = "gitCommitFullMessage"; //$NON-NLS-0$
145
				fullMessage.className = "gitCommitFullMessage"; //$NON-NLS-0$
131
				if (this.simple) {
146
				if (this.simple) {
132
					fullMessage.textContent = commit.Message;
147
					if(bugID !== "null"){
148
						this.registry.getService("orion.core.textlink").addLinks(commit.Message, fullMessage);
149
					} else {
150
						fullMessage.textContent = commit.Message;	
151
					}
133
				} else {
152
				} else {
134
					var headerSpan = document.createElement("span"); //$NON-NLS-0$
153
					var headerSpan = document.createElement("span"); //$NON-NLS-0$
135
					headerSpan.className = "gitCommitTitle"; //$NON-NLS-0$
154
					headerSpan.className = "gitCommitTitle"; //$NON-NLS-0$
136
					headerSpan.textContent = headerMessage;
155
					if(bugID !== "null"){
156
						this.registry.getService("orion.core.textlink").addLinks(headerMessage, headerSpan);
157
					} else {
158
						headerSpan.textContent = headerMessage;
159
					}
137
					fullMessage.appendChild(headerSpan);
160
					fullMessage.appendChild(headerSpan);
138
					var restSpan = document.createElement("span"); //$NON-NLS-0$
161
					var restSpan = document.createElement("span"); //$NON-NLS-0$
139
					restSpan.textContent = commit.Message.substring(headerMessage.length);
162
					restSpan.textContent = commit.Message.substring(headerMessage.length);
Lines 144-149 Link Here
144
				}
167
				}
145
				detailsDiv.appendChild(fullMessage);
168
				detailsDiv.appendChild(fullMessage);
146
			}
169
			}
170
147
			
171
			
148
			var displayAuthor = this.showAuthor === undefined || this.showAuthor;
172
			var displayAuthor = this.showAuthor === undefined || this.showAuthor;
149
			var displayCommitter = this.showCommitter === undefined || this.showCommitter;
173
			var displayCommitter = this.showCommitter === undefined || this.showCommitter;
(-)a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/gitCommitList.js (+2 lines)
Lines 1140-1145 Link Here
1140
						showAuthor: false,
1140
						showAuthor: false,
1141
						showParentLink: false
1141
						showParentLink: false
1142
					});
1142
					});
1143
					info.registry = this.explorer.registry;
1143
					info.display();
1144
					info.display();
1144
					horizontalBox.appendChild(commitDetails);
1145
					horizontalBox.appendChild(commitDetails);
1145
1146
Lines 1270-1275 Link Here
1270
						showMore: true,
1271
						showMore: true,
1271
						simple: simple
1272
						simple: simple
1272
					});
1273
					});
1274
					commitInfo.registry = this.explorer.registry;
1273
					commitInfo.display();
1275
					commitInfo.display();
1274
					
1276
					
1275
					commitInfo.moreButton.addEventListener("click", function() { //$NON-NLS-0$
1277
					commitInfo.moreButton.addEventListener("click", function() { //$NON-NLS-0$

Return to bug 371400