Add a close button to the compose dialog (since users may not know to use Esc)

(imported from commit 47dca0b2c76449be1d885b74c1cf6b036aa459c7)
This commit is contained in:
Kevin Mehall
2013-06-12 17:57:43 -04:00
parent 6cb7baf598
commit 0cd90cbe4a
4 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
<div class="row-fluid">
<div class="span12" id="compose">
<div class="message_comp">
<button type="button" class="close" id='compose_close'>×</button>
<div class="alert" id="send-status">
<span class="send-status-close">&times;</span>
<span id="error-msg"></span>

View File

@@ -165,6 +165,8 @@ exports.start = function (msg_type, opts) {
return;
}
$("#compose_close").show();
var default_opts = {
message_type: msg_type,
stream: '',
@@ -232,6 +234,7 @@ function abort_xhr () {
}
exports.cancel = function () {
$("#compose_close").hide();
compose.clear();
compose.hide();
abort_xhr();

View File

@@ -1544,6 +1544,10 @@ $(function () {
}
});
$("#compose_close").click(function (e) {
compose.cancel();
});
// initialize other stuff
typeahead_helper.update_all_recipients(page_params.people_list);
composebox_typeahead.initialize();

View File

@@ -767,6 +767,10 @@ blockquote p {
z-index: 1;
}
#compose_close {
display: none;
}
/* Like .nav-tabs > li > a */
#send-status {
width: 90%;