Bug 1077611 - Remove platform detection from loop panel & conversation window. r=dmose
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -358,12 +358,6 @@ p {
|
||||
color: rgba(51, 51, 51, .5);
|
||||
}
|
||||
|
||||
.mac p,
|
||||
.windows p,
|
||||
.linux p {
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
/* Web panel */
|
||||
|
||||
.info-panel {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user