diff options
author | Aleksander Machniak <alec@alec.pl> | 2016-10-20 16:48:42 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2016-10-20 16:48:42 +0300 |
commit | edea8732a6534c31c54aa48f7982434f7049e599 (patch) | |
tree | a7e4ae7beedaa72352d8b6063af08874ea058a3d /skins | |
parent | 571a10751f500553d4b65fda1b8e8fd9bd32283f (diff) |
Fix regression where UI object could be not created on some pages (#5484)
Diffstat (limited to 'skins')
-rw-r--r-- | skins/larry/includes/footer.html | 3 | ||||
-rw-r--r-- | skins/larry/includes/header.html | 8 | ||||
-rw-r--r-- | skins/larry/includes/links.html | 4 | ||||
-rw-r--r-- | skins/larry/ui.js | 8 |
4 files changed, 11 insertions, 12 deletions
diff --git a/skins/larry/includes/footer.html b/skins/larry/includes/footer.html index cade440bd..f64420d27 100644 --- a/skins/larry/includes/footer.html +++ b/skins/larry/includes/footer.html @@ -1,2 +1,5 @@ <roundcube:object name="message" id="messagestack" condition="env:task != 'login'" /> +<script type="text/javascript"> +if (!window.UI) { var UI = new rcube_mail_ui(); } +</script> diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html index 5efe5b600..1289d5681 100644 --- a/skins/larry/includes/header.html +++ b/skins/larry/includes/header.html @@ -1,13 +1,5 @@ <script type="text/javascript"> - -// UI startup var UI = new rcube_mail_ui(); -$(document).ready(function(){ - UI.set('errortitle', '<roundcube:label name="errortitle" quoting="javascript" />'); - UI.set('toggleoptions', '<roundcube:label name="toggleadvancedoptions" quoting="javascript" />'); - UI.init(); -}); - </script> <div id="header"> diff --git a/skins/larry/includes/links.html b/skins/larry/includes/links.html index 99bd03f71..a894ad6f9 100644 --- a/skins/larry/includes/links.html +++ b/skins/larry/includes/links.html @@ -4,4 +4,6 @@ <roundcube:if condition="in_array(env:task, array('mail','addressbook','settings'))" /> <link rel="stylesheet" type="text/css" href="/<roundcube:var name="env:task" />.css" /> <roundcube:endif /> -<script type="text/javascript" src="/ui.js"></script>
\ No newline at end of file +<script type="text/javascript" src="/ui.js"></script> +<roundcube:add_label name="errortitle" /> +<roundcube:add_label name="toggleadvancedoptions" /> diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 59a09d6fe..4b2cd8057 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -60,6 +60,8 @@ function rcube_mail_ui() if (bw.tablet) { $('#viewport').attr('content', "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"); } + + $(document).ready(function() { me.init(); }); } @@ -288,8 +290,8 @@ function rcube_mail_ui() else if (rcmail.env.action == 'edit-prefs') { var legend = $('#preferences-details fieldset.advanced legend'), toggle = $('<a href="#toggle"></a>') - .text(env.toggleoptions) - .attr('title', env.toggleoptions) + .text(rcmail.gettext('toggleadvancedoptions')) + .attr('title', rcmail.gettext('toggleadvancedoptions')) .addClass('advanced-toggle'); legend.click(function(e) { @@ -449,7 +451,7 @@ function rcube_mail_ui() resizable: false, closeOnEscape: true, dialogClass: 'popupmessage ' + p.type, - title: env.errortitle, + title: rcmail.gettext('errortitle'), close: dialog_close, hide: {effect: 'fadeOut'}, width: 420, |