[Vtigercrm-commits] [vtiger-commits] r7922 - in /vtigercrm/trunk: ./ modules/Dashboard/ themes/blue/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Jul 10 04:28:42 EDT 2006


Author: richie
Date: Mon Jul 10 02:28:30 2006
New Revision: 7922

Log:
ajaxified dashboard integrated

Added:
    vtigercrm/trunk/modules/Dashboard/DashboardAjax.php
    vtigercrm/trunk/modules/Dashboard/DashboardHome.php
Modified:
    vtigercrm/trunk/index.php
    vtigercrm/trunk/modules/Dashboard/Chart_lead_source_by_outcome.php
    vtigercrm/trunk/modules/Dashboard/Chart_outcome_by_month.php
    vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_lead_source.php
    vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_sales_stage.php
    vtigercrm/trunk/modules/Dashboard/display_charts.php
    vtigercrm/trunk/modules/Dashboard/index.php
    vtigercrm/trunk/themes/blue/style.css

Modified: vtigercrm/trunk/index.php
==============================================================================
--- vtigercrm/trunk/index.php (original)
+++ vtigercrm/trunk/index.php Mon Jul 10 02:28:30 2006
@@ -630,7 +630,7 @@
         $theme = $default_theme;
 }
 
-if((!$viewAttachment) && (!$viewAttachment && $action != 'home_rss') && $action != 'Tickerdetail' && $action != $module."Ajax" && $action != "chat" && $action != "HeadLines" && $action != 'massdelete')
+if((!$viewAttachment) && (!$viewAttachment && $action != 'home_rss') && $action != 'Tickerdetail' && $action != $module."Ajax" && $action != "chat" && $action != "HeadLines" && $action != 'massdelete'  &&  $action != "DashboardAjax")
 {
 	// Under the SPL you do not have the right to remove this copyright statement.	
 	$copyrightstatement="<style>

Modified: vtigercrm/trunk/modules/Dashboard/Chart_lead_source_by_outcome.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/Chart_lead_source_by_outcome.php (original)
+++ vtigercrm/trunk/modules/Dashboard/Chart_lead_source_by_outcome.php Mon Jul 10 02:28:30 2006
@@ -134,8 +134,8 @@
 ?>
 <div align=right><FONT size='1'>
 <em><?php  echo $current_module_strings['LBL_CREATED_ON'].' '.$file_date; ?> 
-</em>[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&lsbo_refresh=true"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
-[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&lsbo_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
+</em>[<a href="javascript:;" onClick="loadDashBoard('DashboardHome');"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
+[<a href="index.php?module=<?php echo $currentModule;?>&action=index&lsbo_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
 </FONT></div>
 <?php } 
 }

Modified: vtigercrm/trunk/modules/Dashboard/Chart_outcome_by_month.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/Chart_outcome_by_month.php (original)
+++ vtigercrm/trunk/modules/Dashboard/Chart_outcome_by_month.php Mon Jul 10 02:28:30 2006
@@ -156,8 +156,8 @@
 ?>
 <div align=right><FONT size='1'>
 <em><?php  echo $current_module_strings['LBL_CREATED_ON'].' '.$file_date; ?> 
-</em>[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&obm_refresh=true"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
-[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&obm_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
+</em>[<a href="javascript:;" onClick="loadDashBoard('DashboardHome');"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
+[<a href="index.php?module=<?php echo $currentModule;?>&action=index&obm_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
 </FONT></div>
 <?php } 
 }

Modified: vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_lead_source.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_lead_source.php (original)
+++ vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_lead_source.php Mon Jul 10 02:28:30 2006
@@ -134,8 +134,8 @@
 ?>
 <div align=right><FONT size='1'>
 <em><?php  echo $current_module_strings['LBL_CREATED_ON'].' '.$file_date; ?> 
-</em>[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&pbls_refresh=true"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
-[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&pbls_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
+</em>[<a href="javascript:;" onClick="loadDashBoard('DashboardHome');"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
+[<a href="index.php?module=<?php echo $currentModule;?>&action=index&pbls_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
 </FONT></div>
 <?php } 
 }

Modified: vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_sales_stage.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_sales_stage.php (original)
+++ vtigercrm/trunk/modules/Dashboard/Chart_pipeline_by_sales_stage.php Mon Jul 10 02:28:30 2006
@@ -196,8 +196,8 @@
 ?>
 <div align=right><FONT size='1'>
 <em><?php  echo $current_module_strings['LBL_CREATED_ON'].' '.$file_date; ?> 
-</em>[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&pbss_refresh=true"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
-[<a href="index.php?module=<?php echo $currentModule;?>&action=<?php echo $action;?>&pbss_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
+</em>[<a href="javascript:;" onClick="loadDashBoard('DashboardHome');"><?php echo $current_module_strings['LBL_REFRESH'];?></a>]
+[<a href="index.php?module=<?php echo $currentModule;?>&action=index&pbss_edit=true"><?php echo $current_module_strings['LBL_EDIT'];?></a>]
 </FONT></div>
 <?php }
 }

Modified: vtigercrm/trunk/modules/Dashboard/display_charts.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/display_charts.php (original)
+++ vtigercrm/trunk/modules/Dashboard/display_charts.php Mon Jul 10 02:28:30 2006
@@ -11,7 +11,7 @@
  ********************************************************************************/
 
 
-	require_once("modules/Dashboard/Entity_charts.php");
+require_once("modules/Dashboard/Entity_charts.php");
 	
 global $tmp_dir;
 global $mod_strings,$app_strings;
@@ -131,106 +131,6 @@
 
 
 ?>
-
-<TABLE border=0 cellspacing=0 cellpadding=0 width=100% class=small>
-<tr><td style="height:2px"></td></tr>
-<tr>
-	<td style="padding-left:10px;padding-right:30px" class="moduleName" width="20%" nowrap><? echo $app_strings['Analytics'];?> &gt; <a class="hdrLink" href="index.php?action=index&parenttab=Analytics&module=Dashboard"><? echo $app_strings['Dashboard'] ?></a></td>
-
-	<td  nowrap width="8%">
-		<table border=0 cellspacing=0 cellpadding=0>
-		<tr>
-			<td class="sep1" style="width:1px;"></td>
-			<td class=small>
-				<table border=0 cellspacing=0 cellpadding=5>
-				<tr>
-						<td style="padding-right:0px;padding-left:10px;"><img src="<?echo $image_path;?>btnL3Add-Faded.gif" alt="<? echo $app_strings['LBL_CREATE_BUTTON_LABEL']; ?> <? echo $app_strings['Dashboard']; ?>..." title="<? echo $app_strings['LBL_CREATE_BUTTON_LABEL']; ?> <? echo $app_strings['Dashboard']; ?>..." border=0></td>	
-					 <td style="padding-right:10px"><img src="<?echo $image_path;?>btnL3Search-Faded.gif" border=0></td>
-				</tr>
-				</table>
-	</td>
-			</tr>
-			</table>
-	</td>
-	<td width="20">&nbsp;</td>
-                <td class="small" width="10%" align="left">
-				<table border=0 cellspacing=0 cellpadding=5>
-
-				<tr>
-					<td style="padding-right:0px;padding-left:10px;"><a href="javascript:;" onClick='fnvshobj(this,"miniCal");getMiniCal();'><img src="<?echo $image_path;?>btnL3Calendar.gif" alt="<? echo $app_strings['LBL_CALENDAR_ALT']; ?>" title="<? echo $app_strings['LBL_CALENDAR_TITLE']; ?>" border=0></a></a></td>
-					<td style="padding-right:0px"><a href="javascript:;"><img src="<?echo $image_path;?>btnL3Clock.gif" alt="<? echo $app_strings['LBL_CLOCK_ALT']; ?>" title="<? echo $app_strings['LBL_CLOCK_TITLE']; ?>" border=0 onClick="fnvshobj(this,'wclock');"></a></a></td>
-					<td style="padding-right:0px"><a href="#"><img src="<?echo $image_path;?>btnL3Calc.gif" alt="<? echo $app_strings['LBL_CALCULATOR_ALT']; ?>" title="<? echo $app_strings['LBL_CALCULATOR_TITLE']; ?>" border=0 onClick="fnvshobj(this,'calculator_cont');fetch_calc();"></a></td>
-					<td style="padding-right:10px"><a href="javascript:;" onClick='return window.open("index.php?module=Contacts&action=vtchat","Chat","width=450,height=400,resizable=1,scrollbars=1");'><img src="<?echo $image_path;?>tbarChat.gif" alt="<? echo $app_strings['LBL_CHAT_ALT']; ?>" title="<? echo $app_strings['LBL_CHAT_TITLE']; ?>" border=0></a>
-                    </td>	
-				</tr>
-				</table>
-	</td>
-	<td width="20">&nbsp;</td>
-               <td class="small" align="left" width="5%">
-		<table border=0 cellspacing=0 cellpadding=5>
-			<tr>
-				<td style="padding-right:0px;padding-left:10px;"><img src="<?echo $image_path;?>tbarImport-Faded.gif" alt="<? echo $app_strings['LBL_IMPORT']; ?> <? echo $app_strings['Dashboard']; ?>" title="<? echo $app_strings['LBL_IMPORT']; ?> <? echo $app_strings['Dashboard']; ?>" border="0"></td>
-                <td style="padding-right:10px"><img src="<?echo $image_path;?>tbarExport-Faded.gif" alt="<? echo $app_strings['LBL_EXPORT']; ?> <? echo $app_strings['Dashboard']; ?>" title="<? echo $app_strings['LBL_EXPORT']; ?> <? echo $app_strings['Dashboard']; ?>" border="0"></td>
-			</tr>
-		</table>	
-	</td>
-	<td width="20">&nbsp;</td>
-                <td class="small" align="left">	
-				<table border=0 cellspacing=0 cellpadding=5>
-				<tr>
-				<td style="padding-left:10px;"><a href="javascript:;" onmouseout="fninvsh('allMenu');" onClick="fnvshobj(this,'allMenu')"><img src="<?echo $image_path;?>btnL3AllMenu.gif" alt="<? echo $app_strings['LBL_ALL_MENU_ALT']; ?>" title="<? echo $app_strings['LBL_ALL_MENU_TITLE']; ?>" border="0"></a></td>
-				</tr>
-				</table>
-	</td>			
-	</tr>
-	</table>
-	</td>
-</tr>
-<tr><td style="height:2px"></td></tr>
-</TABLE>
-	
-
-<!--
-</TABLE> -->
-
-
-
-<table class="dashMain" cellspacing="0" cellpadding="0" align="center">
-   <tr>
-    <th colspan="3"><img src="themes/blue/images/topBnr.gif" width="840" height="67" /></th>
-  </tr>
-  <tr><td colspan="3">&nbsp;</td></tr>
-
-  <tr>
-    <td width="20%" nowrap valign="top">
-		<table width="100%"  border="0" cellspacing="0" cellpadding="0" bgcolor="#DFDFDF">
-          	<tr><td class="dashMnuUnSel">
-                    <a href="index.php?module=Dashboard&action=index&type=dashboardhome"><? echo $mod_strings['LBL_DASHBRD_HOME'];?></a>
-               </td></tr>              
-               <?php 
-                 $mnuHTML = "";
-                 foreach($graph_array as $key=>$value)   
-                 {
-                    if($type == $key)
-                    {
-                         $mnuHTML .= '<tr><td class="dashMnuSel">
-                                        <a href="index.php?module=Dashboard&action=display_charts&type='.$key.'">'.$value.'</a>
-                                      </td></tr>';
-                    }else
-                    {
-                         $mnuHTML .= '<tr><td class="dashMnuUnSel">
-                                        <a href="index.php?module=Dashboard&action=display_charts&type='.$key.'">'.$value.'</a>
-                                      </td></tr>';
-                    }
-                 }
-                 echo $mnuHTML;
-               ?>
-	    </table>
-	</td>
-     <td width="79%" bgcolor="#CBCBCB" valign="top" style="padding-right:10px;" align="left">
-		<table class="dashInner"  cellpadding="0" cellspacing="0">
-		<tr><td class="lvtHeaderText" align="left" height="10"></td></tr>
-		<tr><td><div id="dashChart">
 			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
 				<!--char goes here-->
 				<?php 
@@ -534,12 +434,3 @@
 	?>
 
 			</table>
-	</div></td></tr>
-		</table>
-	  <br />
-</td>
-
- <td width="1%"></td>
-  </tr>
-  <tr><td colspan="3" height="30">&nbsp;</td></tr>
-</table>

Modified: vtigercrm/trunk/modules/Dashboard/index.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/index.php (original)
+++ vtigercrm/trunk/modules/Dashboard/index.php Mon Jul 10 02:28:30 2006
@@ -132,9 +132,8 @@
 
   <tr>
     <td width="20%" nowrap valign="top">
-		<table width="100%"  border="0" cellspacing="0" cellpadding="0" bgcolor="#DFDFDF">
-			<tr><td class="dashMnuSel">
-                    <a href="index.php?module=Dashboard&action=index&type=dashboardhome"><? echo $mod_strings['LBL_DASHBRD_HOME'];?></a>
+		<table width="100%"  border="0" cellspacing="0" cellpadding="0" bgcolor="#DFDFDF" style="cursor:pointer;">
+			<tr><td class="dashMnuSel" id="DashboardHome_mnu" onClick="loadDashBoard('DashboardHome');"><? echo $mod_strings['LBL_DASHBRD_HOME'];?></a>
                </td></tr>
                <?php 
                  $mnuHTML = "";
@@ -142,13 +141,11 @@
                  {
                     if($type == $key)
                     {
-                         $mnuHTML .= '<tr><td class="dashMnuSel">
-                                        <a href="index.php?module=Dashboard&action=display_charts&type='.$key.'">'.$value.'</a>
+                         $mnuHTML .= '<tr><td id="'.$key.'_mnu" class="dashMnuSel" onClick="loadDashBoard(\''.$key.'\');">'.$value.'</a>
                                       </td></tr>';
                     }else
                     {
-                         $mnuHTML .= '<tr><td class="dashMnuUnSel">
-                                        <a href="index.php?module=Dashboard&action=display_charts&type='.$key.'">'.$value.'</a>
+                         $mnuHTML .= '<tr><td id="'.$key.'_mnu" class="dashMnuUnSel" onClick="loadDashBoard(\''.$key.'\');">'.$value.'</a>
                                       </td></tr>';
                     }
                  }
@@ -161,98 +158,8 @@
 		<table class="dashInner"  cellpadding="0" cellspacing="0">
 		<tr><td class="lvtHeaderText" align="left" height="10"></td></tr>
 		<tr><td><div id="dashChart">
-			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
-			  <tr>
-				<td><table width="20%"  border="0" cellspacing="0" cellpadding="0" align="le">
-				 		 <tr>
-
-				 		   <td rowspan="2" valign="top"><span class="dashSerial">1</span></td>
-				 		   <td nowrap><span class="genHeaderSmall"><?echo $mod_strings['LBL_SALES_STAGE_FORM_TITLE']; ?></span></td>
-				 		 </tr>
-					     <tr>
-					       <td><span class="big"><? echo $mod_strings['LBL_HORZ_BAR_CHART'];?></span> </td>
-					     </tr>
-					</table>
-
-				</td>
-			  </tr>
-			  <tr>
-				<td height="200"><?php include ("modules/Dashboard/Chart_pipeline_by_sales_stage.php");?></td>
-			  </tr>
-			  <tr>
-				<td><hr noshade="noshade" size="1" /></td>
-			  </tr>
-
-			  <!-- SCEOND CHART  -->
-			  
-			  <tr>
-				<td><table width="20%"  border="0" cellspacing="0" cellpadding="0" align="le">
-				 		 <tr>
-				 		   <td rowspan="2" valign="top"><span class="dashSerial">2</span></td>
-				 		   <td nowrap><span class="genHeaderSmall"><?php echo $mod_strings['LBL_MONTH_BY_OUTCOME'];?></span></td>
-				 		 </tr>
-					     <tr>
-
-					       <td><span class="big"><? echo $mod_strings['LBL_VERT_BAR_CHART'];?></span> </td>
-					     </tr>
-					</table>
-				</td>
-			  </tr>
-			  <tr>
-				<td height="200"><?php include ("modules/Dashboard/Chart_outcome_by_month.php"); ?></td>
-
-			  </tr>
-			  <tr>
-				<td><hr noshade="noshade" size="1" /></td>
-			  </tr>
-			  
-			  <!-- THIRD CHART  -->
-			  
-			  <tr>
-				<td><table width="20%"  border="0" cellspacing="0" cellpadding="0" align="le">
-				 		 <tr>
-				 		   <td rowspan="2" valign="top"><span class="dashSerial">3</span></td>
-				 		   <td nowrap><span class="genHeaderSmall"><?php echo $mod_strings['LBL_LEAD_SOURCE_BY_OUTCOME'];?></span></td>
-				 		 </tr>
-					     <tr>
-
-					       <td><span class="big"><? echo $mod_strings['LBL_HORZ_BAR_CHART'];?></span> </td>
-					     </tr>
-					</table>
-				</td>
-			  </tr>
-			  <tr>
-				<td height="200"><?php include ("modules/Dashboard/Chart_lead_source_by_outcome.php");?></td>
-
-			  </tr>
-			  <tr>
-				<td><hr noshade="noshade" size="1" /></td>
-			  </tr>
-			  
-			  <!-- FOURTH CHART  -->
-			  
-			  <tr>
-				<td><table width="20%"  border="0" cellspacing="0" cellpadding="0" align="le">
-				 		 <tr>
-				 		   <td rowspan="2" valign="top"><span class="dashSerial">4</span></td>
-				 		   <td nowrap><span class="genHeaderSmall"><?php echo $mod_strings['LBL_LEAD_SOURCE_FORM_TITLE'];?></span></td>
-				 		 </tr>
-					     <tr>
-
-					       <td><span class="big"><? echo $mod_strings['LBL_PIE_CHART'];?></span> </td>
-					     </tr>
-					</table>
-				</td>
-			  </tr>
-			  <tr>
-				<td height="200"><?php include ("modules/Dashboard/Chart_pipeline_by_lead_source.php") ?></td>
-
-			  </tr>
-			  <tr>
-				<td><hr noshade="noshade" size="1" /></td>
-			  </tr>
-			</table>
-	</div></td></tr>
+			<? require_once('modules/Dashboard/DashboardHome.php'); ?>	
+		</div></td></tr>
 		</table>
 	  <br />
 </td>
@@ -261,4 +168,29 @@
   </tr>
   <tr><td colspan="3" height="30">&nbsp;</td></tr>
 </table>
-
+<script>
+var gMnuSel = 'DashboardHome_mnu';
+function loadDashBoard(type)
+{
+	show('status');
+	if(type != 'DashboardHome')
+		url = 'module=Dashboard&action=DashboardAjax&file=display_charts&type='+type;
+	else	
+		url = 'module=Dashboard&action=DashboardAjax&file=DashboardHome';
+	new Ajax.Request(
+		'index.php',
+		{queue: {position: 'end', scope: 'command'},
+			method: 'post',
+			postBody: url,
+			onComplete: function(response)
+			{
+				$("dashChart").innerHTML=response.responseText;
+				hide('status');
+				$(gMnuSel).className = 'dashMnuUnSel';
+				gMnuSel = type+'_mnu';
+				$(gMnuSel).className = 'dashMnuSel';	
+			}
+		}
+	);	
+}
+</script>

Modified: vtigercrm/trunk/themes/blue/style.css
==============================================================================
--- vtigercrm/trunk/themes/blue/style.css (original)
+++ vtigercrm/trunk/themes/blue/style.css Mon Jul 10 02:28:30 2006
@@ -1026,7 +1026,7 @@
 	font-size:11px;
 	background-color:#EBEBEB;
 	width:640px;
-	height:425px;
+	height:680px;
 	overflow:auto;
 	padding-left:5px;
 	padding-top:10px;





More information about the vtigercrm-commits mailing list