diff options
author | alecpl <alec@alec.pl> | 2011-07-06 12:54:56 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-07-06 12:54:56 +0000 |
commit | 1a3c911d925ae0dd19c35c29f8f1a0c164015a69 (patch) | |
tree | 7dfb05cc3b65d1f3b7557523212d20de542ba6c5 /program/js/app.js | |
parent | 93a35ccedfc53580440573ea9fc615174fac55c6 (diff) |
- Fixed issues related to creating contacts in source which isn't currently selected (#1487990)
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 15 |
1 files changed, 13 insertions, 2 deletions
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; |