Don't append created iframe to document if it's going to be appended to a dialog - skip redundant http request + small CS improvements

pull/250/head
Aleksander Machniak 10 years ago
parent 58e184b022
commit 63e4989aa5

@ -1138,14 +1138,11 @@ function rcube_mail_ui()
*/ */
function show_about(elem) function show_about(elem)
{ {
var frame = $('<iframe>').attr('id', 'aboutframe') var frame = $('<iframe>').attr({id: 'aboutframe', src: rcmail.url('settings/about'), frameborder: '0'});
.attr('src', rcmail.url('settings/about')) h = Math.floor($(window).height() * 0.75),
.attr('frameborder', '0') buttons = {},
.appendTo(document.body); supportln = $('#supportlink');
var h = Math.floor($(window).height() * 0.75);
var buttons = {};
var supportln = $('#supportlink');
if (supportln.length && (env.supporturl = supportln.attr('href'))) if (supportln.length && (env.supporturl = supportln.attr('href')))
buttons[supportln.html()] = function(e){ env.supporturl.indexOf('mailto:') < 0 ? window.open(env.supporturl) : location.href = env.supporturl }; buttons[supportln.html()] = function(e){ env.supporturl.indexOf('mailto:') < 0 ? window.open(env.supporturl) : location.href = env.supporturl };

Loading…
Cancel
Save