[Vtigercrm-commits] [vtiger-commits] r4352 - in /vtigercrm/trunk/modules: Accounts/ Activities/ Campaigns/ Contacts/ CustomView/ Emails/ Faq/ HelpDesk/ Invoice/ Leads/ Notes/ Potentials/ PriceBooks/ Products/ PurchaseOrder/ Quotes/ SalesOrder/ Vendors/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 20 14:18:04 EST 2006
Author: saraj
Date: Mon Mar 20 12:17:24 2006
New Revision: 4352
Log:
customview ajaxified for all modules
Modified:
vtigercrm/trunk/modules/Accounts/Account.js
vtigercrm/trunk/modules/Accounts/ListView.php
vtigercrm/trunk/modules/Activities/ActivitiesAjax.php
vtigercrm/trunk/modules/Activities/Activity.js
vtigercrm/trunk/modules/Activities/ListView.php
vtigercrm/trunk/modules/Campaigns/Campaign.js
vtigercrm/trunk/modules/Campaigns/ListView.php
vtigercrm/trunk/modules/Contacts/Contact.js
vtigercrm/trunk/modules/Contacts/ListView.php
vtigercrm/trunk/modules/CustomView/CustomView.php
vtigercrm/trunk/modules/Emails/Email.js
vtigercrm/trunk/modules/Emails/EmailsAjax.php
vtigercrm/trunk/modules/Emails/ListView.php
vtigercrm/trunk/modules/Faq/ListView.php
vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
vtigercrm/trunk/modules/HelpDesk/ListView.php
vtigercrm/trunk/modules/Invoice/Invoice.js
vtigercrm/trunk/modules/Invoice/ListView.php
vtigercrm/trunk/modules/Leads/Lead.js
vtigercrm/trunk/modules/Leads/ListView.php
vtigercrm/trunk/modules/Notes/ListView.php
vtigercrm/trunk/modules/Notes/Note.js
vtigercrm/trunk/modules/Potentials/ListView.php
vtigercrm/trunk/modules/Potentials/Opportunity.js
vtigercrm/trunk/modules/PriceBooks/ListView.php
vtigercrm/trunk/modules/PriceBooks/PriceBook.js
vtigercrm/trunk/modules/Products/ListView.php
vtigercrm/trunk/modules/Products/Product.js
vtigercrm/trunk/modules/PurchaseOrder/ListView.php
vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js
vtigercrm/trunk/modules/Quotes/ListView.php
vtigercrm/trunk/modules/Quotes/Quote.js
vtigercrm/trunk/modules/SalesOrder/ListView.php
vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
vtigercrm/trunk/modules/Vendors/ListView.php
vtigercrm/trunk/modules/Vendors/Vendor.js
Modified: vtigercrm/trunk/modules/Accounts/Account.js
==============================================================================
--- vtigercrm/trunk/modules/Accounts/Account.js (original)
+++ vtigercrm/trunk/modules/Accounts/Account.js Mon Mar 20 12:17:24 2006
@@ -47,10 +47,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Accounts&action=index&return_module=Accounts&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Accounts&action=AccountsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
//added by raju for emails
Modified: vtigercrm/trunk/modules/Accounts/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/ListView.php (original)
+++ vtigercrm/trunk/modules/Accounts/ListView.php Mon Mar 20 12:17:24 2006
@@ -59,8 +59,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView($currentModule);
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
$groupid = $oCustomView->getGroupId($currentModule);
//<<<<<customview>>>>>
Modified: vtigercrm/trunk/modules/Activities/ActivitiesAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Activities/ActivitiesAjax.php (original)
+++ vtigercrm/trunk/modules/Activities/ActivitiesAjax.php Mon Mar 20 12:17:24 2006
@@ -18,7 +18,11 @@
$ajaxaction = $_REQUEST["ajxaction"];
-if($ajaxaction == "DETAILVIEW")
+if($_REQUEST['file'] != '')
+{
+ require_once('modules/Activities/'.$_REQUEST['file'].'.php');
+}
+elseif($ajaxaction == "DETAILVIEW")
{
$crmid = $_REQUEST["recordid"];
$tablename = $_REQUEST["tableName"];
Modified: vtigercrm/trunk/modules/Activities/Activity.js
==============================================================================
--- vtigercrm/trunk/modules/Activities/Activity.js (original)
+++ vtigercrm/trunk/modules/Activities/Activity.js Mon Mar 20 12:17:24 2006
@@ -92,18 +92,11 @@
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-
-document.massdelete.viewname.value=viewName;
-
-//document.massdelete.action="index.php";
-
-
-
-document.massdelete.action="index.php?module=Activities&action=index&return_module=Activities&return_action=ListView&viewname="+viewName;
-
-document.massdelete.submit();
-
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Activities&action=ActivitiesAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
@@ -150,7 +143,10 @@
}
if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
{
- document.massdelete.action="index.php?module=Users&action=massdelete&return_module=Activities&return_action=ListView&viewname="+viewid;
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring ="module=Users&action=massdelete&return_module=Activities&viewname="+viewid+"&idlist="+idstring;
+ ajaxObj.process("index.php?",urlstring);
}
else
{
Modified: vtigercrm/trunk/modules/Activities/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Activities/ListView.php (original)
+++ vtigercrm/trunk/modules/Activities/ListView.php Mon Mar 20 12:17:24 2006
@@ -27,6 +27,7 @@
require_once('include/logging.php');
require_once('include/utils/utils.php');
require_once('modules/CustomView/CustomView.php');
+require_once('include/database/PearDatabase.php');
global $app_strings;
global $list_max_entries_per_page;
@@ -37,7 +38,7 @@
global $image_path;
global $theme;
-
+global $adb;
// focus_list is the means of passing data to a ListView.
global $focus_list;
@@ -58,11 +59,10 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView($currentModule);
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
-
$where = "";
@@ -128,19 +128,6 @@
{
$list_query .= " AND " .$where;
}
-
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
$list_query .= ' GROUP BY crmentity.crmid'; //Appeding for the recurring event by jaguar
@@ -224,5 +211,8 @@
-$smarty->display("ListView.tpl");
+if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
+ $smarty->display("ListViewEntries.tpl");
+else
+ $smarty->display("ListView.tpl");
?>
Modified: vtigercrm/trunk/modules/Campaigns/Campaign.js
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/Campaign.js (original)
+++ vtigercrm/trunk/modules/Campaigns/Campaign.js Mon Mar 20 12:17:24 2006
@@ -1,9 +1,10 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Campaigns&action=index&return_module=Campaigns&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Campaigns&action=CampaignsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
Modified: vtigercrm/trunk/modules/Campaigns/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/ListView.php (original)
+++ vtigercrm/trunk/modules/Campaigns/ListView.php Mon Mar 20 12:17:24 2006
@@ -76,9 +76,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Campaigns");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
-
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -147,19 +146,6 @@
{
$list_query .= ' and '.$where;
}
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
//sort by "assignedto" and default sort by "ticketid"(DESC)
if(isset($order_by) && $order_by != '')
{
Modified: vtigercrm/trunk/modules/Contacts/Contact.js
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.js (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.js Mon Mar 20 12:17:24 2006
@@ -62,10 +62,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Contacts&action=index&return_module=Contacts&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Contacts&action=ContactsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
//code added by raju for better emiling
function eMail()
Modified: vtigercrm/trunk/modules/Contacts/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/ListView.php (original)
+++ vtigercrm/trunk/modules/Contacts/ListView.php Mon Mar 20 12:17:24 2006
@@ -99,8 +99,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Contacts");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -177,19 +177,6 @@
}
$list_result = $adb->query($list_query);
-
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
//Constructing the list view
Modified: vtigercrm/trunk/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/trunk/modules/CustomView/CustomView.php (original)
+++ vtigercrm/trunk/modules/CustomView/CustomView.php Mon Mar 20 12:17:24 2006
@@ -151,7 +151,7 @@
}
return $customviewlist;
}
- function getCustomViewCombo()
+ function getCustomViewCombo($viewid='')
{
global $adb;
$tabid = getTabid($this->customviewmodule);
@@ -161,7 +161,7 @@
$result = $adb->query($ssql);
while($cvrow=$adb->fetch_array($result))
{
- if($cvrow['setdefault'] == 1)
+ if($cvrow['cvid'] == $viewid)
{
$shtml .= "<option selected value=\"".$cvrow['cvid']."\">".$cvrow['viewname']."</option>";
$this->setdefaultviewid = $cvrow['cvid'];
Modified: vtigercrm/trunk/modules/Emails/Email.js
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.js (original)
+++ vtigercrm/trunk/modules/Emails/Email.js Mon Mar 20 12:17:24 2006
@@ -11,10 +11,11 @@
function showDefaultCustomView(selectView)
{
- viewName = selectView.options[selectView.options.selectedIndex].value;
- document.massdelete.viewname.value=viewName;
- document.massdelete.action="index.php?module=Emails&action=index&return_module=Emails&return_action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Emails&action=EmailsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
@@ -60,7 +61,10 @@
}
if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
{
- document.massdelete.action="index.php?module=Users&action=massdelete&return_module=Emails&return_action=ListView&viewname="+viewid;
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring ="module=Users&action=massdelete&return_module=Emails&viewname="+viewid+"&idlist="+idstring;
+ ajaxObj.process("index.php?",urlstring);
}
else
{
Modified: vtigercrm/trunk/modules/Emails/EmailsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/EmailsAjax.php (original)
+++ vtigercrm/trunk/modules/Emails/EmailsAjax.php Mon Mar 20 12:17:24 2006
@@ -18,7 +18,11 @@
$ajaxaction = $_REQUEST["ajxaction"];
-if($ajaxaction == "DETAILVIEW")
+if($_REQUEST['file'] != '')
+{
+ require_once('modules/Emails/'.$_REQUEST['file'].'.php');
+}
+elseif($ajaxaction == "DETAILVIEW")
{
$crmid = $_REQUEST["recordid"];
$tablename = $_REQUEST["tableName"];
Modified: vtigercrm/trunk/modules/Emails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/ListView.php (original)
+++ vtigercrm/trunk/modules/Emails/ListView.php Mon Mar 20 12:17:24 2006
@@ -31,6 +31,9 @@
$submenu = array('LBL_EMAILS_TITLE'=>'index.php?module=Emails&action=ListView.php','LBL_WEBMAILS_TITLE'=>'index.php?module=Webmails&action=index&parenttab=My Home Page');
$sec_arr = array('index.php?module=Emails&action=ListView.php'=>'Emails','index.php?module=Webmails&action=index&parenttab=parenttab=My Home Page'=>'Emails');
+
+if($_REQUEST['ajax'] == '')
+{
echo '<br>';
?>
@@ -85,7 +88,7 @@
</table>
<br>
<?
-
+}
global $app_strings;
global $mod_strings;
@@ -125,8 +128,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Emails");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -206,18 +209,6 @@
$list_result = $adb->query($list_query);
//Constructing the list view
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
$smarty->assign("CUSTOMVIEW",$customstrings);
$smarty->assign("MOD", $mod_strings);
@@ -275,5 +266,8 @@
$smarty->assign("RECORD_COUNTS", $record_string);
-$smarty->display("ListView.tpl");
+if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
+ $smarty->display("ListViewEntries.tpl");
+else
+ $smarty->display("ListView.tpl");
?>
Modified: vtigercrm/trunk/modules/Faq/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/ListView.php (original)
+++ vtigercrm/trunk/modules/Faq/ListView.php Mon Mar 20 12:17:24 2006
@@ -48,8 +48,8 @@
$url_string = '';
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Faq");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
Modified: vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/HelpDesk.js (original)
+++ vtigercrm/trunk/modules/HelpDesk/HelpDesk.js Mon Mar 20 12:17:24 2006
@@ -62,10 +62,11 @@
function showDefaultCustomView(selectView)
{
- viewName = selectView.options[selectView.options.selectedIndex].value;
- document.massdelete.viewname.value=viewName;
- document.massdelete.action="index.php?module=HelpDesk&action=index&return_module=HelpDesk&return_action=ListView&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=HelpDesk&action=HelpDeskAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
Modified: vtigercrm/trunk/modules/HelpDesk/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/ListView.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/ListView.php Mon Mar 20 12:17:24 2006
@@ -78,8 +78,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("HelpDesk");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -141,18 +141,6 @@
{
$list_query .= ' and '.$where;
}
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
//sort by "assignedto" and default sort by "ticketid"(DESC)
if(isset($order_by) && $order_by != '')
Modified: vtigercrm/trunk/modules/Invoice/Invoice.js
==============================================================================
--- vtigercrm/trunk/modules/Invoice/Invoice.js (original)
+++ vtigercrm/trunk/modules/Invoice/Invoice.js Mon Mar 20 12:17:24 2006
@@ -275,10 +275,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Invoice&action=index&return_module=Invoice&return_action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Invoice&action=InvoiceAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
Modified: vtigercrm/trunk/modules/Invoice/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/ListView.php (original)
+++ vtigercrm/trunk/modules/Invoice/ListView.php Mon Mar 20 12:17:24 2006
@@ -75,8 +75,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Invoice");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -138,19 +138,6 @@
$query .= ' and '.$where;
}
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
//$url_qry = getURLstring($focus);
if(isset($order_by) && $order_by != '')
Modified: vtigercrm/trunk/modules/Leads/Lead.js
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.js (original)
+++ vtigercrm/trunk/modules/Leads/Lead.js Mon Mar 20 12:17:24 2006
@@ -65,10 +65,12 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Leads&action=index&return_module=Leads&return_action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Leads&action=LeadsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
+
}
//code added by raju for better emailing
function eMail()
Modified: vtigercrm/trunk/modules/Leads/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ListView.php (original)
+++ vtigercrm/trunk/modules/Leads/ListView.php Mon Mar 20 12:17:24 2006
@@ -71,36 +71,8 @@
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
{
- if($_REQUEST['searchtype']=='advance')
- {
- $adv_string='';
- if(isset($_REQUEST['search_cnt']))
- $tot_no_criteria = $_REQUEST['search_cnt'];
- if($_REQUEST['matchtype'] == 'all')
- $matchtype = "or";
- else
- $matchtype = "and";
-
- for($i=0; $i<=$tot_no_criteria; $i++)
- {
- if($i == $tot_no_criteria-1)
- $matchtype= "";
-
- $table_colname = 'Fields'.$i;
- $search_condition = 'Condition'.$i;
- $search_value = 'Srch_value'.$i;
-
- $tab_col = str_replace('\'','',stripslashes($_REQUEST[$table_colname]));
- $srch_cond = str_replace('\'','',stripslashes($_REQUEST[$search_condition]));
- $srch_val = $_REQUEST[$search_value];
- $adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,$tab_col)." ".$matchtype;
- }
- $where=$adv_string;
- }
- else
- {
- $where=Search($currentModule);
- }
+ $where=Search($currentModule);
+
// we have a query
$url_string .="&query=true";
@@ -110,8 +82,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Leads");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -192,19 +164,6 @@
{
$query .= ' and '.$where;
}
-
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
if(isset($order_by) && $order_by != '')
Modified: vtigercrm/trunk/modules/Notes/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Notes/ListView.php (original)
+++ vtigercrm/trunk/modules/Notes/ListView.php Mon Mar 20 12:17:24 2006
@@ -48,8 +48,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Notes");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -159,18 +159,6 @@
//Retreiving the no of rows
$noofrows = $adb->num_rows($list_result);
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
//Retreiving the start value from request
if(isset($_REQUEST['start']) && $_REQUEST['start'] != '')
Modified: vtigercrm/trunk/modules/Notes/Note.js
==============================================================================
--- vtigercrm/trunk/modules/Notes/Note.js (original)
+++ vtigercrm/trunk/modules/Notes/Note.js Mon Mar 20 12:17:24 2006
@@ -10,10 +10,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Notes&action=index&return_module=Notes&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Notes&action=NotesAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
Modified: vtigercrm/trunk/modules/Potentials/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Potentials/ListView.php (original)
+++ vtigercrm/trunk/modules/Potentials/ListView.php Mon Mar 20 12:17:24 2006
@@ -101,8 +101,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Potentials");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -152,19 +152,6 @@
{
$list_query .= " AND ".$where;
}
-
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
if(isset($order_by) && $order_by != '')
{
Modified: vtigercrm/trunk/modules/Potentials/Opportunity.js
==============================================================================
--- vtigercrm/trunk/modules/Potentials/Opportunity.js (original)
+++ vtigercrm/trunk/modules/Potentials/Opportunity.js Mon Mar 20 12:17:24 2006
@@ -12,10 +12,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Potentials&action=index&return_module=Potentials&return_action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Potentials&action=PotentialsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
Modified: vtigercrm/trunk/modules/PriceBooks/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/ListView.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/ListView.php Mon Mar 20 12:17:24 2006
@@ -69,8 +69,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("PriceBooks");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -116,19 +116,6 @@
{
$list_query .= ' and '.$where;
}
-
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
if(isset($order_by) && $order_by != '')
{
Modified: vtigercrm/trunk/modules/PriceBooks/PriceBook.js
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBook.js (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBook.js Mon Mar 20 12:17:24 2006
@@ -105,10 +105,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=PriceBooks&action=index&return_module=PriceBooks&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=PriceBooks&action=PriceBooksAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function updateListPrice(unitprice,fieldname)
@@ -214,8 +215,10 @@
if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
{
show("status");
+ alert("in fn")
var ajaxObj = new Ajax(ajaxSaveResponse);
var urlstring ="module=Users&action=massdelete&return_module=PriceBooks&viewname="+viewid+"&idlist="+idstring;
+ alert(urlstring)
ajaxObj.process("index.php?",urlstring);
}
else
Modified: vtigercrm/trunk/modules/Products/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Products/ListView.php (original)
+++ vtigercrm/trunk/modules/Products/ListView.php Mon Mar 20 12:17:24 2006
@@ -84,8 +84,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Products");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
if($viewnamedesc['viewname'] == 'All')
@@ -143,18 +143,6 @@
$list_result = $adb->query($list_query);
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
//Retreiving the no of rows
$noofrows = $adb->num_rows($list_result);
Modified: vtigercrm/trunk/modules/Products/Product.js
==============================================================================
--- vtigercrm/trunk/modules/Products/Product.js (original)
+++ vtigercrm/trunk/modules/Products/Product.js Mon Mar 20 12:17:24 2006
@@ -63,10 +63,11 @@
}
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Products&action=index&return_module=Products&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Products&action=ProductsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
Modified: vtigercrm/trunk/modules/PurchaseOrder/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/ListView.php (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/ListView.php Mon Mar 20 12:17:24 2006
@@ -77,8 +77,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("PurchaseOrder");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -141,20 +141,6 @@
$query .= ' and '.$where;
}
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
-//$url_qry = getURLstring($focus);
if(isset($order_by) && $order_by != '')
{
Modified: vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js Mon Mar 20 12:17:24 2006
@@ -11,13 +11,6 @@
function settotalnoofrows() {
document.EditView.totalProductCount.value = rowCnt;
}
-
-function productPickList(currObj) {
- var trObj=currObj.parentNode.parentNode
- var rowId=parseInt(trObj.id.substr(trObj.id.indexOf("w")+1,trObj.id.length))
- window.open("index.php?module=Products&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=inventory_prod_po&curr_row="+rowId,"productWin","width=600,height=400,resizable=1,scrollbars=1,top=150,left=200");
-}
-
function priceBookPickList(currObj) {
var trObj=currObj.parentNode.parentNode
var rowId=parseInt(trObj.id.substr(trObj.id.indexOf("w")+1,trObj.id.length))
@@ -239,10 +232,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=PurchaseOrder&action=index&return_module=PurchaseOrder&return_action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=PurchaseOrder&action=PurchaseOrderAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
Modified: vtigercrm/trunk/modules/Quotes/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/ListView.php (original)
+++ vtigercrm/trunk/modules/Quotes/ListView.php Mon Mar 20 12:17:24 2006
@@ -81,8 +81,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Quotes");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -144,19 +144,6 @@
$query .= ' and '.$where;
}
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
if(isset($order_by) && $order_by != '')
{
if($order_by == 'smownerid')
Modified: vtigercrm/trunk/modules/Quotes/Quote.js
==============================================================================
--- vtigercrm/trunk/modules/Quotes/Quote.js (original)
+++ vtigercrm/trunk/modules/Quotes/Quote.js Mon Mar 20 12:17:24 2006
@@ -246,10 +246,11 @@
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=Quotes&action=index&return_module=Quotes&return_action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Quotes&action=QuotesAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
Modified: vtigercrm/trunk/modules/SalesOrder/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/ListView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/ListView.php Mon Mar 20 12:17:24 2006
@@ -103,8 +103,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("SalesOrder");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -174,19 +174,6 @@
//Retreiving the no of rows
$noofrows = $adb->num_rows($list_result);
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
//Retreiving the start value from request
if(isset($_REQUEST['start']) && $_REQUEST['start'] != '')
{
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.js (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.js Mon Mar 20 12:17:24 2006
@@ -131,13 +131,6 @@
function calcGrandTotal() {
var subTotal=0,grandTotal=0;
-
- //This is added for calculate Total for Product Details in Invoice
- var temp = document.getElementsByTagName('table');
- for(i=0;i<temp.length;i++){
- if(temp[i].className == 'prdTab') var rowCnt=temp[i].rows.length -1;
- }
-
for (var i=1;i<=rowCnt;i++) {
if (getObj("hdnTotal"+i).value=="")
getObj("hdnTotal"+i).value=0
@@ -246,10 +239,11 @@
}
function showDefaultCustomView(selectView)
{
-viewName = selectView.options[selectView.options.selectedIndex].value;
-document.massdelete.viewname.value=viewName;
-document.massdelete.action="index.php?module=SalesOrder&action=index&viewname="+viewName;
-document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=SalesOrder&action=SalesOrderAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
Modified: vtigercrm/trunk/modules/Vendors/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/ListView.php (original)
+++ vtigercrm/trunk/modules/Vendors/ListView.php Mon Mar 20 12:17:24 2006
@@ -70,8 +70,8 @@
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Vendors");
-$customviewcombo_html = $oCustomView->getCustomViewCombo();
$viewid = $oCustomView->getViewId($currentModule);
+$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//<<<<<customview>>>>>
@@ -133,19 +133,6 @@
//Retreiving the no of rows
$noofrows = $adb->num_rows($list_result);
-$view_script = "<script language='javascript'>
- function set_selected()
- {
- len=document.massdelete.viewname.length;
- for(i=0;i<len;i++)
- {
- if(document.massdelete.viewname[i].value == '$viewid')
- document.massdelete.viewname[i].selected = true;
- }
- }
- set_selected();
- </script>";
-
//Retreiving the start value from request
if(isset($_REQUEST['start']) && $_REQUEST['start'] != '')
{
Modified: vtigercrm/trunk/modules/Vendors/Vendor.js
==============================================================================
--- vtigercrm/trunk/modules/Vendors/Vendor.js (original)
+++ vtigercrm/trunk/modules/Vendors/Vendor.js Mon Mar 20 12:17:24 2006
@@ -45,10 +45,11 @@
function showDefaultCustomView(selectView)
{
- viewName = selectView.options[selectView.options.selectedIndex].value;
- document.massdelete.viewname.value=viewName;
- document.massdelete.action="index.php?module=Vendors&action=index&viewname="+viewName;
- document.massdelete.submit();
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var viewName = selectView.options[selectView.options.selectedIndex].value;
+ var urlstring ="module=Vendors&action=VendorsAjax&file=ListView&ajax=true&viewname="+viewName;
+ ajaxObj.process("index.php?",urlstring);
}
function massDelete()
{
More information about the vtigercrm-commits
mailing list