* fix some fallout from last commit: iconbar now in head.html so no one should call...
authorMatt <matt@uncensored.citadel.org>
Mon, 26 Jan 2009 06:54:45 +0000 (06:54 +0000)
committerMatt <matt@uncensored.citadel.org>
Mon, 26 Jan 2009 06:54:45 +0000 (06:54 +0000)
* set WC->logged_in to 0 at the top of do_logout() to surpress iconbar on logout
* Fix IE6 iconbar bug, still not as good as it used to look :(
* Completely rework roombanner etc. so the web browser sizes roombanner, navbar etc. itself
* Added javascript hack so the new roombanner works in browsers that don't do display: table-cell;

23 files changed:
webcit/auth.c
webcit/iconbar.c
webcit/static/iconbaricns.css
webcit/static/summaryview.js
webcit/static/t/add_node.html
webcit/static/t/aide_inetconf.html
webcit/static/t/display_aide_menu.html
webcit/static/t/display_ignet_confirmdelete.html
webcit/static/t/display_main_menu.html
webcit/static/t/display_netconf.html
webcit/static/t/display_sitewide_config.html
webcit/static/t/edit_message.html
webcit/static/t/edit_node.html
webcit/static/t/edituser_select.html
webcit/static/t/files.html
webcit/static/t/files_jspicview.html
webcit/static/t/head.html
webcit/static/t/preferences.html
webcit/static/t/roombanner.html
webcit/static/t/userlist_detailview.html
webcit/static/t/who.html
webcit/static/wclib.js
webcit/static/webcit.css

index e48c4e69ce2d9f606ba9a7d8a6618e76a7341ce8..80543450fdad27f204cb781b726338d4cabbf35c 100644 (file)
@@ -570,6 +570,10 @@ void do_logout(void)
        FlushStrBuf(WC->wc_roomname);
        FlushStrBuf(WC->wc_fullname);
 
+       /* FIXME: this is to suppress the iconbar displaying, because we aren't
+          actually logged out yet */
+       WC->logged_in = 0;
+       
        /** Calling output_headers() this way causes the cookies to be un-set */
        output_headers(1, 1, 0, 1, 0, 0);
 
index a0ccd28820507c587dfb492c1970198ef85e3639..c1ba02ca01abc7e35950de6c73cc6e4ca7e893a7 100644 (file)
@@ -48,6 +48,7 @@ void doUserIconStylesheet(void) {
   hprintf("Cache-Control: private\r\n");
   
   begin_burst();
+  wprintf("#global { left: 16%%; }\r\n");
   pos = GetNewHashPos(WC->IconBarSettings, 0);
   while(GetNextHashPos(WC->IconBarSettings, pos, &HKLen, &key, &Data)) {
     value = (long) Data;
index 8e41bd078808ec97ce6570d8366e49ea7afd3279..cc48ce40923d68d1c4bdbf6f0807737c38b88c79 100644 (file)
@@ -1,9 +1,9 @@
-#button li , #ib_logoff {
+#button li , #ib_logoff {
     min-height: 32px;
     background-repeat: no-repeat !important;
     vertical-align: middle;
 }
-#button > li > a , #ib_logoff > a {
+#button li a , #ib_logoff a {
     padding-top: 6px;
     padding-left: 35px;
     min-height: 25px; /* Makes all of the 'button' to be clickable */
index b19e7efbde7181a00bbe5eae6a332e04fd45132a..9132c33d4fea0a121b4ea929cabb061c8281d0fe 100644 (file)
@@ -57,7 +57,6 @@ function createMessageView() {
   $('m_refresh').observe('click', getMessages);
   document.getElementById('m_refresh').setAttribute("href","#");
   Event.observe(document.onresize ? document : window, "resize", normalizeHeaderTable);
-  sizePreviewPane();
   Event.observe(document.onresize ? document : window, "resize", sizePreviewPane);
   $('summpage').observe('change', getPage);
   takeOverSearchOMatic();
@@ -163,6 +162,7 @@ function loadMessages(transport) {
   if (loadingMsg.parentNode != null) {
     loadingMsg.parentNode.removeChild(loadingMsg);
   }
+  sizePreviewPane();
 }
 function resortAndDisplay(sortMode) {
   var start = new Date();
@@ -407,18 +407,23 @@ function CtdlResizeMouseDown(event) {
 
 function sizePreviewPane() {
   var preview_pane = document.getElementById("preview_pane");
-  var content = $('content');  // we'd like to use prototype methods here
+  var summary_view = document.getElementById("summary_view");
+  var banner = document.getElementById("banner");
+  var message_list_hdr = document.getElementById("message_list_hdr");
+  var content = $('global');  // we'd like to use prototype methods here
   var childElements = content.childElements();
   var sizeOfElementsAbove = 0;
-  var heightOfContent = content.offsetHeight;
-  for(var i=0; i<childElements.length; i++) {
-    var element = childElements[i];
-    if (element.id != 'preview_pane') {
-      var height = element.offsetHeight;
-      sizeOfElementsAbove += height;
-    }
-  }
-  preview_pane.style.height = (heightOfContent-sizeOfElementsAbove)+"px";
+  var heightOfViewPort = document.viewport.getHeight() // prototypejs method
+  var bannerHeight = banner.offsetHeight;
+  var contentViewPortHeight = heightOfViewPort-banner.offsetHeight-message_list_hdr.offsetHeight;
+  contentViewPortHeight = 0.98 * contentViewPortHeight; // leave some error
+  // Set summary_view to 20%;
+  var summary_height = 0.20 * contentViewPortHeight;
+  // Set preview_pane to the remainder
+  var preview_height = 0.80 * contentViewPortHeight;
+  
+  summary_view.style.height = (summary_height)+"px";
+  preview_pane.style.height = (preview_height)+"px";
 }
 function CtdlResizeMouseMove(event) {
   var clientX = event.clientX;
@@ -465,9 +470,10 @@ function normalizeHeaderTable() {
 
 function setupPageSelector() {
   var summpage = document.getElementById("summpage");
+  //var select_page = document.getElementById("selectpage");
   summpage.innerHTML = "";
   if (is_safe_mode) {
-    summpage.parentNode.style.display="inline !important"; //override webcit.css
+    summpage.parentNode.setAttribute("style","display: inline !important"); //override webcit.css
   } else {
     return;
   }
index afa1f93aed78a507529812123815ba0ffe93f8ba..e08b671ce670f632564f0cf4f6a1e3f7ca4f2322 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <?_("Add a new node")>
index 4aae57667bd8aafcd03442dab15853b9867be942..4207e272e2587f245a6c8543529f94142a9dd2c1 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <??("COND:AIDE", 1)><?_("System Administration Menu")><??("X", 1)>
index 4c686c36be02cb418898e7ead139d58359ae854c..e8449f2706ea474fec49e0ff7a43fd9a6039fb2d 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <??("COND:AIDE", 1)><?_("System Administration Menu")><??("X", 1)>
index c43133946d6fdf53c685ed7fee714302a314fe89..1ecc817b9283f89197a613c65d52e34525506858 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <?_("Confirm delete")> <?BSTR("node")>
index 1487fb01d7fe2876b744cf2016845a81169c588f..afe474432e13f92e2b2fc2ca9c66f6314d5a3b61 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <?ROOMBANNER>
 <div id="content">
 <div class="fix_scrollbar_bug">
index 23e769af2c0e3057e7d415e969c82b5930f06ff9..749ec6d9c0e1307b5cf576368af7649c22f5f3ba 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
   <h1><?_("Network configuration")></h1>
 </div>
index 1d1809c66b51999c82415a9e4c1dba4d09e3fdec..c1f3b302d69e39051a577031344b58628df21e08 100644 (file)
@@ -1,4 +1,4 @@
-<?=("head")><?=("important_msg")><?ICONBAR>
+<?=("head")><?=("important_msg")>
 <div id="banner">
 <h1><?_("Site configuration")></h1>
 </div>
index 080dc26f373a44de3a72af1f985b1286cb620c07..f50994152bb4a55fae5cab64462bf05bed67c1e6 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <?ROOMBANNER>
 </div>
 <div id="content">
index 198730d588c27e15a82da93d5151ba99b9060866..321e96bcfff1ad120ed162028f0a4eb63c42c84d 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <?_("Add a new node")>
index fde9e292afa3b25a5d70fd6752a4bd8041fe81c7..a9169f3370256ea4533bbc28721a242818b49798 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
   <img src="static/usermanag_48x.gif">
   <h1><??("COND:AIDE", 1)><?_("Edit or delete users")><??("X", 1)></h1>
index a4aecbabc7db3cbbcfb292bb09af918fee98361d..532c1a21ba2307a26df2b2026b0846d4c9a4e652 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner"><h1><?_("Files available for download in")> <?ROOMNAME></h1></div>
 
 <script language="javascript" type="text/javascript">
index 72ecb6e352f394d170652e764d1c89d6b2a4fb76..b0d73f7a64f7209d044b86820d2d7fd3f38a224e 100644 (file)
@@ -1,7 +1,6 @@
 <??("COND:BSTR", 1, "frame")>
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 <h1>
 <?_("Pictures in")><?ROOM:NAME>
index 059c6c717b57179d33b9bcc996226e85f8f8649d..6076d5557ad45746b582eb1082c93e83964ddc77 100644 (file)
@@ -33,7 +33,7 @@
 </head>
 <body>
 <??("COND:LOGGEDIN",1)>
-<?=("iconbar")>
+<?ICONBAR>
 <??("X",1)>
 <div id="global">
 <!-- end head.html -->
index 222ed05dda4adc24c12ece228e576ab3782f676a..fcb23f77ab3721ec13fc2083af2ebea3b5404c5e 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
 </div>
 <div id="content" class="service">
index 9ef1bd950472d82d615e5f945777d6b5cb56bbe9..02fa1df6a0829b859f51015136aa02a4dfb7e6d6 100644 (file)
@@ -1,11 +1,12 @@
 <!-- start roombanner.html -->
 <div>
-<div class="room_banner" >
+<div class="room_banner" id="room_banner" >
 <?ROOMPIC>
 <h1 id="rmname"><?ROOMNAME></h1>
 <?ROOMINFO>
 <p id="nummsgs"><?NUMMSGS></p>
 </div>
+<div id="actiondiv">
 <ul class="room_actions">
 <li class="start_page"><?START></li>
 <li class="search" id="searchomatic"><?SEARCHOMATIC></li>
@@ -14,4 +15,5 @@
 page: ")> <select id="summpage"><option> </option></select></li><??("X",1)>
 </ul>
 </div>
+</div>
 <!-- end roombanner.html -->
index 63814bf6503f9321fd31b54e5c5afd761a87b6d0..340ffefa82b10d4e86691bcd04da28e2a03f87e2 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 <div id="banner">
   <h1><?_("Edit user account: ")><?USERLIST:USERNAME("X")></h1>
 </div>
index 522f52819375b69699b9195f8438966025cdc537..632aed2c1ac3884360275fdd4d099d5679a9e41c 100644 (file)
@@ -1,6 +1,5 @@
 <?=("head")>
 <?=("important_msg")>
-<?ICONBAR>
 
 <script type="text/javascript">
 function ConfirmKill() { 
index 0f32b4e80f59518ed58673b19228d4573ca2fd14..48fdd05d83d9fcfc31dd48ec3f3f4975d576ff0e 100644 (file)
@@ -27,6 +27,7 @@ if (window.navigator.userAgent.toLowerCase().match("gecko")) {
 var ns6=document.getElementById&&!document.all;
 Event.observe(window, 'load', ToggleTaskDateOrNoDateActivate);
 Event.observe(window, 'load', taskViewActivate);
+Event.observe(window, 'load', fixbanner);
 //document.observe("dom:loaded", setupPrefEngine);
 document.observe("dom:loaded", setupIconBar);
 document.observe('dom:loaded', function() { if (!!document.getElementById("ib_chat_launch")) { $('ib_chat_launch').observe('click', launchChat); } });
@@ -762,3 +763,29 @@ function WCLog(msg) {
     opera.postError(msg);
   }
 }
+
+function fixMissingCSSTable(elems) {
+ if (elems[0] == null) {
+    return;
+  }
+  if (elems[0].getStyle("display") != "table-cell") {
+    var parentNode = elems[0].parentNode;
+    var table = document.createElement("table");
+    table.style.width = "100%";
+    var tbody = document.createElement("tbody");
+    table.appendChild(tbody);
+    var tr = document.createElement("tr");
+    tbody.appendChild(tr);
+    parentNode.appendChild(table);
+    for(var i=0; i<elems.length; i++) {
+      parentNode.removeChild(elems[i]);
+      var td = document.createElement("td");
+      td.appendChild(elems[i]);
+      tr.appendChild(td);
+    }
+  }
+}
+function fixbanner() {
+  var elems = [$('room_banner'),$('actiondiv')];
+  fixMissingCSSTable(elems);
+}
index ba4e64b0dc770e38599dad457b46494050b2c83a..02f2a4e2d1a560cb3b6b7e21f03aca9ae8bfda46 100644 (file)
@@ -501,7 +501,9 @@ a:visited { color: purple; }
 * html {
        overflow: hidden;
 }
-
+html {
+    overflow: auto;
+}
 body {
        height: 100%;
        overflow: hidden;
@@ -509,10 +511,19 @@ body {
 }
 
 body, #global {
-       margin: 0;
+       margin-left: 0;
        padding: 0;
 }
 
+#global {
+    position: absolute;
+    bottom: 0;
+    top: 0;
+    right: 0;
+    left: 0;
+    overflow-y: auto;
+}
+
 #important_message {
        position: absolute;
        top: 0; 
@@ -549,27 +560,29 @@ body, #global {
 }
 
 #banner {
-       position: absolute;
+/*     position: absolute;
        top: 0;
        left: 16%;
        width: 84%;
-       height: 18%;
+       height: 18%; */
 }
 
 #navbar {
-       position: absolute;
+/*     position: absolute;
        bottom: 0; 
        left: 0;
-       width: 100%;
+       width: 100%; */
 }
 
 #content {
-       position: absolute;
+/*     position: absolute;
        top: 18%;
        left: 16%;
        width: 84%;
        height: 82%;
-       overflow: auto;
+       overflow: auto; */
+    position: relative;
+    bottom: 0;
 }
 /* Please avoid setting heights for any of the mailbox view elements (except summary_view and resize). In particular, do NOT set any for message_list_hdr as its not good feng shui */
 #message_list_hdr {
@@ -583,8 +596,8 @@ body, #global {
 }
 
 #summary_view {
-       height: 20%;
-       overflow: auto;
+       height: 100px;
+       overflow-y: scroll;
        cursor: pointer;
 }
 #message_list_body {
@@ -613,7 +626,7 @@ body, #global {
        width: 100%;
        overflow: hidden;
        cursor: s-resize;
-    height: 1%;
+    height: 6px;
 }
 
 #preview_pane {
@@ -775,11 +788,13 @@ body, #global {
 }
 
 /* Banner */
-
+#banner {
+    margin: 0;
+    padding: 0;
+}
 #banner .room_banner {
-       float: left;
-       margin: 0;
-       padding: 0;
+    display: table-cell;
+    width: 90%;
 }
 
 #banner .room_banner img {
@@ -806,11 +821,11 @@ body, #global {
 #room_infos img.close_infos {
        float: right;
 }
-
+#actiondiv {
+    display: table-cell;
+}
 #banner ul.room_actions {
-       margin: 0;
        list-style: none;
-       float: right;
        text-align: right;
 }