[Vtigercrm-commits] [vtiger-commits] r4666 - in /vtigercrm/trunk: include/js/ modules/Accounts/ modules/Campaigns/ modules/Contacts/ modules/CustomView/ modules/HelpDesk/ modules/Invoice/ modules/Leads/ modules/Notes/ modules/Potentials/ modules/PriceBooks/ modules/Products/ modules/PurchaseOrder/ modules/Quotes/ modules/Reports/ modules/Rss/ modules/SalesOrder/ modules/Vendors/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 29 06:21:52 EST 2006
Author: saraj
Date: Wed Mar 29 04:21:25 2006
New Revision: 4666
Log:
common fns massDelete,trim,cancelForm,trim,clear_form moved to common files
Modified:
vtigercrm/trunk/include/js/general.js
vtigercrm/trunk/modules/Accounts/Account.js
vtigercrm/trunk/modules/Campaigns/Campaign.js
vtigercrm/trunk/modules/Contacts/Contact.js
vtigercrm/trunk/modules/CustomView/CustomView.js
vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
vtigercrm/trunk/modules/Invoice/Invoice.js
vtigercrm/trunk/modules/Leads/Lead.js
vtigercrm/trunk/modules/Notes/Note.js
vtigercrm/trunk/modules/Potentials/Opportunity.js
vtigercrm/trunk/modules/PriceBooks/PriceBook.js
vtigercrm/trunk/modules/Products/Product.js
vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js
vtigercrm/trunk/modules/Quotes/Quote.js
vtigercrm/trunk/modules/Reports/Report.js
vtigercrm/trunk/modules/Rss/Rss.js
vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
vtigercrm/trunk/modules/Vendors/Vendor.js
Modified: vtigercrm/trunk/include/js/general.js
==============================================================================
--- vtigercrm/trunk/include/js/general.js (original)
+++ vtigercrm/trunk/include/js/general.js Wed Mar 29 04:21:25 2006
@@ -1420,3 +1420,31 @@
document.getElementById('proTab').deleteRow(i);
}
+function cancelForm(frm)
+{
+ window.history.back();
+}
+
+function trim(s)
+{
+ while (s.substring(0,1) == " ")
+ {
+ s = s.substring(1, s.length);
+ }
+ while (s.substring(s.length-1, s.length) == ' ') {
+ s = s.substring(0,s.length-1);
+ }
+ return s;
+}
+
+function clear_form(form)
+{
+ for (j = 0; j < form.elements.length; j++)
+ {
+ if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one')
+ {
+ form.elements[j].value = '';
+ }
+ }
+}
+
Modified: vtigercrm/trunk/modules/Accounts/Account.js
==============================================================================
--- vtigercrm/trunk/modules/Accounts/Account.js (original)
+++ vtigercrm/trunk/modules/Accounts/Account.js Wed Mar 29 04:21:25 2006
@@ -10,14 +10,6 @@
document.write("<script type='text/javascript' src='include/js/Inventory.js'></"+"script>");
-function showDefaultCustomView(selectView)
-{
- 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
function eMail()
@@ -113,59 +105,6 @@
document.massdelete.action="index.php?module=CustomView&action=SendMailAction&return_module=Accounts&return_action=index&viewname="+viewid;
}
-function massDelete()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Accounts&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
//to merge a list of acounts with a template
function massMerge()
Modified: vtigercrm/trunk/modules/Campaigns/Campaign.js
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/Campaign.js (original)
+++ vtigercrm/trunk/modules/Campaigns/Campaign.js Wed Mar 29 04:21:25 2006
@@ -1,64 +1,0 @@
-function showDefaultCustomView(selectView)
-{
- 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);
-}
-
-
-function massDelete()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Campaigns&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
-
Modified: vtigercrm/trunk/modules/Contacts/Contact.js
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.js (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.js Wed Mar 29 04:21:25 2006
@@ -8,9 +8,6 @@
* All Rights Reserved.
********************************************************************************/
-document.write("<script type='text/javascript' src='include/js/conveyor.js'></"+"script>");
-
-
function copyAddressRight(form) {
form.otherstreet.value = form.mailingstreet.value;
@@ -60,14 +57,6 @@
}
}
-function showDefaultCustomView(selectView)
-{
- 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()
{
@@ -168,58 +157,6 @@
}
}
-function massDelete()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Contacts&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
function massMail()
{
Modified: vtigercrm/trunk/modules/CustomView/CustomView.js
==============================================================================
--- vtigercrm/trunk/modules/CustomView/CustomView.js (original)
+++ vtigercrm/trunk/modules/CustomView/CustomView.js Wed Mar 29 04:21:25 2006
@@ -88,18 +88,6 @@
document.location.href = "index.php?module="+cvmodule+"&action=index&viewname="+viewid;
}
-function trim(s)
-{
- while (s.substring(0,1) == " ") {
- s = s.substring(1, s.length);
- }
- while (s.substring(s.length-1, s.length) == ' ') {
- s = s.substring(0,s.length-1);
- }
-
- return s;
-}
-
function check4null(form)
{
Modified: vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/HelpDesk.js (original)
+++ vtigercrm/trunk/modules/HelpDesk/HelpDesk.js Wed Mar 29 04:21:25 2006
@@ -60,68 +60,6 @@
-function showDefaultCustomView(selectView)
-{
- 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()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=HelpDesk&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
//merge list of tickets with templates
function massMerge()
@@ -172,14 +110,3 @@
}
//end of mass merge
-function clear_form(form)
-{
- for (j = 0; j < form.elements.length; j++)
- {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one')
- {
- form.elements[j].value = '';
- }
- }
-}
-
Modified: vtigercrm/trunk/modules/Invoice/Invoice.js
==============================================================================
--- vtigercrm/trunk/modules/Invoice/Invoice.js (original)
+++ vtigercrm/trunk/modules/Invoice/Invoice.js Wed Mar 29 04:21:25 2006
@@ -218,69 +218,6 @@
-function showDefaultCustomView(selectView)
-{
- 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()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Invoice&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
-
-
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
Modified: vtigercrm/trunk/modules/Leads/Lead.js
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.js (original)
+++ vtigercrm/trunk/modules/Leads/Lead.js Wed Mar 29 04:21:25 2006
@@ -63,15 +63,6 @@
}
-function showDefaultCustomView(selectView)
-{
- 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()
{
@@ -118,59 +109,7 @@
//end of code added by raju
-function massDelete()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++;
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Leads&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
+
function massMail()
{
Modified: vtigercrm/trunk/modules/Notes/Note.js
==============================================================================
--- vtigercrm/trunk/modules/Notes/Note.js (original)
+++ vtigercrm/trunk/modules/Notes/Note.js Wed Mar 29 04:21:25 2006
@@ -8,66 +8,3 @@
*
********************************************************************************/
-function showDefaultCustomView(selectView)
-{
- 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()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Notes&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
-
Modified: vtigercrm/trunk/modules/Potentials/Opportunity.js
==============================================================================
--- vtigercrm/trunk/modules/Potentials/Opportunity.js (original)
+++ vtigercrm/trunk/modules/Potentials/Opportunity.js Wed Mar 29 04:21:25 2006
@@ -10,83 +10,16 @@
-function showDefaultCustomView(selectView)
-{
- 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()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Potentials&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
-
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
}
function set_return_specific(product_id, product_name) {
- //getOpenerObj used for DetailView
var fldName = getOpenerObj("potential_name");
var fldId = getOpenerObj("potential_id");
fldName.value = product_name;
fldId.value = product_id;
- //window.opener.document.EditView.potential_name.value = product_name;
- //window.opener.document.EditView.potential_id.value = product_id;
}
function add_data_to_relatedlist(entity_id,recordid)
{
Modified: vtigercrm/trunk/modules/PriceBooks/PriceBook.js
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBook.js (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBook.js Wed Mar 29 04:21:25 2006
@@ -103,15 +103,6 @@
document.addToPB.action="index.php?module=Products&action=addPbProductRelToDB&return_module=Products&return_action=AddProductsToPriceBook"
}
-function showDefaultCustomView(selectView)
-{
- 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)
{
var elem=document.addToPB.elements;
@@ -124,31 +115,6 @@
}
}
}
-
-function clear_form(form)
-{
- for (j = 0; j < form.elements.length; j++)
- {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one')
- {
- form.elements[j].value = '';
- }
- }
-}
-
-function cancelForm(frm)
-{
- window.history.back();
-}
-
-function trim(s)
-{
- while (s.substring(0,1) == " ")
- {
- s = s.substring(1, s.length);
- }
- return s;
-}
function check4null(form)
{
@@ -168,59 +134,6 @@
return true;
}
-function massDelete()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=PriceBooks&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
function set_return_specific(vendor_id, vendor_name)
Modified: vtigercrm/trunk/modules/Products/Product.js
==============================================================================
--- vtigercrm/trunk/modules/Products/Product.js (original)
+++ vtigercrm/trunk/modules/Products/Product.js Wed Mar 29 04:21:25 2006
@@ -8,13 +8,6 @@
*
********************************************************************************/
document.write("<script type='text/javascript' src='modules/Products/multifile.js'></"+"script>");
-function clear_form(form) {
- for (j = 0; j < form.elements.length; j++) {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one') {
- form.elements[j].value = '';
- }
- }
-}
function updateListPrice(unitprice,fieldname)
{
var elem=document.addToPB.elements;
@@ -28,18 +21,6 @@
}
}
-function cancelForm(frm)
-{
- window.history.back();
-}
-
-function trim(s)
-{
-while (s.substring(0,1) == " ") {
-s = s.substring(1, s.length);
-}
-return s;
-}
function check4null(form)
{
@@ -56,67 +37,6 @@
return false;
}
return true;
-}
-function showDefaultCustomView(selectView)
-{
- 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()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Products&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
}
function set_return(product_id, product_name) {
Modified: vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/PurchaseOrder.js Wed Mar 29 04:21:25 2006
@@ -204,76 +204,6 @@
calcGrandTotal()
}
-function showDefaultCustomView(selectView)
-{
- 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()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=PurchaseOrder&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
-
-
-function clear_form(form) {
- for (j = 0; j < form.elements.length; j++) {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one') {
- form.elements[j].value = '';
- }
- }
-}
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
Modified: vtigercrm/trunk/modules/Quotes/Quote.js
==============================================================================
--- vtigercrm/trunk/modules/Quotes/Quote.js (original)
+++ vtigercrm/trunk/modules/Quotes/Quote.js Wed Mar 29 04:21:25 2006
@@ -210,80 +210,16 @@
}
-function showDefaultCustomView(selectView)
-{
- 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()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Quotes&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-}
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
}
function set_return_specific(product_id, product_name) {
- //getOpenerObj used for DetailView
var fldName = getOpenerObj("quote_name");
var fldId = getOpenerObj("quote_id");
fldName.value = product_name;
fldId.value = product_id;
- //window.opener.document.EditView.quote_name.value = product_name;
- //window.opener.document.EditView.quote_id.value = product_id;
window.opener.document.EditView.action.value = 'EditView';
window.opener.document.EditView.convertmode.value = 'update_quote_val';
window.opener.document.EditView.submit();
Modified: vtigercrm/trunk/modules/Reports/Report.js
==============================================================================
--- vtigercrm/trunk/modules/Reports/Report.js (original)
+++ vtigercrm/trunk/modules/Reports/Report.js Wed Mar 29 04:21:25 2006
@@ -160,17 +160,6 @@
}
}
-function trim(s) {
- while (s.substring(0,1) == " ") {
- s = s.substring(1, s.length);
- }
- while (s.substring(s.length-1, s.length) == ' ') {
- s = s.substring(0,s.length-1);
- }
-
- return s;
-}
-
function verify_data(form) {
var isError = false;
var errorMessage = "";
Modified: vtigercrm/trunk/modules/Rss/Rss.js
==============================================================================
--- vtigercrm/trunk/modules/Rss/Rss.js (original)
+++ vtigercrm/trunk/modules/Rss/Rss.js Wed Mar 29 04:21:25 2006
@@ -39,15 +39,6 @@
break;
}
}
-function trim(s) {
- while (s.substring(0,1) == " ") {
- s = s.substring(1, s.length);
- }
- while (s.substring(s.length-1, s.length) == ' ') {
- s = s.substring(0,s.length-1);
- }
- return s;
-}
function verify_data(form) {
var isError = false;
var errorMessage = "";
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.js (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.js Wed Mar 29 04:21:25 2006
@@ -237,75 +237,6 @@
}
return true;
}
-function showDefaultCustomView(selectView)
-{
- 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()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=SalesOrder&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
-function clear_form(form) {
- for (j = 0; j < form.elements.length; j++) {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one') {
- form.elements[j].value = '';
- }
- }
-}
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
Modified: vtigercrm/trunk/modules/Vendors/Vendor.js
==============================================================================
--- vtigercrm/trunk/modules/Vendors/Vendor.js (original)
+++ vtigercrm/trunk/modules/Vendors/Vendor.js Wed Mar 29 04:21:25 2006
@@ -7,20 +7,6 @@
* All Rights Reserved.
*
********************************************************************************/
-
-function cancelForm(frm)
-{
- window.history.back();
-}
-
-function trim(s)
-{
- while (s.substring(0,1) == " ")
- {
- s = s.substring(1, s.length);
- }
- return s;
-}
function check4null(form)
{
@@ -40,79 +26,6 @@
return true;
}
-function showDefaultCustomView(selectView)
-{
- 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()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
- {
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring ="module=Users&action=massdelete&return_module=Vendors&viewname="+viewid+"&idlist="+idstring;
- ajaxObj.process("index.php?",urlstring);
- }
- else
- {
- return false;
- }
-
-}
-
-function clear_form(form)
-{
- for (j = 0; j < form.elements.length; j++)
- {
- if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one')
- {
- form.elements[j].value = '';
- }
- }
-}
function set_return_specific(vendor_id, vendor_name)
{
More information about the vtigercrm-commits
mailing list