From fc90c3a7ac1d3c24397faddc8bcca5bd473efcf5 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 17 Jun 2014 10:00:33 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 CHANGELOG            |    1 +
 program/js/app.js    |   24 +++++++++++++++---------
 skins/larry/mail.css |    6 +++---
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index d2fc4fa..f92f8df 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Close "no subject" prompt with Enter key (#1489580)
 - Add config option to specify IMAP connection socket parameters - imap_conn_options (#1489948)
 - Password: Add option to force new users to change their password (#1486884)
 - Improve support for screen readers and assistive technology using WCAG 2.0 and WAI ARIA standards
diff --git a/program/js/app.js b/program/js/app.js
index 0cdd248..3fd1823 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3553,26 +3553,32 @@
         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);
+          .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('cancel')] = function(){
+      buttons[this.get_label('sendmessage')] = function() {
+        save_func($(this));
+      };
+      buttons[this.get_label('cancel')] = function() {
         input_subject.focus();
         $(this).dialog('close');
-      };
-      buttons[this.get_label('sendmessage')] = function(){
-        input_subject.val(prompt_value.val());
-        $(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();
+      prompt_value.select().keydown(function(e) {
+        if (e.which == 13) save_func();
+      });
+
       return false;
     }
 
diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index 6a2e3f4..85da974 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -643,7 +643,7 @@
 }
 
 .messagelist thead tr th.attachment span.attachment {
-	background-position: -24px -997px;
+	background-position: -24px -996px;
 }
 
 .messagelist tbody tr td.attachment span.report {
@@ -651,7 +651,7 @@
 }
 
 .messagelist thead tr th.priority span.priority {
-	background-position: -24px -1845px;
+	background-position: -25px -1845px;
 }
 
 .messagelist tr td.priority span.prio5 {
@@ -675,7 +675,7 @@
 }
 
 .messagelist thead tr th.flag span.flagged {
-	background-position: -22px -1036px;
+	background-position: -22px -1037px;
 }
 
 .messagelist tr:hover td.status span.msgicon {

--
Gitblit v1.9.1