parent
0feddfc7af
commit
7f135e5323
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ Enhancements
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [core] handle multi-valued mozillasecondemail attribute mapping
|
- [core] handle multi-valued mozillasecondemail attribute mapping
|
||||||
|
- [web] improve popup window detection in message viewer (#4518)
|
||||||
|
|
||||||
4.0.1 (2018-07-10)
|
4.0.1 (2018-07-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
var vm = this, popupWindow = null, hotkeys = [];
|
var vm = this, popupWindow = null, hotkeys = [];
|
||||||
|
|
||||||
this.$onInit = function() {
|
this.$onInit = function() {
|
||||||
|
var isPopupWindow = false;
|
||||||
|
|
||||||
// Expose controller
|
// Expose controller
|
||||||
$window.$messageController = vm;
|
$window.$messageController = vm;
|
||||||
|
|
||||||
|
@ -30,9 +32,14 @@
|
||||||
|
|
||||||
_registerHotkeys(hotkeys);
|
_registerHotkeys(hotkeys);
|
||||||
|
|
||||||
|
// Detect if this is message appears in a separate window
|
||||||
|
try {
|
||||||
|
isPopupWindow = $window.opener && '$mailboxController' in $window.opener;
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
|
|
||||||
// One-way refresh of the parent window when modifying the message from a popup window.
|
// One-way refresh of the parent window when modifying the message from a popup window.
|
||||||
if ($window.opener &&
|
if (isPopupWindow) {
|
||||||
'$mailboxController' in $window.opener) {
|
|
||||||
// Update the message flags. The message must be displayed in the parent window.
|
// Update the message flags. The message must be displayed in the parent window.
|
||||||
$scope.$watchCollection(function() { return vm.message.flags; }, function(newTags, oldTags) {
|
$scope.$watchCollection(function() { return vm.message.flags; }, function(newTags, oldTags) {
|
||||||
var ctrls;
|
var ctrls;
|
||||||
|
|
Loading…
Reference in New Issue