Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
authorArt Cancro <ajc@citadel.org>
Tue, 26 Oct 2010 22:50:55 +0000 (18:50 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 26 Oct 2010 22:50:55 +0000 (18:50 -0400)
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 baeb979d129e03178b66dc01a542ddf5edcaaa2f..bd4758f2c9719301005fe0b93cb1ac6d2237257d 100644 (file)
@@ -54,7 +54,7 @@ body {
        color: #000;
 }
 
-#message_list_hdr table, #resize_msglist, .message, .message_header, .vcard_edit_background_alt,.roomops_background_alt {
+#message_list_hdr table, #resize_msglist, .message, .entmsg, .message_header, .vcard_edit_background_alt,.roomops_background_alt {
        background-color: #CCC;
 }
 
@@ -117,9 +117,17 @@ body {
        height: 3px;
 }
 
-.message {
+.message, .entmsg {
        border: 1px outset #999;
        clear: both;
+       margin: 1%;
+       padding: 0;
+}
+
+.entmsg {
+       position: absolute;
+       height: 95%;
+       width: 98%;
 }
 
 .message_header .message_subject {
@@ -386,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;
@@ -404,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;
 }
 
@@ -586,17 +594,12 @@ body {
        padding: 2px;
 }
 
-.message {
-       margin: 1%;
-       padding: 0;
-}
-
 .message_header p {
        margin: 2px 0 2px 0;
        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;
 }
@@ -671,7 +674,7 @@ body {
        clear: both;
 }
 
-.message form div label {
+.message form div label, .entmsg form div label {
        display: block;
        float: left;
        margin: 0.3em;
@@ -679,30 +682,28 @@ body {
        text-align: right;
 }
 
-.message form div input, .message form div select { margin: 0.3em }
-
-.imgedit { vertical-align: middle }
+.message form div input, .message form div select, .entmsg form div input, .entmsg form div select {
+       margin: 0.3em
+}
 
-.send_edit_msg {
-       float: right;
-       margin-top: 0 ;
-       margin-right: 0;
-       padding: 2px 50px 2px 50px;
+.imgedit {
+       vertical-align: middle
 }
 
 .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 b359be51f65b610eb956d8ccedc6063122a0a06e..26b783b91c6db9a5d91dcbe71d81e9d42ac19d83 100644 (file)
@@ -2,25 +2,17 @@
 <?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
 <?ROOMBANNER>
 <div id="content">
-<div class="message"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
+<div class="entmsg"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
 <input type="hidden" name="postseq" value="<?DATE:NOW:NO>">
 <input type="hidden" name="return_to" value="<?BSTR("return_to")>">
 <input type="hidden" name="nonce" value="<?NONCE>">
 <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>