From f7c50e28dbd637b3b60c6aea0fac3768f8f59f05 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 25 Jan 2013 11:57:09 -0500 Subject: [PATCH] Merge branch 'release-0.8' of github.com:roundcube/roundcubemail into release-0.8 --- program/js/app.js | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 3115690..08411f0 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2541,7 +2541,7 @@ for (i=0, len=selection.length; i<len; i++) { uid = selection[i]; if (list.rows[uid].has_children && !list.rows[uid].expanded) - list.select_childs(uid); + list.select_children(uid); } // if config is set to flag for deletion @@ -3299,6 +3299,10 @@ if (p >= 0) { // in place of removed signature message = message.substring(0, p) + sig + message.substring(p, message.length); cursor_pos = p - 1; + } + else if (!message) { // empty message + cursor_pos = 0; + message = '\n\n' + sig; } else if (pos = this.get_caret_pos(input_message.get(0))) { // at cursor position message = message.substring(0, pos) + '\n' + sig + '\n\n' + message.substring(pos, message.length); @@ -5573,6 +5577,32 @@ this.messages = {}; }; + // open a jquery UI dialog with the given content + this.show_popup_dialog = function(html, title) + { + // forward call to parent window + if (this.is_framed()) { + parent.rcmail.show_popup_dialog(html, title); + return; + } + + var popup = $('<div class="popup">') + .html(html) + .dialog({ + title: title, + modal: true, + resizable: true, + width: 580, + close: function(event, ui) { $(this).remove() } + }); + + // resize and center popup + var win = $(window), w = win.width(), h = win.height(), + width = popup.width(), height = popup.height(); + popup.dialog('option', { height: Math.min(h-40, height+50), width: Math.min(w-20, width+50) }) + .dialog('option', 'position', ['center', 'center']); // only works in a separate call (!?) + }; + // mark a mailbox as selected and set environment variable this.select_folder = function(name, prefix, encode) { @@ -6117,9 +6147,9 @@ // re-send keep-alive requests after 30 seconds if (action == 'keep-alive') - setTimeout(function(){ ref.keep_alive(); }, 30000); + setTimeout(function(){ ref.keep_alive(); ref.start_keepalive(); }, 30000); else if (action == 'check-recent') - setTimeout(function(){ ref.check_for_recent(false); }, 30000); + setTimeout(function(){ ref.check_for_recent(false); ref.start_keepalive(); }, 30000); }; // post the given form to a hidden iframe -- Gitblit v1.9.1