Bug 1077611 - Remove platform detection from loop panel & conversation window. r=dmose

This commit is contained in:
Jared Wein
2014-10-23 14:11:12 -04:00
parent 38162cc753
commit 39bbe7c5c0
8 changed files with 2 additions and 41 deletions

View File

@@ -619,8 +619,6 @@ loop.conversation = (function(mozL10n) {
navigator.mozLoop.releaseCallData(callId);
});
document.body.classList.add(loop.shared.utils.getTargetPlatform());
React.renderComponent(AppControllerView({
localRoomStore: localRoomStore,
store: conversationStore,

View File

@@ -619,8 +619,6 @@ loop.conversation = (function(mozL10n) {
navigator.mozLoop.releaseCallData(callId);
});
document.body.classList.add(loop.shared.utils.getTargetPlatform());
React.renderComponent(<AppControllerView
localRoomStore={localRoomStore}
store={conversationStore}

View File

@@ -751,7 +751,6 @@ loop.panel = (function(_, mozL10n) {
dispatcher: dispatcher}
), document.querySelector("#main"));
document.body.classList.add(loop.shared.utils.getTargetPlatform());
document.body.setAttribute("dir", mozL10n.getDirection());
// Notify the window that we've finished initalization and initial layout

View File

@@ -751,7 +751,6 @@ loop.panel = (function(_, mozL10n) {
dispatcher={dispatcher}
/>, document.querySelector("#main"));
document.body.classList.add(loop.shared.utils.getTargetPlatform());
document.body.setAttribute("dir", mozL10n.getDirection());
// Notify the window that we've finished initalization and initial layout

View File

@@ -358,12 +358,6 @@ p {
color: rgba(51, 51, 51, .5);
}
.mac p,
.windows p,
.linux p {
line-height: 16px;
}
/* Web panel */
.info-panel {

View File

@@ -29,26 +29,6 @@ loop.shared.utils = (function(mozL10n) {
return date.toLocaleDateString(navigator.language, options);
}
/**
* Used for adding different styles to the panel
* @returns {String} Corresponds to the client platform
* */
function getTargetPlatform() {
var platform="unknown_platform";
if (navigator.platform.indexOf("Win") !== -1) {
platform = "windows";
}
if (navigator.platform.indexOf("Mac") !== -1) {
platform = "mac";
}
if (navigator.platform.indexOf("Linux") !== -1) {
platform = "linux";
}
return platform;
}
/**
* Used for getting a boolean preference. It will either use the browser preferences
* (if navigator.mozLoop is defined) or try to get them from localStorage.
@@ -133,7 +113,6 @@ loop.shared.utils = (function(mozL10n) {
Helper: Helper,
composeCallUrlEmail: composeCallUrlEmail,
formatDate: formatDate,
getTargetPlatform: getTargetPlatform,
getBoolPreference: getBoolPreference
};
})(document.mozL10n || navigator.mozL10n);

View File

@@ -537,10 +537,7 @@
}
window.addEventListener("DOMContentLoaded", function() {
var body = document.body;
body.className = loop.shared.utils.getTargetPlatform();
React.renderComponent(App(null), body);
React.renderComponent(App(null), document.body);
_renderComponentsInIframes();

View File

@@ -537,10 +537,7 @@
}
window.addEventListener("DOMContentLoaded", function() {
var body = document.body;
body.className = loop.shared.utils.getTargetPlatform();
React.renderComponent(<App />, body);
React.renderComponent(<App />, document.body);
_renderComponentsInIframes();