fix summary view
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 21 Jul 2011 20:39:36 +0000 (20:39 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 21:38:44 +0000 (21:38 +0000)
  - add neccessary stuff to header/trailer to make the page complete
  - add URL-handlers for the summary page sections for the refreshing
  - fix tokens and circumvent our singlequote bug once more.

webcit/static/t/summary/header.html
webcit/static/t/summary/page.html
webcit/static/t/summary/trailer.html
webcit/summary.c

index 254d0293cf41e1d8551a070e1d16224e0cf83880..db51e584e7958aac3456726b4c44c32c3224fed4 100644 (file)
@@ -1,3 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+       <head>
+               <title><?CURRENT_ROOM> - <?SERV:HUMANNODE></title>
+               <meta name="MSSmartTagsPreventParsing" content="TRUE" >
+               <meta name="keywords" content="groupware messaging collaboration" >
+               <link href="static/styles/webcit.css" rel="stylesheet" type="text/css">
+               <link href="static/styles/datepicker.css" rel="stylesheet" type="text/css">
+               <link href="do_template?template=iconbar_user" rel="stylesheet" type="text/css">
+               <link href="static/styles/iconbaricns.css" rel="<?%("COND:ICONBAR:ACTIVE", 1, 0, #"ib_displayas", "", "alternate ")>stylesheet" type="text/css" id="style_iconbar_icns" title="Default iconbar">
+               <link href="static/styles/iconbarpiconly.css" rel="<?%("COND:ICONBAR:ACTIVE", 1, 1, #"ib_displayas", "","alternate ")>stylesheet" type="text/css" id="style_iconbar_piconly" title="Iconbar without text">
+               <?CSSLOCAL> 
+
+               <script type="text/javascript" src="static/prototype.js"></script> 
+               <script type="text/javascript" src="static/scriptaculous.js"></script> 
+               <script type="text/javascript" src="static/datepicker-dev.js"></script>
+               <script type="text/javascript" src="static/wcpref.js"></script>
+               <script type="text/javascript" src="static/table.js"></script>
+               <script type="text/javascript" src="static/wclib.js"></script>
+               <script type="text/javascript" src="static/authmethods.js"></script>
+               <script type="text/javascript" src="static/roomops.js"></script>
+               <script type="text/javascript" src="static/ctdldragdrop.js"></script>
+               <script type="text/javascript" src="static/modal.js"></script>
+       </head>
+<body>
+<div id="is_logged_in" style="display:none"><?%("COND:LOGGEDIN", 1, 1, 1, "no", "yes")></div>
+<?ICONBAR>
+<div id="global">
+
+<?=("paging_anchor")>
+
+<!--("end head.html")-->
+
 <!-- begin summary_header.html -->
 <script language="javascript" type="text/javascript">
   document.onkeydown = CtdlMsgListKeyPress;
index 1e8ac8ed6934a74b34e46731b7f4ee64e9dc4e30..7f2aa7734fda6c6f0b49e5d02b3d66f3d271ac5d 100644 (file)
@@ -2,7 +2,7 @@
 <div id="banner" class="banner">
   <table border=0><tr>
       <td><img src="static/webcit_icons/essen/32x32/summary.png"></td>
-      <td><h1><?_("Summary page for ")><??("COND:LOGGEDIN", 1)><?CURRENT_USER("X")><??("X", 1)><?!("COND:LOGGEDIN", 2)><?SERV:HUMANNODE("X")><??("X", 2)></h1><h2><?TIME:NOW)></h2></td></tr></table>
+      <td><h1><?_("Summary page for ")><??("COND:LOGGEDIN", 1)><?CURRENT_USER("X")><??("X", 1)><?!("COND:LOGGEDIN", 2)><?SERV:HUMANNODE("X")><??("X", 2)></h1><h2><?TIME:NOW></h2></td></tr></table>
   <div id="actiondiv">
     <ul class="room_actions">
       <li class="start_page"><?OFFERSTARTPAGE></li></ul>
 * instead of the whole thing.
 ")>
 <div id="content" class="service">
-  summary_inner_div();
+  <table width="98%" cellspacing="3" cellpadding="0">
+    <tr valign=top>
+      <td width=33%>
+       <div class="box">       
+         <div class="boxlabel">        
+           <?_("Messages")>
+         </div><div class="boxcontent">        
+           <div id="msg_inner">
+             <?SUMMARY:NEWMESSAGES_SELECTION>
+       </div></div></div>
+      </td>
+      <td width=33%>
+       <div class="box">       
+         <div class="boxlabel">        
+           <?_("Tasks")>
+         </div><div class="boxcontent">        
+           <div id="tasks_inner">      
+             <?SUMMARY:TASKSSECTION>
+       </div></div></div>
+      </td>
+      <td width=33%>
+       <div class="box">       
+         <div class="boxlabel">        
+           <?_("Today&nbsp;on&nbsp;your&nbsp;calendar")>
+         </div><div class="boxcontent">        
+           <div id="calendar_inner">
+             <?SUMMARY:CALENDAR_SECTION>
+       </div></div></div>
+      </td>
+      
+    </tr><tr valign=top>
+
+      <td colspan=2>
+       <div class="box">       
+         <div class="boxlabel">        
+           <?_("Who‘s&nbsp;online&nbsp;now")>
+         </div><div class="boxcontent">
+           <div id="who_inner"><?=("who_summary")></div></div></div>
+      </td>
+      <td width=33%>
+       <div class="box">       
+         <div class="boxlabel">        
+           <?_("About&nbsp;this&nbsp;server")>
+         </div><div class="boxcontent">        
+           <div id="info_inner">       
+             <?_("You are connected to")> <?SERV:HUMANNODE>,
+             <?_("running")> <?SERV:SOFTWARE> 
+             <?_("with")> <?PACKAGESTRING>, 
+             <?_("server build")> <?SERV:REV_LEVEL>
+             <?_("and located in")> <?SERV:BBS_CITY>.
+             <?_("Your system administrator is")> <?SERV:ADMIN>
+       </div></div></div>
+      </td>
+  </tr></table>
+
 </div>
 <script type="text/javascript">
  new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html',
  new Ajax.PeriodicalUpdater('do_template', 'template=who_summary',
                             { method: 'get', frequency: 30 }  );
 </script>
-
-<table width="98%%" cellspacing="3" cellpadding="0">
-  <tr valign=top>
-    <td width=33%>
-      <div class="box">        
-       <div class="boxlabel">  
-         <?_("Messages")>
-       </div><div class="boxcontent">  
-         <div id="msg_inner">
-           <?SUMMARY:NEWMESSAGES_SELECTION>
-      </div></div></div>
-    </td>
-    <td width=33%>
-      <div class="box">        
-       <div class="boxlabel">  
-         <?_("Tasks")>
-       </div><div class="boxcontent">  
-         <div id="tasks_inner">        
-           <?SUMMARY:TASKSSECTION)>
-      </div></div></div>
-    </td>
-    <td width=33%>
-      <div class="box">        
-       <div class="boxlabel">  
-       <?_("Today&nbsp;on&nbsp;your&nbsp;calendar")>
-       </div><div class="boxcontent">  
-         <div id="calendar_inner">
-           <?SUMMARY:CALENDAR_SECTION)
-              </div></div></div>
-    </td>
-    
-  </tr><tr valign=top>
-
-    <td colspan=2>
-      <div class="box">        
-       <div class="boxlabel">  
-         <?_("Who's&nbsp;online&nbsp;now")>
-       </div><div class="boxcontent">
-         <div id="who_inner"><?=("who_summary")></div></div></div>
-    </td>
-    <td width=33%>
-      <div class="box">        
-       <div class="boxlabel">  
-         <?_("About&nbsp;this&nbsp;server")>
-       </div><div class="boxcontent">  
-         <div id="info_inner"> 
-               <?_("You are connected to")> <?SERV:HUMANNODE>,
-               <?_("running")> <?SERV:SOFTWARE> 
-               <?_("with")> <?PACKAGESTRING>, 
-               <?("server build")> <?SERV:REV_LEVEL>
-               <?("and located in")> <?SERV:BBS_CITY>.
-               <?("Your system administrator is")> <?SERV:ADMIN>
-      </div></div></div>
-    </td>
-</tr></table>
 <?=("summary_trailer")>
index 5a3ac48f5cb134af73f68c87625a0dea5d1f2ac6..dfa28fe8ee42bee7b83a95a5406871e564592f0f 100644 (file)
@@ -4,3 +4,10 @@
 <hr>
 </div>
 <div id="preview_pane">
+<!-- start trailing.html -->
+               <noscript><div id="noscript_warning">
+                       <?_("WARNING: You have JavaScript disabled in your web browser.  Many functions of this system will not work properly.")>
+               </div></noscript>
+               <script type="text/javascript"><?TRAILING_JAVASCRIPT></script>
+       </body>
+</html>
index 1c37a0f15c775b5ab75dc380c00f552e4d5f8d0e..6372245a003b84145e906a89c607a4f52f5b9402 100644 (file)
@@ -54,7 +54,7 @@ void tmplput_output_date(StrBuf *Target, WCTemplputParams *TP)
 /*
  * New messages section
  */
-void new_messages_section(StrBuf *Target, WCTemplputParams *TP) {
+void new_messages_section(void) {
        char buf[SIZ];
        char room[SIZ];
        int i;
@@ -91,7 +91,7 @@ void new_messages_section(StrBuf *Target, WCTemplputParams *TP) {
 /*
  * Task list section
  */
-void tasks_section(StrBuf *Target, WCTemplputParams *TP) {
+void tasks_section(void) {
        int num_msgs = 0;
        HashPos *at;
        const char *HashKey;
@@ -138,7 +138,7 @@ void tasks_section(StrBuf *Target, WCTemplputParams *TP) {
 /*
  * Calendar section
  */
-void calendar_section(StrBuf *Target, WCTemplputParams *TP) {
+void calendar_section(void) {
        char cmd[SIZ];
        int num_msgs = 0;
        HashPos *at;
@@ -187,13 +187,29 @@ void calendar_section(StrBuf *Target, WCTemplputParams *TP) {
        __calendar_Cleanup(&v);
 }
 
+void tmplput_new_messages_section(StrBuf *Target, WCTemplputParams *TP) {
+       new_messages_section();
+}
+void tmplput_tasks_section(StrBuf *Target, WCTemplputParams *TP) {
+       tasks_section();
+}
+void tmplput_calendar_section(StrBuf *Target, WCTemplputParams *TP) {
+       calendar_section();
+}
+
 void 
 InitModule_SUMMARY
 (void)
 {
        RegisterNamespace("TIME:NOW", 0, 0, tmplput_output_date, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:NEWMESSAGES_SELECTION", 0, 0, new_messages_section, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:TASKSSECTION", 0, 0, tasks_section, NULL, CTX_NONE);
-       RegisterNamespace("SUMMARY:CALENDAR_SECTION", 0, 0, calendar_section, NULL, CTX_NONE);
+       RegisterNamespace("SUMMARY:NEWMESSAGES_SELECTION", 0, 0, tmplput_new_messages_section, NULL, CTX_NONE);
+       RegisterNamespace("SUMMARY:TASKSSECTION", 0, 0, tmplput_tasks_section, NULL, CTX_NONE);
+       RegisterNamespace("SUMMARY:CALENDAR_SECTION", 0, 0, tmplput_calendar_section, NULL, CTX_NONE);
+
+       WebcitAddUrlHandler(HKEY("new_messages_html"), "", 0, new_messages_section, AJAX);
+       WebcitAddUrlHandler(HKEY("tasks_inner_html"), "", 0, tasks_section, AJAX);
+       WebcitAddUrlHandler(HKEY("calendar_inner_html"), "", 0, calendar_section, AJAX);
+       WebcitAddUrlHandler(HKEY("mini_calendar"), "", 0, ajax_mini_calendar, AJAX);
+
 }