Numerous style changes to the 'edit message' dialog. The save,
authorArt Cancro <ajc@citadel.org>
Tue, 26 Oct 2010 04:17:37 +0000 (00:17 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 26 Oct 2010 04:17:37 +0000 (00:17 -0400)
cancel, and address book buttons now occupy the navbar instead of
a bunch of controls that shouldn't have been there anyway.  I
also fixed a javascript bug that was making the addressbook popup
silently fail in the background if we were in a room that didn't
require message recipients.
The attachment dialog now sits above the message body pane, but
this will soon get migrated into the navbar as well (maybe another
popup).
Finally, the background of the message entry div now more or less
occupies the entire space available to it; this still needs more
tuning in order to make the editor occupy the correct amount of
space in the pane.

webcit/messages.c
webcit/static/styles/login.css
webcit/static/styles/webcit.css
webcit/static/t/edit_message.html
webcit/static/t/login.html

index d62f69bdf648542c8ab55acf1b6b24c8623c2f52..93521ee64072c88111299ee1548bda54b541b2fa 100644 (file)
@@ -1076,7 +1076,7 @@ void post_message(void)
                return;
        }
 
-       if (havebstr("cancel_button")) {
+       if (!strcasecmp(bstr("submit_action"), "cancel")) {
                sprintf(WCC->ImportantMessage, 
                        _("Cancelled.  Message was not posted."));
        } else if (havebstr("attach_button")) {
@@ -1125,7 +1125,7 @@ void post_message(void)
                int save_to_drafts;
                long HeaderLen;
 
-               save_to_drafts = havebstr("save_button");
+               save_to_drafts = !strcasecmp(bstr("submit_action"), "drafts");
                Buf = NewStrBuf();
 
                if (save_to_drafts) {
index c98d6082287669044647305120cfa815b7f3f806..8de9516d41ef5cd3d20d4c5b9d9dd41ac54613fd 100644 (file)
@@ -64,7 +64,6 @@
 
 .logbuttons input {
        cursor: pointer;
-       -moz-border-radius: 8px;    /* CSS3 draft and Mozilla  */
        text-align: center;
        font-weight: bold;
 }
index 890bf8df6acf2055fbc94796a14a377ee420e8e8..bd4758f2c9719301005fe0b93cb1ac6d2237257d 100644 (file)
@@ -124,6 +124,12 @@ body {
        padding: 0;
 }
 
+.entmsg {
+       position: absolute;
+       height: 95%;
+       width: 98%;
+}
+
 .message_header .message_subject {
        font-style: italic;
        float: left;    
@@ -388,16 +394,16 @@ a:visited { color: purple}
        color: #3E65AF;
 }
 
-.button_link a, input, select, li.activeuser, .room_actions form select, .room_actions li.search input, .address_book_popup_title, .msgbuttons a, input#delbutton,.attachfile, .logbuttons input,.buttons input, .send_edit_msg input {
+.button_link a, input, select, li.activeuser, .room_actions form select, .room_actions li.search input, .address_book_popup_title, .msgbuttons a, input#delbutton,.attachfile, .logbuttons input,.buttons input {
        background-color: #fbf4ca !important; /* needed for li.activeuser */
 }
 
-.button_link a, input, select, .room_actions form select, .room_actions li.search input, .address_book_popup_title, .msgbuttons a, input#delbutton,.attachfile, .logbuttons input,.buttons input, .send_edit_msg input {
+.button_link a, input, select, .room_actions form select, .room_actions li.search input, .address_book_popup_title, .msgbuttons a, input#delbutton,.attachfile, .logbuttons input,.buttons input {
        border: 1px solid #999;
        color: #333;
 }
 
-.button_link a, .msgbuttons a, input#delbutton,.attachfile, .buttons input, .send_edit_msg input {
+.button_link a, .msgbuttons a, input#delbutton,.attachfile, .buttons input {
        cursor: pointer;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
@@ -406,7 +412,7 @@ a:visited { color: purple}
        text-align: center;
 }
 
-.button_link a, .attachfile,.buttons input, .send_edit_msg input {
+.button_link a, .attachfile,.buttons input {
        font-weight: bold;
 }
 
@@ -593,7 +599,7 @@ body {
        padding: 0 0 2px 0;
 }
 
-.button_link a, .attachfile, .logbuttons input,.buttons input, .send_edit_msg input, .logbutton {
+.button_link a, .attachfile, .logbuttons input,.buttons input .logbutton {
        margin: 3px;
        padding: 2px 4px 2px 4px;
 }
@@ -684,26 +690,20 @@ body {
        vertical-align: middle
 }
 
-.send_edit_msg {
-       float: right;
-       margin-top: 0 ;
-       margin-right: 0;
-       padding: 2px 50px 2px 50px;
-}
-
 .edit_msg_table th {
        text-align: right;
+       padding: 0px;
        padding-right: 5px;
        color: #333;
        width: 20%;
 }
 
 .edit_msg_table td {
-       width: 40%;
+       padding: 0px;
 }
 
 .edit_msg_table #recp_id, .edit_msg_table #cc_id, .edit_msg_table #bcc_id, .edit_msg_table #subject_id  {
-       width: 98%
+       width: 98%;
 }
 
 .note {
index 91bd0dc68ec6d29fd6d7f39c8d6e788b20fc0623..26b783b91c6db9a5d91dcbe71d81e9d42ac19d83 100644 (file)
@@ -9,18 +9,10 @@
 <input type="hidden" name="force_room" value="<?ROOMNAME("X")>">
 <input type="hidden" name="references" value="<?BSTR("references")>">
 <input type="hidden" name="page" value="<?BSTR("page")>">
+<input type="hidden" name="submit_action" value="">
 
-<p class="send_edit_msg">
-<?!("COND:BSTR", 1, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Send message")>"><?!("X", 1)>
-<??("COND:BSTR", 2, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Post message")>"><?!("X", 2)>
-&nbsp;
-  <input type="submit" name="save_button" value="<?_("Save to Drafts")>">
-&nbsp;
-  <input type="submit" name="cancel_button" value="<?_("Cancel")>">
-</p>
-<img src="static/newmess3_24x.gif" class="imgedit">  <?DATE:NOW:STR>
 <table width="100%" class="edit_msg_table">
-<tr><th><label for="from_id" >  <i><?_("from")></i> </label></th><td colspan="2">
+<tr><th><label for="from_id"><i><?_("from")></i></label></th><td>
 
 <??("COND:BSTR", 4, "__RCPTREQUIRED")>
 <select name="display_name" size=1 id="from_id">
   <td><input autocomplete="off" type="text" name="recp" id="recp_id" value="<?BSTR("recp", "H")>" size=45 maxlength=1000 />
      <div class="auto_complete" id="recp_name_choices"></div>
   </td>
-  <td rowspan="3" align="left" valign="top">
-    <a href="javascript:PopOpenAddressBook('recp_id|<?_("To:")>|cc_id|<?_("CC:")>|bcc_id|<?_("BCC:")>');" title="<?_("Contacts")>">
-       <img align=middle border=0 width=24 height=24 src="static/viewcontacts_24x.gif">&nbsp;<?_("Contacts")>
-    </a>
-  </td>
 </tr>
 <tr>
   <th><label for="cc_id"><?_("CC:")></label></th>
   <th><label for="subject_id" > 
       <?%("COND:BSTR", 6, "__SUBJREQUIRED", 0, _("Subject (optional):"), _("Subject:")>
   </label></th>
-  <td colspan="2">
+  <td>
     <input type="text" name="subject" id="subject_id" value="<?BSTR("subject", "H")>" size=45 maxlength=70>
   </td>
 </tr>
-<tr><td colspan="3">
-<input type="hidden" name="sig_inserted" value="yes">
-
+<tr><td colspan="2">
 
+<div class="attachment buttons">
+<img src="static/diskette_24x.gif" class="imgedit" ><?_("Attachments:")>
+<select name="which_attachment" size=1>
+<?ITERATE("MSG:ATTACHNAMES", ="edit_message_section_attach_select")>
+</select>
+&nbsp;&nbsp;&nbsp;<?_("Attach file:")>
+<input name="attachfile" class="attachfile" size=16 type="file">
+&nbsp;&nbsp;<input type="submit" name="attach_button" value="<?_("Add")>">
+&nbsp;&nbsp;<input type="submit" name="remove_attach_button" value="<?_("Remove")>">
+</div>
+</td></tr>
+<tr><td colspan="2">
 
+<input type="hidden" name="sig_inserted" value="yes">
 
 <textarea name="msgtext" cols="80" rows="15">
 <?BSTR("msgtext", "X")><?!("COND:BSTR", 1, "fwdquote")>&lt;br /&gt;
 <?!("X", 6)><??("X", 5)><?!("X", 4)><?!("COND:ROOM:TYPE_IS", 7, #"VIEW_WIKI")><?MAIL:EDITWIKI("X")><?!("X", 7)>
 </textarea>
 
-
-
-
 <?=("richedit")>
 
-<div class="attachment buttons">
-<img src="static/diskette_24x.gif" class="imgedit" ><?_("Attachments:")>
-<select name="which_attachment" size=1>
-<?ITERATE("MSG:ATTACHNAMES", ="edit_message_section_attach_select")>
-</select>
-&nbsp;&nbsp;&nbsp;<?_("Attach file:")>
-<input name="attachfile" class="attachfile" size=16 type="file">
-&nbsp;&nbsp;<input type="submit" name="attach_button" value="<?_("Add")>">
-&nbsp;&nbsp;<input type="submit" name="remove_attach_button" value="<?_("Remove")>">
-
-</div></td></tr></table></form>
+</td></tr></table></form>
+
+<div style="display:none" id="submit-o-matic"><ul>
+<li>
+       <a href="javascript:submit_post('post');">
+               <img src="static/newmess3_24x.gif" alt="" width="24" height="24">
+               <span class="navbar_link">
+               <?!("COND:BSTR", 1, "__RCPTREQUIRED")><?_("Send message")><?!("X", 1)>
+               <??("COND:BSTR", 2, "__RCPTREQUIRED")><?_("Post message")><?!("X", 2)>
+               </span>
+       </a>
+</li>
+<li>
+       <a href="javascript:submit_post('draft');">
+               <img src="static/folder_closed.gif" alt="" width="24" height="24">
+               <span class="navbar_link">
+               <?_("Save to Drafts")>
+               </span>
+       </a>
+</li>
+<li>
+       <a href="javascript:submit_post('cancel');">
+               <img src="static/closewindow.gif" alt="">
+               <span class="navbar_link">
+               <?_("Cancel")>
+               </span>
+       </a>
+</li>
+<?!("COND:BSTR", 1, "__RCPTREQUIRED")><li>
+       <a href="javascript:PopOpenAddressBook('recp_id|<?_("To:")>|cc_id|<?_("CC:")>|bcc_id|<?_("BCC:")>');">
+               <img src="static/viewcontacts_24x.gif" alt="" width="24" height="24">
+               <span class="navbar_link">
+               <?_("Contacts")>
+               </span>
+       </a>
+</li><?!("X", 1)>
+</div>
 
 <script type="text/javascript">        
- activate_entmsg_autocompleters();     
-
+       $("navbar").innerHTML = $("submit-o-matic").innerHTML;
+       <?!("COND:BSTR", 1, "__RCPTREQUIRED")>
+               activate_entmsg_autocompleters();
+       <?!("X", 1)>
+
+       function submit_post(which_action) {
+               document.enterform.submit_action.value = which_action;
+               document.enterform.submit();
+       }
 </script>
+
 </div>
 </div>
 </div>
index 7f3a8e1943bb33537d8e4c75296b243d72a5356b..ba4126d8ff6202d6099f01010520f940ba85ac76 100644 (file)
         <?LANG:SELECT> <br>
 </div>
         <div class="logbuttons">
-        <input type="submit" name="login_action" value="<?_("Login")>"   class="logbutton">
+        <input type="submit" name="login_action" value="<?_("Login")>" class="button">
        <??("COND:SERV:NEWU", 1)>
-        <input name="newuser_action" value="<?_("New User")>" class="logbutton" type="submit">
+        <input name="newuser_action" value="<?_("New User")>" class="button" type="submit">
        <??("X", 1)>
-        <input type="submit" name="exit_action" value="<?_("Exit")>"  class="logbutton">
+        <input type="submit" name="exit_action" value="<?_("Exit")>" class="button">
         <br>
         </div>
 </form>