Improvements to dashboard. All titles are outside the tables/graphics for better...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 22 Dec 2015 09:41:23 +0000 (10:41 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 22 Dec 2015 09:41:23 +0000 (10:41 +0100)
A final touch on canvas theme.

includes/dashboard.inc
themes/canvas/default.css

index f78a4cb36834d27f79833a5ea2773e922fd4986e..69654c88e39f9ba6e4624c6e55e1c663dead245d 100644 (file)
@@ -53,9 +53,12 @@ function dashboard($sel_app)
                display_all();
 }
 
-function display_title($title, $colspan=2)
+function display_title($title)
 {
-       echo "<tr><td colspan=$colspan class='headingtext' style='text-align:center;border:0;height:40px;'>$title</td></tr>\n";
+       br();
+       display_heading($title);
+       br();
+       //echo "<tr><td colspan=$colspan class='headingtext' style='background-color:#fff;text-align:center;border:0;height:40px;'>$title</td></tr>\n";
 }      
 
 function table_one()
@@ -179,9 +182,9 @@ function customer_top($today, $limit=10, $width="33", &$pg=null)
                LIMIT $limit";
        $result = db_query($sql);
        $title = _("Top $limit customers in fiscal year");
+       display_title($title);
        $th = array(_("Customer"), _("Amount"));
        start_table(TABLESTYLE, "width='$width%'");
-       display_title($title, count($th));
        table_header($th);
        check_page_security('SA_SALESTRANSVIEW');
        $k = 0; //row colour counter
@@ -216,9 +219,9 @@ function supplier_top($today, $limit=10, $width="33", &$pg=null)
                LIMIT $limit";
        $result = db_query($sql);
        $title = _("Top $limit suppliers in fiscal year");
+       display_title($title);
        $th = array(_("Supplier"), _("Amount"));
        start_table(TABLESTYLE, "width='$width%'");
-       display_title($title, count($th));
        table_header($th);
        check_page_security('SA_SUPPTRANSVIEW');
        $k = 0; //row colour counter
@@ -279,12 +282,12 @@ function stock_top($today, $limit=10, $width="33", $type=0, &$pg=null)
                $title = _("Top $limit Fixed Assets in fiscal year");
        else    
                $title = _("Top $limit Sold Items in fiscal year");
+       display_title($title);  
        if ($type == 0) 
                $th = array(_("Item"), _("Sales"), _("Costs"), _("Quantity"));
        else    
                $th = array(_("Item"), _("Amount"), _("Quantity"));
        start_table(TABLESTYLE, "width='$width%'");
-       display_title($title, count($th));      
        table_header($th);
        check_page_security($sec);
        $k = 0; //row colour counter
@@ -324,9 +327,9 @@ function dimension_top($today, $limit=10, $width="33", &$pg=null)
                t.tran_date >= '$begin1' AND t.tran_date <= '$today1' GROUP BY d.id ORDER BY total DESC LIMIT $limit";
        $result = db_query($sql, "Transactions could not be calculated");
        $title = _("Top $limit Dimensions in fiscal year");
+       display_title($title);
        $th = array(_("Dimension"), _("Amount"));
        start_table(TABLESTYLE, "width='$width%'");
-       display_title($title, count($th));
        table_header($th);
        check_page_security('SA_DIMTRANSVIEW');
        $k = 0; //row colour counter
@@ -362,8 +365,8 @@ function gl_top($today, $width="33", &$pg=null)
                AND tran_date <= '$today1' GROUP BY c.cid ORDER BY c.cid"; 
        $result = db_query($sql, "Transactions could not be calculated");
        $title = _("Class Balances");
-       start_table(TABLESTYLE2, "width='$width%'");
        display_title($title);
+       start_table(TABLESTYLE2, "width='$width%'");
        check_page_security('SA_GLANALYTIC');
        $i = 0;
        $total = 0;
@@ -436,7 +439,8 @@ function source_graphic($today, $title, $x_axis, $pg, $graphic1, $graphic2=null,
 {
        if (count($pg->y) ==0 || (count($pg->y) == 1 && $pg->y[0] == 0))
                return;
-       $pg->title     = $title . " - " . $today;
+       display_title("$title ($today)");       
+       //$pg->title     = $title . " - " . $today;
        $pg->axis_x    = $x_axis;
        $pg->axis_y    = _("Amount");
        $pg->graphic_1 = $graphic1;
@@ -475,14 +479,12 @@ function customer_trans($today)
                        AND DATEDIFF('$today', trans.due_date) > 0 ORDER BY days DESC";
        $result = db_query($sql);
        $title = db_num_rows($result) . _(" overdue Sales Invoices");
-       br(1);
-       display_heading($title);
-       br();
+       display_title($title);
        $th = array("#", _("Ref."), _("Date"), _("Due Date"), _("Customer"), _("Branch"), _("Currency"), 
                _("Total"), _("Remainder"),     _("Days"));
        start_table(TABLESTYLE);
        table_header($th);
-       $k = 0; //row colour counter
+       $k = 0; //row colour counter
        while ($myrow = db_fetch($result))
        {
                alt_table_row_color($k);
@@ -517,12 +519,10 @@ function customer_recurrent_invoices($today)
 {
        $result = get_recurrent_invoices($today);
        $title = _("Overdue Recurrent Invoices");
-       br(1);
-       display_heading($title);
-       br();
+       display_title($title);
        $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Next invoice"));
        start_table(TABLESTYLE, "width=70%");
-       table_header($th);
+       table_header($th);
        $k = 0;
        while ($myrow = db_fetch($result)) 
        {
@@ -564,9 +564,7 @@ function supplier_trans($today)
                        AND DATEDIFF('$today', trans.due_date) > 0 ORDER BY days DESC";
        $result = db_query($sql);
        $title = db_num_rows($result) . _(" overdue Purchase Invoices");
-       br(1);
-       display_heading($title);
-       br();
+       display_title($title);
        $th = array("#", _("Ref."), _("Date"), _("Due Date"), _("Supplier"), _("Currency"), _("Total"), 
                _("Remainder"), _("Days"));
        start_table(TABLESTYLE);
@@ -601,9 +599,7 @@ function bank_balance($today, $width)
                                ORDER BY bank_account_name";
        $result = db_query($sql);
        $title = _("Bank Account Balances");
-       br(1);
-       display_heading($title);
-       br();
+       display_title($title);
        $th = array(_("Account"), _("Balance"));
        start_table(TABLESTYLE, "width='$width%'");
        table_header($th);
index 88e66a72a4a24bf6909a7fac0fd70508bd3d2cc5..490ce94cf0b1965f46f17b616abfc48be0f8a93b 100644 (file)
 
 body {
   background-color: #eee;
+
+  background: -moz-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%);
+  background: -webkit-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%);
+  background: -o-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%);
+  background: -ms-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%);
+  background: linear-gradient(to top, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%);
+
   margin: 0;
   padding: 0;
   text-align: center;
@@ -191,7 +198,7 @@ a:visited {
 /* Body */
 .fa-body {
   width: 100%;
-  background-color: #fff;
+  background-color: #f9f9f9;
   float: left;
   margin: 0;
   padding: 3px 0 0 0;
@@ -226,7 +233,6 @@ text-decoration: none;
 margin: 0 1px 0 0; /*Margin between each menu item*/
 border-right: 1px solid #ececec;
 padding: 5px 10px;
-/*background-color: #045c97;*/ /*blue color theme*/ 
 background-color: #1275ae;
 }
 
@@ -271,7 +277,7 @@ h2, .titletext {
        padding: 5px;
 }
 .titletext {
-       border-bottom: 1px solid #8cacbb;
+       border-bottom: 1px solid #8899aa;
 }
 
 h3 {
@@ -316,7 +322,7 @@ hr {
        font-weight: normal;
        line-height: 19px;
        padding: 9px;
-       border: 1px solid #8cacbb;
+       border: 1px solid #8899aa;
 }
 
 .menu_group_items a {
@@ -431,11 +437,11 @@ hr {
 
 table.tablestyle {
        border-collapse: collapse;
-       border: 1px solid #e1e1e1;
+       border: 1px solid #8899aa;
 }
 table.tablestyle td {
        border-collapse: collapse;
-       border: 1px solid #e1e1e1;
+       border: 1px solid #8899aa;
 }
 table.tablestyle2 {
        border-collapse: collapse;
@@ -458,7 +464,7 @@ table.tablestyle_inner td {
 }
 
 .label {
-       background-color: #ebf0f3;
+       background-color: #d7dbdd;
        color: black;
 }
 
@@ -522,7 +528,7 @@ button.navibutton {
 .navibar {
        padding: 0 3px;
     color: #fff;
-    border: 1px solid #e1e1e1;
+    border: 1px solid #8899aa;
     border-collapse: collapse;
        background-color: #1275ae;
 }
@@ -563,42 +569,42 @@ ul.ajaxtabs li button{
     background-color: #dee7ec;
        padding: 3px 8px;
        margin: 0px;
-       border-top: 1px solid #8cacbb;
-       border-right: 1px solid #8cacbb;
+       border-top: 1px solid #8899aa;
+       border-right: 1px solid #8899aa;
        border-bottom: none;
        border-left: none;
        font-weight: bold;
 }
 
 ul.ajaxtabs li button:hover{
-       border-top: 1px solid #8cacbb;
+       border-top: 1px solid #8899aa;
        color:#fff;
 }
 div.spaceBox{
-       background-color: #8cacbb;
+       background-color: #8899aa;
        height:8px;
-       border-bottom: 1px solid #8cacbb;
-       border-left: 1px solid #8cacbb;
-       border-right:1px solid #8cacbb;
+       border-bottom: 1px solid #8899aa;
+       border-left: 1px solid #8899aa;
+       border-right:1px solid #8899aa;
        margin: 0 3px 0px 3px
 }
 
 div.contentBox{
-       border: 1px solid #8cacbb;
+       border: 1px solid #8899aa;
        margin: 0 3px 3px 3px
 }
 
 ul.ajaxtabs li button.current, ul.ajaxtabs li button.current:hover{
-       border-left: 1px solid #8cacbb;
-       background-color: #8cacbb;
+       border-left: 1px solid #8899aa;
+       background-color: #8899aa;
        color:#fff;
 }
 #hints {
   font-size: 12px;
   padding: 5px;
-  border-bottom: 1px solid #8cacbb;
+  border-bottom: 1px solid #8899aa;
   margin: -4px -2px -2px;
-  border: 1px solid #8cacbb;
+  border: 1px solid #8899aa;
   background-color: #ffffea;
   white-space: nowrap;
 }