Skip to content

Commit

Permalink
Merge pull request #6798 from RocketChat/fix-iframe-issues
Browse files Browse the repository at this point in the history
[FIX] Fix iframe wise issues
  • Loading branch information
engelgabriel authored Apr 25, 2017
2 parents 1ced54e + 070a008 commit 2109970
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-theme/client/imports/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -4996,7 +4996,7 @@ a + br.only-after-a {
border-width: 0;
}

.stream-info {
.users-typing {
display: none;
}

Expand Down
24 changes: 15 additions & 9 deletions packages/rocketchat-ui/client/lib/fireEvent.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
window.fireGlobalEvent = (eventName, params) => {
window.dispatchEvent(new CustomEvent(eventName, {detail: params}));

if (RocketChat.settings.get('Iframe_Integration_send_enable') === true) {
parent.postMessage({
eventName,
data: params
}, RocketChat.settings.get('Iframe_Integration_send_target_origin'));
}
window.fireGlobalEvent = function _fireGlobalEvent(eventName, params) {
Tracker.autorun((computation) => {
const enabled = RocketChat.settings.get('Iframe_Integration_send_enable');
if (enabled === undefined) {
return;
}
computation.stop();
if (enabled) {
window.dispatchEvent(new CustomEvent(eventName, {detail: params}));
parent.postMessage({
eventName,
data: params
}, RocketChat.settings.get('Iframe_Integration_send_target_origin'));
}
});
};
9 changes: 7 additions & 2 deletions packages/rocketchat-webrtc/WebRTCClass.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,13 @@ class WebRTCClass
, (isConfirm) =>
if isConfirm
if @navigator is 'chrome'
chrome.webstore.install undefined, refresh, ->
window.open('https://chrome.google.com/webstore/detail/rocketchat-screen-share/nocfbnnmjnndkbipkabodnheejiegccf')
url = 'https://chrome.google.com/webstore/detail/rocketchat-screen-share/nocfbnnmjnndkbipkabodnheejiegccf'
try
chrome.webstore.install url, refresh, ->
window.open(url)
refresh()
catch e
window.open(url)
refresh()
else if @navigator is 'firefox'
window.open('https://addons.mozilla.org/en-GB/firefox/addon/rocketchat-screen-share/')
Expand Down

0 comments on commit 2109970

Please sign in to comment.