Small layout fixes.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 30 Apr 2009 09:23:20 +0000 (09:23 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 30 Apr 2009 09:23:20 +0000 (09:23 +0000)
CHANGELOG.txt
includes/errors.inc
themes/aqua/renderer.php
themes/cool/renderer.php
themes/default/renderer.php

index b796f44efb89a67a7b3fd69c86b6d0896299f591..513105be1a90a785ac86cddf0a24f0625e3a057a 100644 (file)
@@ -19,6 +19,13 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+30-Apr-2009 Janusz Dobrowolski
+# Small layout fixes 
+$ /includes/errors.inc
+  /themes/aqua/renderer.php
+  /themes/cool/renderer.php
+  /themes/default/renderer.php
+
 29-Apr-2009 Janusz Dobrowolski
 ! Messages styles moved default.css
 $ /includes/errors.inc
index d5f7b4a097be3f038af28e29a87b8c8994d58bcd..160d41e5100dce8fe0d84bda8dd4d55b9c516f8f 100644 (file)
@@ -29,7 +29,7 @@ function error_handler($errno, $errstr, $file, $line) {
 //     Formats system messages before insert them into message <div>
 // FIX center is unused now
 function fmt_errors($center=false) {
-    global $messages;
+    global $messages, $path_to_root;
   
   $msg_class = array(
        E_USER_ERROR => 'err_msg',
@@ -38,8 +38,9 @@ function fmt_errors($center=false) {
 
   $type = E_USER_NOTICE;
   $content = '';
+  $class = 'no_msg';
   if (count($messages)) {
-       foreach($messages as $msg) {
+       foreach($messages as $cnt=>$msg) {
                if ($msg[0]>$type) continue;
 
                if ($msg[0]<$type) { 
@@ -53,12 +54,16 @@ function fmt_errors($center=false) {
                        }
                }
            $str = $msg[1];
-               $class = $msg_class[$type];
                if ($msg[0] < E_USER_ERROR && $msg[2] != null)
                  $str .= ' '._('in file').': '.$msg[2].' '._('at line ').$msg[3];
-               $content .= "<div class='$class'>$str</div><br>";
+               $content .= ($cnt ? '<hr>' : '').$str;
        }               
-  }
+       $class = $msg_class[$type];
+  } else
+   if ($path_to_root=='.')
+    return '';
+  
+  $content = "<div class='$class'>$content</div>";
   return $content;
 }
 //-----------------------------------------------------------------------------
index 87532dcb83b8907e0de19e3b8845b98a17f7a04c..87fd53d6adf31d2ef33a016c6580c2c3c8e3a039 100644 (file)
@@ -83,9 +83,6 @@
                                ."</tr></table></center>";
                        }
 
-                       if (!$is_index)
-                               echo "<br>";
-
                }
 
                function menu_footer($no_menu, $is_index)
index f98e6d16bfce0b3d54f8f949d9f2817059f5a01c..0d30270000db461e2da42533868da763a6591415 100644 (file)
@@ -83,9 +83,6 @@
                                ."</tr></table></center>";
                        }
 
-                       if (!$is_index)
-                               echo "<br>";
-
                }
 
                function menu_footer($no_menu, $is_index)
index 6c4db65cde8062540e34a318497e06275f4bb00e..5233839d91e513e918ce128ecd60a0d1912eaa9f 100644 (file)
@@ -84,9 +84,6 @@
                                ."</tr></table></center>";
                        }
 
-                       if (!$is_index)
-                               echo "<br>";
-
                }
 
                function menu_footer($no_menu, $is_index)