You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/03/11 16:11:05 UTC
[28/50] [abbrv] git commit: `innerText` is not a standard (DOM) spec.
`innerText` is not a standard (DOM) spec.
Use `innerHTML` instead, as some browsers may not support `innerText`.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/70d5836e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/70d5836e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/70d5836e
Branch: refs/heads/master
Commit: 70d5836e6fa387f373fb5804a16b0d6a12aab7ab
Parents: d0ae10a
Author: Brent Lintner <br...@gmail.com>
Authored: Thu Dec 13 21:18:20 2012 -0500
Committer: Brent Lintner <br...@gmail.com>
Committed: Wed Feb 6 16:46:27 2013 -0500
----------------------------------------------------------------------
.../platform/webworks.bb10/1.0.0/context-menu.js | 2 +-
lib/client/ui/plugins/context-menu.js | 4 +-
lib/client/ui/plugins/deviceSettings.js | 10 +++---
lib/client/ui/plugins/geoView.js | 22 +++++++-------
lib/client/ui/plugins/platform.js | 8 +++---
lib/client/ui/plugins/platformEvents.js | 4 +-
lib/client/ui/plugins/push.js | 2 +-
lib/client/ui/plugins/videoPlayer.js | 6 ++--
lib/client/ui/plugins/widgetConfig.js | 2 +-
lib/client/utils.js | 2 +-
10 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/platform/webworks.bb10/1.0.0/context-menu.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/webworks.bb10/1.0.0/context-menu.js b/lib/client/platform/webworks.bb10/1.0.0/context-menu.js
index 6ec8d3e..f93f1b3 100644
--- a/lib/client/platform/webworks.bb10/1.0.0/context-menu.js
+++ b/lib/client/platform/webworks.bb10/1.0.0/context-menu.js
@@ -41,7 +41,7 @@ var _self,
function generateMenuItems(menuItems) {
var items = [],
- extensionUrl = document.getElementById('extension-url').innerText,
+ extensionUrl = document.getElementById('extension-url').innerHTML,
imagePath = 'images/webworks/bb10/',
hasCancel = false,
i;
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/context-menu.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/context-menu.js b/lib/client/ui/plugins/context-menu.js
index 0694577..9dcbe6f 100644
--- a/lib/client/ui/plugins/context-menu.js
+++ b/lib/client/ui/plugins/context-menu.js
@@ -305,7 +305,7 @@ function handleMouseDown(evt) {
function setHeadText(text) {
var headTextElement = document.getElementById('contextMenuHeadText');
- headTextElement.innerText = text;
+ headTextElement.innerHTML = text;
if (text) {
if (!subheadText || subheadText === '') {
@@ -323,7 +323,7 @@ function setHeadText(text) {
function setSubheadText(text) {
var subheadTextElement = document.getElementById('contextMenuSubheadText');
- subheadTextElement.innerText = text;
+ subheadTextElement.innerHTML = text;
if (text) {
if (!headText || headText === '') {
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/deviceSettings.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/deviceSettings.js b/lib/client/ui/plugins/deviceSettings.js
index 57f92f9..1f8e35e 100644
--- a/lib/client/ui/plugins/deviceSettings.js
+++ b/lib/client/ui/plugins/deviceSettings.js
@@ -86,7 +86,7 @@ function _buildDOMNode(setting, settingType, key) {
});
}
- domNode = _appendSettingNode(utils.createElement("span", {"innerText": setting.name, "class": constants.UI.TEXT_LABEL_CLASS}), settingsNode, domNodeLabel);
+ domNode = _appendSettingNode(utils.createElement("span", {"innerHTML": setting.name, "class": constants.UI.TEXT_LABEL_CLASS}), settingsNode, domNodeLabel);
jNode = jQuery(settingsNode);
jNode.addClass(constants.UI.JQUERY_UI_INPUT_CLASSES);
@@ -126,20 +126,20 @@ function _buildDOMNode(setting, settingType, key) {
utils.forEach(setting.options, function (value, option) {
jNode.append(utils.createElement("option", {
"value": option,
- "innerText": value
+ "innerHTML": value
}));
});
}
else {
if (domNodeLabel) {
- domNodeLabel.innerText = currentSetting;
+ domNodeLabel.innerHTML = currentSetting;
}
}
jNode.val(currentSetting)
.bind("change", function () {
if (setting.control.type === "range" && domNodeLabel) {
- domNodeLabel.innerText = jQuery(this).val();
+ domNodeLabel.innerHTML = jQuery(this).val();
}
deviceSettings.persist(fullKey, jQuery(this).val());
@@ -178,7 +178,7 @@ module.exports = {
var currentTableNode;
- _contentContainer.appendChild(utils.createElement("h3", { "innerText": settingType }));
+ _contentContainer.appendChild(utils.createElement("h3", { "innerHTML": settingType }));
currentTableNode = utils.createElement("table", {
"class": constants.UI.PANEL_TABLE_CLASS
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/geoView.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/geoView.js b/lib/client/ui/plugins/geoView.js
index 7e25d4b..320f1bd 100644
--- a/lib/client/ui/plugins/geoView.js
+++ b/lib/client/ui/plugins/geoView.js
@@ -38,7 +38,7 @@ function _updateGpsMap() {
}
if (geoZoomValue) {
- geoZoomValue.innerText = _gpsMapZoomLevel;
+ geoZoomValue.innerHTML = _gpsMapZoomLevel;
}
}
@@ -144,7 +144,7 @@ module.exports = {
var headingDeg = parseFloat(heading.value),
headingText = _getTextHeading(parseFloat(heading.value));
- headingLabel.innerText = headingText;
+ headingLabel.innerHTML = headingText;
headingMapLabel.innerHTML = headingText + "</br>" + headingDeg + "°";
mapMarker.setAttribute("style", "-webkit-transform: rotate(" + headingDeg + "deg);");
}
@@ -165,7 +165,7 @@ module.exports = {
accuracy.value = positionInfo.accuracy;
altitudeAccuracy.value = positionInfo.altitudeAccuracy;
cellID.value = positionInfo.cellID;
- delay.value = document.getElementById(GEO_OPTIONS.DELAY_LABEL).innerText = geo.delay || 0;
+ delay.value = document.getElementById(GEO_OPTIONS.DELAY_LABEL).innerHTML = geo.delay || 0;
if (geo.timeout) {
timeout.checked = true;
}
@@ -251,14 +251,14 @@ module.exports = {
if (_timestamp) {
//files recorded with endomondo and others have timestamps, this is not a route plan but a record of a track
- _useTimestamp = new Date(_timestamp.innerText).getTime();
+ _useTimestamp = new Date(_timestamp.innerHTML).getTime();
}
if (t[i - 1]) {
_dist = navUtils.getDistance(att["lat"].value, att["lon"].value, lastAtt["lat"].value, lastAtt["lon"].value);
if (_lastTimestamp) {
- _useLastTimestamp = new Date(_lastTimestamp.innerText).getTime();
+ _useLastTimestamp = new Date(_lastTimestamp.innerHTML).getTime();
}
else {
//routes from YOURS come in as tracks (rather than routes under the GPX schema), but with no timestamps. This is a route.
@@ -281,7 +281,7 @@ module.exports = {
coords: {
latitude: _tempPosition.latitude,
longitude: _tempPosition.longitude,
- altitude: _ele ? _ele.innerText : 0,
+ altitude: _ele ? _ele.innerHTML : 0,
accuracy: 150,
altitudeAccuracy: 80,
heading: _heading,
@@ -297,7 +297,7 @@ module.exports = {
coords: {
latitude: att["lat"].value,
longitude: att["lon"].value,
- altitude: _ele ? _ele.innerText : 0,
+ altitude: _ele ? _ele.innerHTML : 0,
accuracy: 150,
altitudeAccuracy: 80,
heading: _heading,
@@ -317,12 +317,12 @@ module.exports = {
function replayGpxTrack() {
if (_replayingGpxFile) {
_haltGpxReplay = true;
- gpxGo.innerText = constants.GEO.GPXGO_LABELS.GO;
+ gpxGo.innerHTML = constants.GEO.GPXGO_LABELS.GO;
}
else {
if (track.length > 0) {
_haltGpxReplay = false;
- gpxGo.innerText = constants.GEO.GPXGO_LABELS.STOP;
+ gpxGo.innerHTML = constants.GEO.GPXGO_LABELS.STOP;
latitude.value = track[0].coords.latitude;
longitude.value = track[0].coords.longitude;
@@ -384,7 +384,7 @@ module.exports = {
}
else {
_replayingGpxFile = false;
- gpxGo.innerText = constants.GEO.GPXGO_LABELS.GO;
+ gpxGo.innerHTML = constants.GEO.GPXGO_LABELS.GO;
console.log("Ripple :: Finished replaying GPX file (Arriving at our destination, assuming standard orbit Captain.)");
}
}
@@ -425,7 +425,7 @@ module.exports = {
utils.bindAutoSaveEvent(jQuery("#" + GEO_OPTIONS.CELL_ID), updateGeo);
jQuery("#" + GEO_OPTIONS.DELAY).bind("change", function () {
updateGeo();
- delayLabel.innerText = delay.value;
+ delayLabel.innerHTML = delay.value;
});
jQuery("#" + GEO_OPTIONS.TIMEOUT).bind("click", function () {
updateGeo();
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/platform.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/platform.js b/lib/client/ui/plugins/platform.js
index 2f73e55..c59aeaf 100644
--- a/lib/client/ui/plugins/platform.js
+++ b/lib/client/ui/plugins/platform.js
@@ -40,7 +40,7 @@ function _updatePlatformDeviceSelect(platformID, currentDeviceKey) {
listOfSortedDevices.forEach(function (dev) {
var deviceNode = utils.createElement("option", {
- "innerText": dev.name,
+ "innerHTML": dev.name,
"value": dev.id
});
@@ -90,7 +90,7 @@ module.exports = {
utils.forEach(platform, function (version, versionNumber) {
if (newPlatform === version.id) {
versionSelect.appendChild(utils.createElement("option", {
- "innerText": versionNumber,
+ "innerHTML": versionNumber,
"value": versionNumber
}));
}
@@ -111,7 +111,7 @@ module.exports = {
utils.forEach(platformList, function (platform) {
utils.forEach(platform, function (version, versionNumber) {
platformNode = utils.createElement("option", {
- "innerText": version.name,
+ "innerHTML": version.name,
"value": version.id
});
@@ -119,7 +119,7 @@ module.exports = {
platformNode.selected = true;
versionNode = utils.createElement("option", {
- "innerText": versionNumber,
+ "innerHTML": versionNumber,
"value": versionNumber
});
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/platformEvents.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/platformEvents.js b/lib/client/ui/plugins/platformEvents.js
index a419e6e..cf9378e 100644
--- a/lib/client/ui/plugins/platformEvents.js
+++ b/lib/client/ui/plugins/platformEvents.js
@@ -33,7 +33,7 @@ module.exports = {
utils.forEach(spec.events, function (method, name) {
eventSelect.appendChild(utils.createElement("option", {
- "innerText": name,
+ "innerHTML": name,
"value": name
}));
});
@@ -62,7 +62,7 @@ module.exports = {
if (args) {
utils.forEach(spec.events[this.value].args, function (arg, index) {
argsSelect.append(utils.createElement("option", {
- innerText: arg,
+ innerHTML: arg,
value: index
}));
});
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/push.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/push.js b/lib/client/ui/plugins/push.js
index 117e0c9..a4fb6cd 100644
--- a/lib/client/ui/plugins/push.js
+++ b/lib/client/ui/plugins/push.js
@@ -27,7 +27,7 @@ function _updatePushPanel(ports) {
ports.forEach(function (port) {
portsSelect.appendChild(utils.createElement("option", {
- innerText: port,
+ innerHTML: port,
value: port,
selected: currentPort === port
}));
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/videoPlayer.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/videoPlayer.js b/lib/client/ui/plugins/videoPlayer.js
index 3b4615e..420f252 100644
--- a/lib/client/ui/plugins/videoPlayer.js
+++ b/lib/client/ui/plugins/videoPlayer.js
@@ -28,7 +28,7 @@ module.exports = {
var s = parseInt(videoObj.currentTime % 60, 10),
m = parseInt((videoObj.currentTime / 60) % 60, 10);
- videoProgress.innerText = ((m > 9) ? m : "0" + m) + ':' + ((s > 9) ? s : "0" + s);
+ videoProgress.innerHTML = ((m > 9) ? m : "0" + m) + ':' + ((s > 9) ? s : "0" + s);
}, false);
});
@@ -39,8 +39,8 @@ module.exports = {
});
event.on("MultimediaVideoStateChanged", function (state) {
- document.getElementById(constants.COMMON.MULTIMEDIA_VIDEO_STATE_FIELD_ID).innerText = state;
- document.getElementById(constants.COMMON.MULTIMEDIA_VIDEO_FILE_FIELD_ID).innerText = videoObj.getAttribute("src");
+ document.getElementById(constants.COMMON.MULTIMEDIA_VIDEO_STATE_FIELD_ID).innerHTML = state;
+ document.getElementById(constants.COMMON.MULTIMEDIA_VIDEO_FILE_FIELD_ID).innerHTML = videoObj.getAttribute("src");
});
}
};
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/ui/plugins/widgetConfig.js
----------------------------------------------------------------------
diff --git a/lib/client/ui/plugins/widgetConfig.js b/lib/client/ui/plugins/widgetConfig.js
index 6ac8c52..9d3a14a 100644
--- a/lib/client/ui/plugins/widgetConfig.js
+++ b/lib/client/ui/plugins/widgetConfig.js
@@ -53,7 +53,7 @@ function _buildConfigAccordionNode(node, accordionContainer, counter) {
nodeTitleH3.appendChild(utils.createElement("a", {
href: "#",
- innerText: node.nodeName,
+ innerHTML: node.nodeName,
"class": constants.CONFIG.SUCCESS_CSS[(result.valid === undefined) ? "missing" : result.valid.toString()]
}));
nodeDiv.appendChild(nodeTitleH3);
http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/70d5836e/lib/client/utils.js
----------------------------------------------------------------------
diff --git a/lib/client/utils.js b/lib/client/utils.js
index 898885a..7dd4b45 100644
--- a/lib/client/utils.js
+++ b/lib/client/utils.js
@@ -158,7 +158,7 @@ self = module.exports = {
},
extensionUrl: function () {
- return document.getElementById("extension-url").innerText;
+ return document.getElementById("extension-url").innerHTML;
},
appLocation: function () {