diff --git a/src/messenger/webim/js/compiled/users/init.js b/src/messenger/webim/js/compiled/users/init.js index 4d7cecdc..59b234a3 100644 --- a/src/messenger/webim/js/compiled/users/init.js +++ b/src/messenger/webim/js/compiled/users/init.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,e){a.Regions={};a.Popup={};a.Popup.open=function(b,a,g){b=window.open(b,a,g);b.focus();b.opener=window};a.Utils.updateTimers=function(a,f){a.find(f).each(function(){var a=e(this).data("timestamp");if(a){var c=Math.round((new Date).getTime()/1E3)-a,a=c%60,b=Math.floor(c/60)%60,c=Math.floor(c/3600),d=[];0b?"0"+b:b);d.push(10>a?"0"+a:a);e(this).html(d.join(":"))}})}})(Mibew,jQuery); +(function(b,e){b.Regions={};b.Popup={};b.Popup.open=function(a,c,d){c=c.replace(/[^A-z0-9_]+/g,"");a=window.open(a,c,d);a.focus();a.opener=window};b.Utils.updateTimers=function(a,c){a.find(c).each(function(){var d=e(this).data("timestamp");if(d){var a=Math.round((new Date).getTime()/1E3)-d,d=a%60,c=Math.floor(a/60)%60,a=Math.floor(a/3600),b=[];0c?"0"+c:c);b.push(10>d?"0"+d:d);e(this).html(b.join(":"))}})}})(Mibew,jQuery); diff --git a/src/messenger/webim/js/compiled/users_app.js b/src/messenger/webim/js/compiled/users_app.js index 7fb34de2..6926ba42 100644 --- a/src/messenger/webim/js/compiled/users_app.js +++ b/src/messenger/webim/js/compiled/users_app.js @@ -38,7 +38,7 @@ a={hash:{},data:d};return c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,e){a.Regions={};a.Popup={};a.Popup.open=function(b,a,g){b=window.open(b,a,g);b.focus();b.opener=window};a.Utils.updateTimers=function(a,f){a.find(f).each(function(){var a=e(this).data("timestamp");if(a){var c=Math.round((new Date).getTime()/1E3)-a,a=c%60,b=Math.floor(c/60)%60,c=Math.floor(c/3600),d=[];0b?"0"+b:b);d.push(10>a?"0"+a:a);e(this).html(d.join(":"))}})}})(Mibew,jQuery); +(function(b,e){b.Regions={};b.Popup={};b.Popup.open=function(a,c,d){c=c.replace(/[^A-z0-9_]+/g,"");a=window.open(a,c,d);a.focus();a.opener=window};b.Utils.updateTimers=function(a,c){a.find(c).each(function(){var d=e(this).data("timestamp");if(d){var a=Math.round((new Date).getTime()/1E3)-d,d=a%60,c=Math.floor(a/60)%60,a=Math.floor(a/3600),b=[];0c?"0"+c:c);b.push(10>d?"0"+d:d);e(this).html(b.join(":"))}})}})(Mibew,jQuery); /* Copyright 2005-2013 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/messenger/webim/js/source/users/init.js b/src/messenger/webim/js/source/users/init.js index 7f454359..588922ef 100644 --- a/src/messenger/webim/js/source/users/init.js +++ b/src/messenger/webim/js/source/users/init.js @@ -21,11 +21,16 @@ /** * Open new window * @param {String} link URL address of page to open - * @param {String} id Id of new window + * @param {String} id ID of new window. Value of the ID can contain only + * alphanumeric characters and underscore sign. Any other characters will + * be stripped. It helps to avoid problems with popup windows in IE7-9. * @param {String} params Window params passed to window.open method */ Mibew.Popup.open = function(link, id, params) { + // Filter window ID to avoid problems in IE7-9 + id = id.replace(/[^A-z0-9_]+/g, ''); var newWindow = window.open(link, id, params); + newWindow.focus(); newWindow.opener = window; }