summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-17 16:00:33 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-17 16:00:33 +0200
commitfc90c3a7ac1d3c24397faddc8bcca5bd473efcf5 (patch)
tree0c8f7131dc476ac646ef2c77a48b59b4005a5a4a /program
parent142e7c9afcb0032ced707a844d230fd962774d1d (diff)
parentdb7dcf0936069b7d9ac5595c37f6c2aacc5c4ed7 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 0cdd2489b..3fd18235a 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3553,26 +3553,32 @@ function rcube_webmail()
myprompt = $('<div class="prompt">').html('<div class="message">' + this.get_label('nosubjectwarning') + '</div>')
.appendTo(document.body),
prompt_value = $('<input>').attr({type: 'text', size: 30}).val(this.get_label('nosubject'))
- .appendTo(myprompt);
-
- buttons[this.get_label('cancel')] = function(){
- input_subject.focus();
- $(this).dialog('close');
+ .appendTo(myprompt),
+ save_func = function() {
+ input_subject.val(prompt_value.val());
+ myprompt.dialog('close');
+ ref.command(cmd, { nocheck:true }); // repeat command which triggered this
+ };
+
+ buttons[this.get_label('sendmessage')] = function() {
+ save_func($(this));
};
- buttons[this.get_label('sendmessage')] = function(){
- input_subject.val(prompt_value.val());
+ buttons[this.get_label('cancel')] = function() {
+ input_subject.focus();
$(this).dialog('close');
- ref.command(cmd, { nocheck:true }); // repeat command which triggered this
};
myprompt.dialog({
modal: true,
resizable: false,
buttons: buttons,
- close: function(event, ui) { $(this).remove() }
+ close: function(event, ui) { $(this).remove(); }
+ });
+
+ prompt_value.select().keydown(function(e) {
+ if (e.which == 13) save_func();
});
- prompt_value.select();
return false;
}