summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-11-13 18:46:09 +0100
committerAleksander Machniak <alec@alec.pl>2014-11-13 18:46:09 +0100
commit63e4989aa5a00dd4d34e11e49042845db8a0a6a1 (patch)
treeeca561b156353433d162f9c7d9694b1c6e2d271a /skins
parent58e184b022349530485125f489d1e080bafa6717 (diff)
Don't append created iframe to document if it's going to be appended to a dialog - skip redundant http request + small CS improvements
Diffstat (limited to 'skins')
-rw-r--r--skins/larry/ui.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index c8204b603..eac9ff912 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -1138,14 +1138,11 @@ function rcube_mail_ui()
*/
function show_about(elem)
{
- var frame = $('<iframe>').attr('id', 'aboutframe')
- .attr('src', rcmail.url('settings/about'))
- .attr('frameborder', '0')
- .appendTo(document.body);
-
- var h = Math.floor($(window).height() * 0.75);
- var buttons = {};
- var supportln = $('#supportlink');
+ var frame = $('<iframe>').attr({id: 'aboutframe', src: rcmail.url('settings/about'), frameborder: '0'});
+ h = Math.floor($(window).height() * 0.75),
+ buttons = {},
+ supportln = $('#supportlink');
+
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 };