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);
|
navigator.mozLoop.releaseCallData(callId);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.body.classList.add(loop.shared.utils.getTargetPlatform());
|
|
||||||
|
|
||||||
React.renderComponent(AppControllerView({
|
React.renderComponent(AppControllerView({
|
||||||
localRoomStore: localRoomStore,
|
localRoomStore: localRoomStore,
|
||||||
store: conversationStore,
|
store: conversationStore,
|
||||||
|
|||||||
@@ -619,8 +619,6 @@ loop.conversation = (function(mozL10n) {
|
|||||||
navigator.mozLoop.releaseCallData(callId);
|
navigator.mozLoop.releaseCallData(callId);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.body.classList.add(loop.shared.utils.getTargetPlatform());
|
|
||||||
|
|
||||||
React.renderComponent(<AppControllerView
|
React.renderComponent(<AppControllerView
|
||||||
localRoomStore={localRoomStore}
|
localRoomStore={localRoomStore}
|
||||||
store={conversationStore}
|
store={conversationStore}
|
||||||
|
|||||||
@@ -751,7 +751,6 @@ loop.panel = (function(_, mozL10n) {
|
|||||||
dispatcher: dispatcher}
|
dispatcher: dispatcher}
|
||||||
), document.querySelector("#main"));
|
), document.querySelector("#main"));
|
||||||
|
|
||||||
document.body.classList.add(loop.shared.utils.getTargetPlatform());
|
|
||||||
document.body.setAttribute("dir", mozL10n.getDirection());
|
document.body.setAttribute("dir", mozL10n.getDirection());
|
||||||
|
|
||||||
// Notify the window that we've finished initalization and initial layout
|
// Notify the window that we've finished initalization and initial layout
|
||||||
|
|||||||
@@ -751,7 +751,6 @@ loop.panel = (function(_, mozL10n) {
|
|||||||
dispatcher={dispatcher}
|
dispatcher={dispatcher}
|
||||||
/>, document.querySelector("#main"));
|
/>, document.querySelector("#main"));
|
||||||
|
|
||||||
document.body.classList.add(loop.shared.utils.getTargetPlatform());
|
|
||||||
document.body.setAttribute("dir", mozL10n.getDirection());
|
document.body.setAttribute("dir", mozL10n.getDirection());
|
||||||
|
|
||||||
// Notify the window that we've finished initalization and initial layout
|
// Notify the window that we've finished initalization and initial layout
|
||||||
|
|||||||
@@ -358,12 +358,6 @@ p {
|
|||||||
color: rgba(51, 51, 51, .5);
|
color: rgba(51, 51, 51, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mac p,
|
|
||||||
.windows p,
|
|
||||||
.linux p {
|
|
||||||
line-height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Web panel */
|
/* Web panel */
|
||||||
|
|
||||||
.info-panel {
|
.info-panel {
|
||||||
|
|||||||
@@ -29,26 +29,6 @@ loop.shared.utils = (function(mozL10n) {
|
|||||||
return date.toLocaleDateString(navigator.language, options);
|
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
|
* 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.
|
* (if navigator.mozLoop is defined) or try to get them from localStorage.
|
||||||
@@ -133,7 +113,6 @@ loop.shared.utils = (function(mozL10n) {
|
|||||||
Helper: Helper,
|
Helper: Helper,
|
||||||
composeCallUrlEmail: composeCallUrlEmail,
|
composeCallUrlEmail: composeCallUrlEmail,
|
||||||
formatDate: formatDate,
|
formatDate: formatDate,
|
||||||
getTargetPlatform: getTargetPlatform,
|
|
||||||
getBoolPreference: getBoolPreference
|
getBoolPreference: getBoolPreference
|
||||||
};
|
};
|
||||||
})(document.mozL10n || navigator.mozL10n);
|
})(document.mozL10n || navigator.mozL10n);
|
||||||
|
|||||||
@@ -537,10 +537,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", function() {
|
window.addEventListener("DOMContentLoaded", function() {
|
||||||
var body = document.body;
|
React.renderComponent(App(null), document.body);
|
||||||
body.className = loop.shared.utils.getTargetPlatform();
|
|
||||||
|
|
||||||
React.renderComponent(App(null), body);
|
|
||||||
|
|
||||||
_renderComponentsInIframes();
|
_renderComponentsInIframes();
|
||||||
|
|
||||||
|
|||||||
@@ -537,10 +537,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", function() {
|
window.addEventListener("DOMContentLoaded", function() {
|
||||||
var body = document.body;
|
React.renderComponent(<App />, document.body);
|
||||||
body.className = loop.shared.utils.getTargetPlatform();
|
|
||||||
|
|
||||||
React.renderComponent(<App />, body);
|
|
||||||
|
|
||||||
_renderComponentsInIframes();
|
_renderComponentsInIframes();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user