From 1a3c911d925ae0dd19c35c29f8f1a0c164015a69 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 6 Jul 2011 12:54:56 +0000 Subject: - Fixed issues related to creating contacts in source which isn't currently selected (#1487990) --- program/js/app.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'program/js/app.js') diff --git a/program/js/app.js b/program/js/app.js index d26b0d5b4..6a35c596a 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -637,7 +637,7 @@ function rcube_webmail() } // contacts/identities else { - // + // reload form if (props == 'reload') { form.action += '?_reload=1'; } @@ -647,7 +647,7 @@ function rcube_webmail() break; } else if (this.task == 'settings' && (this.env.identities_level % 2) == 0 && - (input = $("input[name='_email']", form)) && input.length&& !rcube_check_email(input.val()) + (input = $("input[name='_email']", form)) && input.length && !rcube_check_email(input.val()) ) { alert(this.get_label('noemailwarning')); input.focus(); @@ -658,6 +658,10 @@ function rcube_webmail() $('input.placeholder').each(function(){ if (this.value == this._placeholder) this.value = ''; }); } + // add selected source (on the list) + if (parent.rcmail && parent.rcmail.env.source) + form.action = this.add_url(form.action, '_orig_source', parent.rcmail.env.source); + form.submit(); } break; @@ -3803,6 +3807,13 @@ function rcube_webmail() add_url = '&_framed=1'; target = window.frames[this.env.contentframe]; this.show_contentframe(true); + + // load dummy content + if (!cid) { + // unselect selected row(s) + this.contact_list.clear_selection(); + this.enable_command('delete', 'compose', false); + } } else if (framed) return false; -- cgit v1.2.3