* restore context menu in online user list
authorMatt <matt@uncensored.citadel.org>
Wed, 28 Jan 2009 02:56:19 +0000 (02:56 +0000)
committerMatt <matt@uncensored.citadel.org>
Wed, 28 Jan 2009 02:56:19 +0000 (02:56 +0000)
* fix online user in iconbar list becoming big after last commit
* replace #iconbar > ul > li selectors with classes so IE6 can understand them, and so these changes don't cause the above

webcit/roomops.c
webcit/static/iconbaricns.css
webcit/static/iconbarpiconly.css
webcit/static/summaryview.js
webcit/static/t/iconbar.html
webcit/static/wclib.js
webcit/static/webcit.css

index 6011b116e99298be20155eadd49216638e4dc4bc..7b3a39617d7e286bd691e6f7e36a7e2dfe16e15e 100644 (file)
@@ -3633,7 +3633,7 @@ void knrooms(void)
 
        /** title bar */
        wprintf("<div id=\"banner\">\n");
-       wprintf("<div class=\"room_banner\">");
+       wprintf("<div class=\"room_banner\" id=\"room_banner\">");
        wprintf("<h1>");
        if (!strcasecmp(ChrPtr(ListView), "rooms")) {
                wprintf(_("Room list"));
index cc48ce40923d68d1c4bdbf6f0807737c38b88c79..e8e9407769187a01612631071632d7a603fbf4d3 100644 (file)
@@ -1,13 +1,13 @@
-#button li , #ib_logoff {
+.ib_button {
     min-height: 32px;
     background-repeat: no-repeat !important;
     vertical-align: middle;
 }
-#button li a , #ib_logoff a {
+.ib_button_link {
     padding-top: 6px;
     padding-left: 35px;
-    min-height: 25px; /* Makes all of the 'button' to be clickable */
     height: 100%;
+    min-height: 25px; /* Makes all of the 'button' to be clickable */
 }
 #ib_summary {
     background-image: url("/static/summscreen_32x.gif");
index 25ecfbffb0f80fa21f5317340fbb6a8fa4c974a6..1577608b350165baab2db504f295331bd09bd841 100644 (file)
@@ -1,11 +1,11 @@
 @import url("/static/iconbaricns.css");
 
-#button > li {
+.ib_button {
     width: 35px;
 }
-#button > li > a {
+.ib_button_link {
     padding-left: 0;
 }
-#button > li > a > span {
+.ib_button_link span {
     display: none;
 }
\ No newline at end of file
index 8f3a479cd67a91cc93e45443c3d11a043e40fe5b..913a389dff12caca270d56fa76b7f823b51012a9 100644 (file)
@@ -52,7 +52,7 @@ function createMessageView() {
   mlh_subject.observe('click',ApplySort);
   mlh_from.observe('click',ApplySort);
   $(document).observe('keyup',CtdlMessageListKeyUp,false);
-  window.oncontextmenu = function() { return false; };  
+  //window.oncontextmenu = function() { return false; };  
   $('resize_msglist').observe('mousedown', CtdlResizeMouseDown);
   $('m_refresh').observe('click', getMessages);
   document.getElementById('m_refresh').setAttribute("href","#");
@@ -361,11 +361,17 @@ function CtdlMessageListKeyUp(event) {
   var key = event.which;
   if (key == 46) { // DELETE
     for(msgId in currentlyMarkedRows) {
+      if (!room_is_trash) {
       new Ajax.Request('ajax_servcmd', 
                       {method: 'post',
                           parameters: 'g_cmd=MOVE ' + msgId + '|_TRASH_|0'
                           });
+      } else {
+       new Ajax.Request('ajax_servcmd', {method: 'post',
+             parameters: 'g_cmd=DELE '+msgId});
+      }
     }
+    document.getElementById("preview_pane").innerHTML = "";
     deleteAllMarkedRows();
   }
 }
@@ -468,6 +474,7 @@ function ApplySorterToggle() {
 function normalizeHeaderTable() {
   var message_list_hdr = document.getElementById("message_list_hdr");
   var summary_view = document.getElementById("summary_view");
+  var resize_msglist = document.getElementById("resize_msglist");
   var headerTable = message_list_hdr.getElementsByTagName("table")[0];
   var dataTable = summary_view.getElementsByTagName("table")[0];
   var dataTableWidth = dataTable.offsetWidth;
index dc25d8b8965868f51646ea30b9e2500b8068c766..c5a47a97294b8331cd3c9a930976a39819697f61 100644 (file)
@@ -6,43 +6,43 @@
   <div id="roomlist"></div>
   <div id="iconbar_menu">
 <ul id="button">
-<li id="ib_summary">
-    <a href="summary" title="<?_("Your summary page")>"><span>
+<li id="ib_summary" class="ib_button">
+    <a class="ib_button_link" href="summary" title="<?_("Your summary page")>"><span>
         <?_("Summary")>
     </span></a>
 </li>
-<li id="ib_inbox">
-    <a href="dotgoto?room=_MAIL_" title="<?_("Go to your email inbox")>"><span>
+<li id="ib_inbox" class="ib_button">
+    <a class="ib_button_link" href="dotgoto?room=_MAIL_" title="<?_("Go to your email inbox")>"><span>
        <?_("Mail")></span>
     </a>
 </li>
-<li id="ib_calendar">
-    <a href="dotgoto?room=_CALENDAR_" title="<?_("Go to your personal calendar")>"><span>
+<li id="ib_calendar" class="ib_button">
+    <a class="ib_button_link" href="dotgoto?room=_CALENDAR_" title="<?_("Go to your personal calendar")>"><span>
        <?_("Calendar")></span>
     </a>
 </li>
-<li id="ib_contacts">
-    <a href="dotgoto?room=_CONTACTS_" title="<?_("Go to your personal address book")>"><span>
+<li id="ib_contacts" class="ib_button">
+    <a class="ib_button_link" href="dotgoto?room=_CONTACTS_" title="<?_("Go to your personal address book")>"><span>
            <?_("Contacts")></span>
     </a>
 </li>
-<li id="ib_notes">
-    <a href="dotgoto?room=_NOTES_" title="<?_("Go to your personal notes")>"><span>
+<li id="ib_notes" class="ib_button">
+    <a class="ib_button_link" href="dotgoto?room=_NOTES_" title="<?_("Go to your personal notes")>"><span>
        <?_("Notes")></span>
     </a>
 </li>
-<li id="ib_tasks">
-<a href="dotgoto?room=_TASKS_" title="<?_("Go to your personal task list")>"><span>
+<li id="ib_tasks" class="ib_button">
+<a class="ib_button_link" href="dotgoto?room=_TASKS_" title="<?_("Go to your personal task list")>"><span>
 <?_("Tasks")></span>
 </a>
 </li>
-<li id="ib_rooms">
-<a href="knrooms" title="<?_("List all your accessible rooms")>"><span>
+<li id="ib_rooms" class="ib_button">
+<a class="ib_button_link" href="knrooms" title="<?_("List all your accessible rooms")>"><span>
 <?_("Rooms")></span>
 </a>
 </li>
-<li id="ib_users">
-<a href="do_template?template=who" title="<?_("See who is online right
+<li id="ib_users" class="ib_button">
+<a class="ib_button_link" href="do_template?template=who" title="<?_("See who is online right
 now")>"><span>
 <?_("Online users")>
 </span>
@@ -51,27 +51,27 @@ now")>"><span>
 <li><?_("Loading")></li>
 </ul>
 </li>
-<li id="ib_chat">
-<a href="#" id="ib_chat_launch"><span>
+<li id="ib_chat" class="ib_button">
+<a class="ib_button_link" href="#" id="ib_chat_launch"><span>
 <?_("Chat")>
 </span>
 </a>
 </li>
-<li id="ib_advanced">
-<a href="do_template?template=display_main_menu" title="<?_("Advanced Options Menu: Advanced Room commands, Account Info, and Chat")>"><span>
+<li id="ib_advanced" class="ib_button">
+<a class="ib_button_link" href="do_template?template=display_main_menu" title="<?_("Advanced Options Menu: Advanced Room commands, Account Info, and Chat")>"><span>
 <?_("Advanced")>
 </span>
 </a>
 </li>
 <??("COND:AIDE", 1)>
-<li id="ib_admin">
-<a href="do_template?template=display_aide_menu" title="<?_("Room and system administration functions")>"><span><?_("Administration")></span></a>
+<li id="ib_admin" class="ib_button">
+<a class="ib_button_link" href="do_template?template=display_aide_menu" title="<?_("Room and system administration functions")>"><span><?_("Administration")></span></a>
 </li>
 <??("X",1)>
 </ul>
 </div>
-<div id="ib_logoff">
-<a href="termquit" onclick="return confirm('<?_("Log off now?")>');"
+<div id="ib_logoff" class="ib_button">
+<a class="ib_button_link" href="termquit" onclick="return confirm('<?_("Log off now?")>');"
 title="<?_("Log off")>">
 <span><?_("Log off")></span>
 </a>
index f7db14842e728dd7565401bed530cba5f38dd655..6566a1985621000c94dce9b496e7790964c36e6d 100644 (file)
@@ -147,7 +147,7 @@ function setupIconBar() {
     }
   }
   var online_users = document.getElementById("online_users");
-  if (online_users.offsetParent != null) {
+  if (online_users.offsetParent != null && online_users.offsetTop > 0) {
     new Ajax.PeriodicalUpdater('online_users', 'do_template?template=wholist_section', {method: 'get', frequency: 30});
   }
 }
@@ -789,6 +789,21 @@ function fixMissingCSSTable(elems) {
   }
 }
 function fixbanner() {
+  // Use prototype api methods here
   var elems = [$('room_banner'),$('actiondiv')];
   fixMissingCSSTable(elems);
+  var banner = $('banner'); 
+  if (banner != null) {
+  }
+}
+
+function fixOffsetBanner() {
+  var banner = document.getElementById("banner");
+  if (banner.offsetLeft > 0) {
+    var viewportWidth = document.viewport.getWidth();
+    var iconbarWidth = document.getElementById("iconbar").offsetWidth;
+    var contentDiv = document.getElementById("content");
+    var newContentWidth = viewportWidth-iconbarWidth;
+    contentDiv.style.width = newContentWidth+"px";
+  }
 }
index 80dd0d2f1d26f49694488dfe9a9a93a78d4f6812..85890dccf7c8c4a197cf421d739d7dc673c8be30 100644 (file)
@@ -31,8 +31,8 @@ body { font-size: 100%;}
        font-size: 80%;
 }
 
-#online_users li {
-       font-size: 80%;
+#online_users li {
+       font-size: 80% !important;
 }
 .marked_row {
     color: white;
@@ -70,7 +70,7 @@ body {
        text-transform: uppercase;
 }
 
-#iconbar ul li, #room_infos, #address_book_popup,.roomops_cell, .roomops_cell_edit, .mimepart, #ib_logoff, .iconbar_text {
+.ib_button, #room_infos, #address_book_popup,.roomops_cell, .roomops_cell_edit, .mimepart, .iconbar_text {
        background-color: #F0FFFF;
        color: #333;
 }
@@ -80,7 +80,7 @@ body {
        list-style: none;
 }
 
-#iconbar li a, #ib_logoff a {
+.ib_button {
        font-size: 100%;
 }
 
@@ -95,7 +95,7 @@ body {
        font-weight: 700;
 }
 
-#button li, #ib_logoff {
+.ib_button {
        border: none;
        border-bottom: 2px groove #CCC;
        border-right: 2px groove #CCC;
@@ -110,7 +110,7 @@ body {
        border-bottom: 1px solid #AAA;
 }
 
-#button li a , #ib_logoff a{
+.ib_button_link, .ib_button_link:visited, .ib_button_link:link, #online_users a {
        color: #000;
        text-decoration: none;
 }
@@ -464,7 +464,7 @@ a:visited { color: purple; }
 
 #customize a:active, #customize a:link, #customize a:visited { color: black; }
 
-#important_message, .buttons a:hover, .msgbuttons a:hover, #button li:hover, #online_users li a:hover, #navbar ul li a:hover, #ib_logoff:hover {
+#important_message, .buttons a:hover, .msgbuttons a:hover, #button li:hover, #online_users li a:hover, #navbar ul li a:hover, #ib_logoff:hover {
        background-color: #AD1C00;
        color: #FFF;
 } /* input:hover as well?? */
@@ -742,7 +742,7 @@ body, #global {
 
 /* Iconbar */
 
-.logo, .logo_citadel, #iconbar #button, .iconbar_text, #ib_logoff {
+.logo, .logo_citadel, #iconbar #button, .iconbar_text, .ib_button {
        margin: 0;
        padding: 0;
 }
@@ -758,13 +758,13 @@ body, #global {
        width: 100%;
 }
 
-#button > li, #ib_logoff {
+.ib_button {
        margin: 4px 8px 4px 8px;
        padding: 0;
     display: block;
 }
-#button > li > a, #ib_logoff > a {
-    width: 100%;
+.ib_button_link {
+    /* width: 100%; */
     display: block;
 }