summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMark Macdonald2012-10-18 20:43:04 (EDT)
committer skaegi2012-10-18 22:21:40 (EDT)
commitbe9cec66408c85b6f66bbfbe729cb0e077b8d3ea (patch)
treeb30e139a5cddeb9f8b646171eb6e2d1695c0d781
parent44af893ca39e84bc095f6d6669ecb05829cd5870 (diff)
downloadorg.eclipse.orion.client-be9cec66408c85b6f66bbfbe729cb0e077b8d3ea.zip
org.eclipse.orion.client-be9cec66408c85b6f66bbfbe729cb0e077b8d3ea.tar.gz
org.eclipse.orion.client-be9cec66408c85b6f66bbfbe729cb0e077b8d3ea.tar.bz2
Bug 392386 - remove remaining innerHTML uses from dojo.create()
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/operationsTable.js40
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/parameterCollectors.js3
-rw-r--r--bundles/org.eclipse.orion.client.core/web/stringexternalizer/searchExplorer.js12
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js44
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js20
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js33
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ContentDialog.js3
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js13
-rw-r--r--bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js44
9 files changed, 131 insertions, 81 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/operationsTable.js b/bundles/org.eclipse.orion.client.core/web/orion/operationsTable.js
index 5ce4b31..92cda70 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/operationsTable.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/operationsTable.js
@@ -93,19 +93,32 @@ define(['i18n!orion/operations/nls/messages', 'require', 'dojo', 'orion/explore
if (this.options['minimal']) //$NON-NLS-0$
return;
-
+
+ var col, h2;
switch(col_no){
case 0:
- return dojo.create("th", {style: "padding-left: 5px; padding-right: 5px", innerHTML: "<h2>"+messages["Name"]+"</h2>"}); //$NON-NLS-4$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("th", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Name"];
+ return col;
break;
case 1:
- return dojo.create("th", {style: "padding-left: 5px; padding-right: 5px", innerHTML: "<h2>"+messages["Actions"]+"</h2>"}); //$NON-NLS-4$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("th", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Actions"];
+ return col;
break;
case 2:
- return dojo.create("th", {style: "padding-left: 5px; padding-right: 5px", innerHTML: "<h2>"+messages["Status"]+"</h2>"}); //$NON-NLS-4$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("th", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Status"];
+ return col;
break;
case 3:
- return dojo.create("th", {style: "padding-left: 5px; padding-right: 5px", innerHTML: "<h2>"+messages["Scheduled"]+"</h2>"}); //$NON-NLS-4$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("th", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Scheduled"];
+ return col;
break;
}
@@ -132,12 +145,13 @@ define(['i18n!orion/operations/nls/messages', 'require', 'dojo', 'orion/explore
};
OperationsRenderer.prototype.getCellElement = function(col_no, item, tableRow){
+ var col;
switch(col_no){
case 0:
- var col = dojo.create("td", {style: "padding-left: 5px; padding-right: 5px", innerHTML: item.Name}); //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("td", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ col.textContent = item.Name;
var div = dojo.create("div", null, col, "only"); //$NON-NLS-1$ //$NON-NLS-0$
- var span = dojo.create("span", {innerHTML: item.Name, className: "primaryColumn"}, div, "last"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-
+ var span = dojo.create("span", {className: "primaryColumn"}, div, "last"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
dojo.place(document.createTextNode(item.Name), span, "only"); //$NON-NLS-0$
var operationIcon = dojo.create("span", null, div, "first"); //$NON-NLS-1$ //$NON-NLS-0$
@@ -175,13 +189,17 @@ define(['i18n!orion/operations/nls/messages', 'require', 'dojo', 'orion/explore
var message = result.Message || item.Message;
if(result.DetailedMessage && result.DetailedMessage!=="")
message += ": " + result.DetailedMessage; //$NON-NLS-0$
- return dojo.create("td", {style: "padding-left: 5px; padding-right: 5px", innerHTML: message}); //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("td", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ col.textContent = message;
+ return col;
break;
case 3:
if(item.Created && parseInt(item.Created)>0){
- return dojo.create("td", {style: "padding-left: 5px; padding-right: 5px", innerHTML: dojo.date.locale.format( //$NON-NLS-1$ //$NON-NLS-0$
+ col = dojo.create("td", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
+ col.textContent = dojo.date.locale.format(
new Date(parseInt(item.Created)),
- {selector: "datetime", formatLength: "medium"})}); //$NON-NLS-1$ //$NON-NLS-0$
+ {selector: "datetime", formatLength: "medium"}); //$NON-NLS-1$ //$NON-NLS-0$
+ return col;
}
return dojo.create("td", {style: "padding-left: 5px; padding-right: 5px"}); //$NON-NLS-1$ //$NON-NLS-0$
}
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/parameterCollectors.js b/bundles/org.eclipse.orion.client.core/web/orion/parameterCollectors.js
index 2009c1a..3ad7811 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/parameterCollectors.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/parameterCollectors.js
@@ -190,7 +190,8 @@ define(['i18n!orion/nls/messages', 'require', 'dojo', 'dijit', 'dijit/Menu', 'di
});
commandInvocation.parameters.forEach(function(parm) {
if (parm.label) {
- dojo.create("label", {innerHTML: parm.label, "class": "parameterInput", "for": parm.name + "parameterCollector"}, parameterArea, "last"); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var label = dojo.create("label", {"class": "parameterInput", "for": parm.name + "parameterCollector"}, parameterArea, "last"); //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ label.textContent = parm.label;
}
var options = {type: parm.type, id: parm.name + "parameterCollector"}; //$NON-NLS-0$
var field;
diff --git a/bundles/org.eclipse.orion.client.core/web/stringexternalizer/searchExplorer.js b/bundles/org.eclipse.orion.client.core/web/stringexternalizer/searchExplorer.js
index 9d67c1e..4110fbc 100644
--- a/bundles/org.eclipse.orion.client.core/web/stringexternalizer/searchExplorer.js
+++ b/bundles/org.eclipse.orion.client.core/web/stringexternalizer/searchExplorer.js
@@ -237,12 +237,18 @@ define(['i18n!orion/stringexternalizer/nls/messages', 'require', 'dojo', 'dijit'
};
SearchResultRenderer.prototype.getCellHeaderElement = function(col_no){
+ var col = dojo.create("th"); //$NON-NLS-0$
+ var h2;
if(col_no === 1){
- return dojo.create("th", {innerHTML: "<h2>"+messages["Files to externalize"]+"</h2>"}); //$NON-NLS-3$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Files to externalize"];
+ return col;
} else if(col_no === 2){
- return dojo.create("th", {innerHTML: "<h2>"+messages["Location"]+"</h2>"}); //$NON-NLS-3$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2 = dojo.create("h2", null, col); //$NON-NLS-0$
+ h2.textContent = messages["Location"];
+ return col;
} else if(col_no === 0){
- return dojo.create("th", {innerHTML: ""}); //$NON-NLS-0$
+ return col;
}
};
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
index 8c4bcc6..0ae1424 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitRepositoryExplorer.js
@@ -504,7 +504,8 @@ exports.GitRepositoryExplorer = (function() {
workspaceState = messages["You have changes to commit in your workspace!"]
var detailsView = dojo.create( "div", { "class":"vbox stretch details-view"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: workspaceState}, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription"}, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = workspaceState;
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -592,7 +593,8 @@ exports.GitRepositoryExplorer = (function() {
if (branch.Current)
dojo.create( "span", { "class":"sectionIcon gitImageSprite git-sprite-branch_active" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription " + (branch.Current ? "activeBranch" : ""), innerHTML: branch.Name }, detailsView ); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription " + (branch.Current ? "activeBranch" : "") }, detailsView ); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = branch.Name;
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
var commit = branch.Commit.Children[0];
@@ -600,10 +602,9 @@ exports.GitRepositoryExplorer = (function() {
var tracksMessage = ((branch.RemoteLocation.length == 1 && branch.RemoteLocation[0].Children.length == 1) ?
dojo.string.substitute(messages["tracks ${0}, "], [branch.RemoteLocation[0].Children[0].Name]) : messages["tracks no branch, "]);
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: tracksMessage
- + dojo.string.substitute(messages["last modified ${0} by ${1}"], [dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"}), //$NON-NLS-1$
- commit.AuthorName])}, detailsView );
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = tracksMessage + dojo.string.substitute(messages["last modified ${0} by ${1}"], [dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"}), //$NON-NLS-0$
+ commit.AuthorName]);
var actionsArea = dojo.create( "div", {"id":"branchActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this.commandService.renderCommands(this.actionScopeId, actionsArea, branch, this, "tool"); //$NON-NLS-0$
@@ -703,7 +704,8 @@ exports.GitRepositoryExplorer = (function() {
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"vbox stretch details-view"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: remoteBranch.Name }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = remoteBranch.Name;
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
var actionsArea = dojo.create( "div", {"id":"branchActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -842,11 +844,12 @@ exports.GitRepositoryExplorer = (function() {
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: messages["The branch is up to date."]}, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = messages["The branch is up to date."];
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages["You have no outgoing or incoming commits."]}, detailsView );
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = messages["You have no outgoing or incoming commits."];
};
GitRepositoryExplorer.prototype.renderCommit = function(commit, outgoing, index, container){
@@ -910,9 +913,9 @@ exports.GitRepositoryExplorer = (function() {
});
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages[" (SHA "] + commit.Name + messages[") by "] + commit.AuthorName
- + " on " + dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})}, detailsView ); //$NON-NLS-1$ //$NON-NLS-0$
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = messages[" (SHA "] + commit.Name + messages[") by "] + commit.AuthorName
+ + " on " + dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"});
var actionsArea = dojo.create( "div", {"id":"branchActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this.commandService.renderCommands(this.actionScopeId, actionsArea, commit, this, "tool"); //$NON-NLS-0$
@@ -997,7 +1000,8 @@ exports.GitRepositoryExplorer = (function() {
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: tags[i].Name }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = tags[i].Name;
this.explorer.progressIndicators[i] = new this.explorer.progressIndicator(i, title);
@@ -1123,10 +1127,12 @@ exports.GitRepositoryExplorer = (function() {
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: remote.Name }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = remote.Name;
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", innerHTML: remote.GitUrl}, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = remote.GitUrl;
var actionsArea = dojo.create( "div", {"id":"remoteActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this.commandService.renderCommands(this.actionScopeId, actionsArea, remote, this, "tool"); //$NON-NLS-0$
@@ -1196,8 +1202,10 @@ exports.GitRepositoryExplorer = (function() {
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- dojo.create( "span", { "class":"gitMainDescription", innerHTML: configEntry.Key }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- dojo.create( "span", { "class":"gitSecondaryDescription", "style":"margin-left:20px", innerHTML: configEntry.Value}, detailsView ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var keySpan = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ keySpan.textContent = configEntry.Key;
+ var valueSpan = dojo.create( "span", { "class":"gitSecondaryDescription", "style":"margin-left:20px" }, detailsView ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ valueSpan.textContent = configEntry.Value;
var actionsArea = dojo.create( "div", {"id":"configActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this.commandService.renderCommands(this.actionScopeId, actionsArea, configEntry, this, "tool"); //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
index 17afead..573ad9d 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitStatusExplorer.js
@@ -409,7 +409,8 @@ define(['i18n!git/nls/gitmessages', 'dojo', 'orion/explorers/explorer', 'orion/s
dojo.create( "span", { "class":"gitImageSprite " + that._model.getClass(item.type)}, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var itemLabel = dojo.create( "span", { "class":"gitMainDescription", innerHTML: item.name }, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var itemLabel = dojo.create( "span", { "class":"gitMainDescription" }, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ itemLabel.textContent = item.name;
return td;
} else {
var td = document.createElement("td"); //$NON-NLS-0$
@@ -606,8 +607,8 @@ define(['i18n!git/nls/gitmessages', 'dojo', 'orion/explorers/explorer', 'orion/s
dojo.create( "span", { "class":"gitImageSprite " + that._model.getClass(item.type)}, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var itemLabel = dojo.create( "span", { "class":"gitMainDescription", innerHTML: item.name }, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-
+ var itemLabel = dojo.create( "span", { "class":"gitMainDescription" }, div ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ itemLabel.textContent = item.name;
return td;
} else {
var td = document.createElement("td"); //$NON-NLS-0$
@@ -814,11 +815,12 @@ define(['i18n!git/nls/gitmessages', 'dojo', 'orion/explorers/explorer', 'orion/s
var horizontalBox = dojo.create( "div", null, extensionListItem ); //$NON-NLS-0$
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- var title = dojo.create( "span", { "class":"gitMainDescription", innerHTML: messages['The branch is up to date.']}, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var title = dojo.create( "span", { "class":"gitMainDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ title.textContent = messages['The branch is up to date.'];
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages['You have no outgoing or incoming commits.']}, detailsView );
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = messages['You have no outgoing or incoming commits.'];
};
GitStatusExplorer.prototype.renderCommit = function(commit, outgoing, index){
@@ -882,9 +884,9 @@ define(['i18n!git/nls/gitmessages', 'dojo', 'orion/explorers/explorer', 'orion/s
});
dojo.create( "div", null, detailsView ); //$NON-NLS-0$
- var description = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: " (SHA " + commit.Name + ") by " + commit.AuthorName //$NON-NLS-1$ //$NON-NLS-0$
- + " on " + dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})}, detailsView ); //$NON-NLS-1$ //$NON-NLS-0$
+ var description = dojo.create( "span", { "class":"gitSecondaryDescription" }, detailsView ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ description.textContent = " (SHA " + commit.Name + ") by " + commit.AuthorName //$NON-NLS-1$ //$NON-NLS-0$
+ + " on " + dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"}); //$NON-NLS-0$
var actionsArea = dojo.create( "div", {"id":"branchActionsArea", "class":"sectionTableItemActions" }, horizontalBox ); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
this.commandService.renderCommands(this.actionScopeId, actionsArea, commit, this, "tool"); //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
index c5f839d..f6494e0 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
@@ -47,24 +47,25 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'dijit', 'dijit/TooltipDi
dojo.place(image, authorImage, "first"); //$NON-NLS-0$
}
- dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: dojo.string.substitute(messages[" authored by ${0} {${1}) on ${2}"], [commit.AuthorName, commit.AuthorEmail,
- dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})])}, textDiv ); //$NON-NLS-0$
+ var authoredBySpan = dojo.create( "span", { "class":"gitSecondaryDescription" }, textDiv ); //$NON-NLS-1$ //$NON-NLS-0$
+ authoredBySpan.textContent = dojo.string.substitute(messages[" authored by ${0} {${1}) on ${2}"], [commit.AuthorName, commit.AuthorEmail,
+ dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})]); //$NON-NLS-0$
dojo.create( "div", null, textDiv ); //$NON-NLS-0$
- dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: dojo.string.substitute(messages['committed by 0 (1)'], [commit.CommitterName, commit.CommitterEmail])}, textDiv );
+ var committedBySpan = dojo.create( "span", { "class":"gitSecondaryDescription" }, textDiv ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ committedBySpan.textContent = dojo.string.substitute(messages['committed by 0 (1)'], [commit.CommitterName, commit.CommitterEmail]);
dojo.create( "div", {"style":"padding-top:15px"}, textDiv ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- dojo.create( "span", {"class": "gitSecondaryDescription", innerHTML: messages[" commit: "] + commit.Name}, textDiv ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var commitNameSpan = dojo.create( "span", {"class": "gitSecondaryDescription"}, textDiv ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commitNameSpan.textContent = messages[" commit: "] + commit.Name;
if (commit.Parents && commit.Parents.length > 0){
dojo.create( "div", null, textDiv ); //$NON-NLS-0$
link = dojo.create("a", {"class": "gitSecondaryDescription", href: "/git/git-commit.html#" + commit.Parents[0].Location + "?page=1&pageSize=1"}, textDiv); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
dojo.place(document.createTextNode(commit.Parents[0].Name), link);
- var parentNode = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages["parent: "]}, textDiv );
+ var parentNode = dojo.create( "span", { "class":"gitSecondaryDescription" }, textDiv ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ parentNode.textContent = messages["parent: "];
dojo.place(link, parentNode, "last");
}
@@ -75,26 +76,28 @@ define(['i18n!git/nls/gitmessages', 'require', 'dojo', 'dijit', 'dijit/TooltipDi
if(displayBranches){
dojo.create( "div", {"style":"padding-top:15px"}, textDiv );
var branchesSection = dojo.create("section", {"style" : "display: inline-block; vertical-align:text-top;"}, textDiv);
- var branchesNode = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages["branches: "]}, branchesSection );
-
+ var branchesNode = dojo.create( "span", { "class":"gitSecondaryDescription" }, branchesSection ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ branchesNode.textContent = messages["branches: "];
+
var branchesList = dojo.create( "list", null, branchesSection);
for(var i=0; i<commit.Branches.length; ++i){
- dojo.create("span", {"class":"gitSecondaryDescription", "style" : "padding-left:10px;", innerHTML: commit.Branches[i].FullName}, branchesList);
+ var branchNameSpan = dojo.create("span", {"class":"gitSecondaryDescription", "style" : "padding-left:10px;"}, branchesList);
+ branchNameSpan.textContent = commit.Branches[i].FullName;
}
}
if(displayTags){
dojo.create( "div", {"style":"padding-top:15px"}, textDiv );
var tagsSection = dojo.create("section", {"style" : "display: inline-block; vertical-align:text-top;"}, textDiv);
- var tagsNode = dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: messages["tags: "]}, tagsSection );
+ var tagsNode = dojo.create( "span", { "class":"gitSecondaryDescription" }, tagsSection ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ tagsNode.textContent = messages["tags: "];
var tagsList = dojo.create( "list", null, tagsSection);
for(var i=0; i<commit.Tags.length; ++i){
- dojo.create("span", {"class":"gitSecondaryDescription", "style" : "padding-left:10px;", innerHTML: commit.Tags[i].Name}, tagsList);
+ var tagNameSpan = dojo.create("span", {"class":"gitSecondaryDescription", "style" : "padding-left:10px;"}, tagsList);
+ tagNameSpan.textContent = commit.Tags[i].Name;
}
}
},
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ContentDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ContentDialog.js
index 86e234f..ac46a85 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ContentDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ContentDialog.js
@@ -40,7 +40,8 @@ dojo.declare("orion.git.widgets.ContentDialog", [ dijit.Dialog, orion.widgets._O
for (var i=0;i<sections.length;i++){
var currentSection = sections[i];
dojo.create("li", {id : currentSection.id + "Span" }, sectionsDiv); //$NON-NLS-1$ //$NON-NLS-0$
- var ahref = dojo.create("a", { href: window.location.href, title: dojo.string.substitute(messages["Go to ${0} section"], [currentSection.id]), innerHTML: currentSection.id + "\n"}, currentSection.id + "Span"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-0$
+ var ahref = dojo.create("a", { href: window.location.href, title: dojo.string.substitute(messages["Go to ${0} section"], [currentSection.id])}, currentSection.id + "Span"); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-0$
+ ahref.textContent = currentSection.id + "\n";
dojo.connect(ahref, 'onclick', dojo.hitch(currentSection, function() { //$NON-NLS-0$
this.scrollIntoView(true);
that.hide();
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
index 6e5042a..0ce262a 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
@@ -154,7 +154,8 @@ var OpenCommitDialog = dojo.declare("orion.git.widgets.OpenCommitDialog", [dijit
}));
dojo.create( "div", {"style":"padding-top:15px"}, tableNode ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- dojo.create( "span", {"class": "gitSecondaryDescription", innerHTML: messages[' commit: '] + commit.Name}, tableNode ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ var commitSpan = dojo.create( "span", {"class": "gitSecondaryDescription"}, tableNode ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ commitSpan.textContent = messages[' commit: '] + commit.Name;
if (commit.Parents && commit.Parents.length > 0){
dojo.create( "div", null, tableNode ); //$NON-NLS-0$
@@ -179,12 +180,12 @@ var OpenCommitDialog = dojo.declare("orion.git.widgets.OpenCommitDialog", [dijit
dojo.place(image, authorImage, "first"); //$NON-NLS-0$
}
- dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: dojo.string.substitute(messages[" authored by ${0} (${1})) on ${2}"], [commit.AuthorName , commit.AuthorEmail,
- dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})])}, tableNode ); //$NON-NLS-0$
+ var authoredBySpan = dojo.create( "span", { "class":"gitSecondaryDescription" }, tableNode ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ authoredBySpan.textContent = dojo.string.substitute(messages[" authored by ${0} (${1})) on ${2}"], [commit.AuthorName , commit.AuthorEmail,
+ dojo.date.locale.format(new Date(commit.Time), {formatLength: "short"})]); //$NON-NLS-0$
dojo.create( "div", null, tableNode ); //$NON-NLS-0$
- dojo.create( "span", { "class":"gitSecondaryDescription", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- innerHTML: dojo.string.substitute(messages['committed by 0 (1)'], [commit.CommitterName, commit.CommitterEmail])}, tableNode );
+ var committedBySpan = dojo.create( "span", { "class":"gitSecondaryDescription" }, tableNode ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ committedBySpan.textContent = dojo.string.substitute(messages['committed by 0 (1)'], [commit.CommitterName, commit.CommitterEmail]);
},
/**
diff --git a/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js b/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
index 10413ed..c9a0250 100644
--- a/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
+++ b/bundles/org.eclipse.orion.client.users/web/orion/profile/UsersList.js
@@ -125,18 +125,22 @@ eclipse.UsersRenderer = (function() {
UsersRenderer.prototype = new mExplorer.SelectionRenderer();
UsersRenderer.prototype.getCellHeaderElement = function(col_no){
-
+ var col = dojo.create("th"); //$NON-NLS-0$
+ var h2 = dojo.create("h2", null, col); //$NON-NLS-0$
switch(col_no){
case 0:
- return dojo.create("th", {innerHTML: "<h2>"+messages["Login"]+"</h2>"}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2.textContent = messages["Login"];
+ return col;
case 1:
- return dojo.create("th", {innerHTML: "<h2>"+messages["Actions"]+"</h2>"}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2.textContent = messages["Actions"];
+ return col;
case 2:
- return dojo.create("th", {innerHTML: "<h2>"+messages["Name"]+"</h2>"}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2.textContent = messages["Name"];
+ return col;
case 3:
- return dojo.create("th", {innerHTML: "<h2>"+messages["Last Login"]+"</h2>"}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ h2.textContent = messages["Last Login"];
+ return col;
}
-
};
UsersRenderer.prototype.getCellElement = function(col_no, item, tableRow){
@@ -191,23 +195,29 @@ eclipse._UsersList = (function() {
var thead = dojo.create("thead"); //$NON-NLS-0$
var titleRow = dojo.create("tr", {"class": "domCommandBackground"}, thead); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
- dojo.create("td", { //$NON-NLS-0$
- innerHTML : "<h2>"+messages['Login']+"</h2>", //$NON-NLS-1$ //$NON-NLS-0$
+ var loginTd = dojo.create("td", { //$NON-NLS-0$
className : "usersTable" //$NON-NLS-0$
}, titleRow);
- dojo.create("td", { //$NON-NLS-0$
- innerHTML : "<h2>"+messages['Actions']+"</h2>", //$NON-NLS-1$ //$NON-NLS-0$
+ var loginH2 = dojo.create("h2", null, loginTd); //$NON-NLS-0$
+ loginH2.textContent = messages['Login'];
+
+ var actionsTd = dojo.create("td", { //$NON-NLS-0$
className : "usersTable" //$NON-NLS-0$
}, titleRow);
- dojo.create("td", { //$NON-NLS-0$
- innerHTML : "<h2>"+messages['Name']+"</h2>", //$NON-NLS-1$ //$NON-NLS-0$
+ var actionsH2 = dojo.create("h2", null, actionsTd); //$NON-NLS-0$
+ actionsH2.textContent = messages['Actions'];
+
+ var nameTd = dojo.create("td", { //$NON-NLS-0$
className : "usersTable" //$NON-NLS-0$
}, titleRow);
- dojo.create("td", { //$NON-NLS-0$
- innerHTML : "<h2>"+messages['Last Login']+"</h2>", //$NON-NLS-1$ //$NON-NLS-0$
+ var nameH2 = dojo.create("h2", null, nameTd); //$NON-NLS-0$
+ nameH2.textContent = messages['Name'];
+
+ var lastLoginTd = dojo.create("td", { //$NON-NLS-0$
className : "usersTable" //$NON-NLS-0$
}, titleRow);
-
+ var lastLoginH2 = dojo.create("h2", null, lastLoginTd); //$NON-NLS-0$
+ lastLoginH2.textContent = messages['Last Login'];
dojo.place(thead, table);
dojo.place(table, this.parent);
@@ -243,10 +253,10 @@ eclipse._UsersList = (function() {
className: "usersTable secondaryColumn" //$NON-NLS-0$
}, userRow);
userNameCell.textContent = jsonData.users[i].Name ? jsonData.users[i].Name : ' '; //$NON-NLS-0$
- dojo.create("td", { //$NON-NLS-0$
- innerHTML : jsonData.users[i].LastLogInTimestamp ? dojo.date.locale.format(new Date(parseInt(jsonData.users[i].LastLogInTimestamp, 10)), {formatLength: "short"}) : '&nbsp;', //$NON-NLS-1$ //$NON-NLS-0$
+ var lastLoginCell = dojo.create("td", { //$NON-NLS-0$
className: "usersTable secondaryColumn" //$NON-NLS-0$
}, userRow);
+ lastLoginCell.textContent = jsonData.users[i].LastLogInTimestamp ? dojo.date.locale.format(new Date(parseInt(jsonData.users[i].LastLogInTimestamp, 10)), {formatLength: "short"}) : '&nbsp;'; //$NON-NLS-1$ //$NON-NLS-0$
dojo.place(userRow, tbody);
}
}));