padding: 0;
background-color: GhostWhite;
display: grid;
- grid-template-rows: auto auto 1fr auto;
+ grid-template-rows: auto auto auto auto 1fr auto;
grid-template-columns: auto 1fr;
grid-template-areas:
- 'ctdl-compose-to-label ctdl-compose-to-field'
+ 'ctdl-compose-to-label ctdl-compose-to-line'
+ 'ctdl-compose-cc-label ctdl-compose-cc-field'
+ 'ctdl-compose-bcc-label ctdl-compose-bcc-field'
'ctdl-compose-subject-label ctdl-compose-subject-field'
'ctdl-compose-message-box ctdl-compose-message-box'
'ctdl-compose-toolbar ctdl-compose-toolbar';
padding: 0.5vw;
}
+.ctdl-compose-to-line {
+ grid-area: ctdl-compose-to-line;
+ padding: 0.5vw;
+ border-bottom: 1px solid Grey;
+ margin-right: 0.5vw;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
.ctdl-compose-to-field {
- grid-area: ctdl-compose-to-field;
+ flex-grow: 1;
+
+}
+
+.ctdl-compose-cc-label {
+ grid-area: ctdl-compose-cc-label;
+ padding: 0.5vw;
+ display: none;
+}
+
+.ctdl-compose-cc-field {
+ grid-area: ctdl-compose-cc-field;
+ padding: 0.5vw;
+ border-bottom: 1px solid Grey;
+ margin-right: 0.5vw;
+ display: none;
+}
+
+.ctdl-compose-bcc-label {
+ grid-area: ctdl-compose-bcc-label;
+ padding: 0.5vw;
+ display: none;
+}
+
+.ctdl-compose-bcc-field {
+ grid-area: ctdl-compose-bcc-field;
padding: 0.5vw;
border-bottom: 1px solid Grey;
margin-right: 0.5vw;
+ display: none;
}
.ctdl-compose-subject-label {
// Header fields, the composition window, and the button bar are arranged using a Grid layout.
+ "<div id=\"ctdl-compose-mail\" class=\"ctdl-compose-mail\">"
- // Visible header fields
+ // Visible To: field, plus a box to make the CC/BCC lines appear
+ "<div class=\"ctdl-compose-to-label\">" + _("To:") + "</div>"
+ + "<div class=\"ctdl-compose-to-line\">"
+ "<div class=\"ctdl-compose-to-field\" id=\"ctdl-compose-to-field\" contenteditable=\"true\"></div>"
+ + "<div class=\"ctdl-cc-bcc-buttons ctdl-msg-button\" id=\"ctdl-cc-bcc-buttons\" "
+ + "onClick=\"make_cc_bcc_visible()\">"
+ + _("CC:") + "/" + _("BCC:") + "</div>"
+ + "</div>"
+
+ // CC/BCC
+ + "<div class=\"ctdl-compose-cc-label\" id=\"ctdl-compose-cc-label\">" + _("CC:") + "</div>"
+ + "<div class=\"ctdl-compose-cc-field\" id=\"ctdl-compose-cc-field\" contenteditable=\"true\"></div>"
+ + "<div class=\"ctdl-compose-bcc-label\" id=\"ctdl-compose-bcc-label\">" + _("BCC:") + "</div>"
+ + "<div class=\"ctdl-compose-bcc-field\" id=\"ctdl-compose-bcc-field\" contenteditable=\"true\"></div>"
+
+ // Visible subject field
+ "<div class=\"ctdl-compose-subject-label\">" + _("Subject:") + "</div>"
+ "<div class=\"ctdl-compose-subject-field\" id=\"ctdl-compose-subject-field\" contenteditable=\"true\"></div>"
;
}
+
+function make_cc_bcc_visible() {
+ document.getElementById("ctdl-cc-bcc-buttons").style.display = "none";
+ document.getElementById("ctdl-compose-cc-label").style.display = "block";
+ document.getElementById("ctdl-compose-cc-field").style.display = "block";
+ document.getElementById("ctdl-compose-bcc-label").style.display = "block";
+ document.getElementById("ctdl-compose-bcc-field").style.display = "block";
+}
+