[Vtigercrm-commits] [vtiger-commits] r7484 - in /vtigercrm/trunk: Smarty/templates/RelatedListContents.tpl Smarty/templates/RelatedLists.tpl modules/Campaigns/CallRelatedList.php modules/Campaigns/LoadList.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Jun 24 01:55:47 EDT 2006
Author: mmbrich
Date: Fri Jun 23 23:55:34 2006
New Revision: 7484
Log:
ability to load lists from custom view
Added:
vtigercrm/trunk/modules/Campaigns/LoadList.php
Modified:
vtigercrm/trunk/Smarty/templates/RelatedListContents.tpl
vtigercrm/trunk/Smarty/templates/RelatedLists.tpl
vtigercrm/trunk/modules/Campaigns/CallRelatedList.php
Modified: vtigercrm/trunk/Smarty/templates/RelatedListContents.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/RelatedListContents.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/RelatedListContents.tpl Fri Jun 23 23:55:34 2006
@@ -35,6 +35,7 @@
{/if}
{elseif $header eq 'Leads'}
{if $MODULE eq 'Campaigns'}
+ {$LEADCVCOMBO} <span id="lead_list_button"><input title="Change" accessKey="" class="small" value="Load List" type="button" name="button"></span>
<input title="Change" accessKey="" class="small" value="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Lead}" LANGUAGE=javascript onclick='return window.open("index.php?module=Leads&return_module={$MODULE}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$ID}","test","width=640,height=570,resizable=0,scrollbars=0");' type="button" name="button">
{/if}
<input title="{$APP.LBL_ADD_NEW} {$APP.Lead}" accessyKey="F" class="small" onclick="this.form.action.value='EditView';this.form.module.value='Leads'" type="submit" name="button" value="{$APP.LBL_ADD_NEW} {$APP.Lead}"></td>
@@ -45,6 +46,7 @@
<input title="{$APP.LBL_BULK_MAILS}" accessykey="F" class="small" onclick="this.form.action.value='sendmail';this.form.return_action.value='DetailView';this.form.module.value='Emails';this.form.return_module.value='Emails';" name="button" value="{$APP.LBL_BULK_MAILS}" type="submit">
<input title="Change" accessKey="" class="small" value="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Contact}" LANGUAGE=javascript onclick='return window.open("index.php?module=Contacts&return_module=Emails&action=Popup&popuptype=detailview&form=EditView&form_submit=false&recordid={$ID}","test","width=640,height=570,resizable=0,scrollbars=0");' type="button" name="button"></td>
{elseif $MODULE eq 'Campaigns'}
+ {$CONTCVCOMBO} <span id="contact_list_button"><input title="Change" accessKey="" class="small" value="Load List" type="button" name="button"></span>
<input title="Change" accessKey="" class="small" value="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Contact}" LANGUAGE=javascript onclick='return window.open("index.php?module=Contacts&return_module={$MODULE}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$ID}","test","width=640,height=570,resizable=0,scrollbars=0");' type="button" name="button">
<input title="{$APP.LBL_ADD_NEW} {$APP.Contact}" accessyKey="F" class="small" onclick="this.form.action.value='EditView';this.form.module.value='Contacts'" type="submit" name="button" value="{$APP.LBL_ADD_NEW} {$APP.Contact}"></td>
{else}
Modified: vtigercrm/trunk/Smarty/templates/RelatedLists.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/RelatedLists.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/RelatedLists.tpl Fri Jun 23 23:55:34 2006
@@ -47,6 +47,14 @@
}
}
);
+}
+
+function loadCvList(type,id) {
+ if(type === 'Leads')
+ $("lead_list_button").innerHTML = '<input title="Change" accessKey="" class="small" value="Load List" type="button" name="button" onclick="window.location.href=\'index.php?action=LoadList&module=Campaigns&return_id='+id+'&list_type='+type+'&cvid='+$("lead_cv_list").value+'\'">';
+
+ if(type === 'Contacts')
+ $("contact_list_button").innerHTML = '<input title="Change" accessKey="" class="small" value="Load List" type="button" name="button" onclick="window.location.href=\'index.php?action=LoadList&module=Campaigns&return_id='+id+'&list_type='+type+'&cvid='+$("cont_cv_list").value+'\'">';
}
</script>
{/literal}
Modified: vtigercrm/trunk/modules/Campaigns/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/Campaigns/CallRelatedList.php Fri Jun 23 23:55:34 2006
@@ -12,6 +12,7 @@
require_once('Smarty_setup.php');
require_once('modules/Campaigns/Campaign.php');
+require_once('modules/CustomView/CustomView.php');
require_once('include/utils/utils.php');
$focus = new Campaign();
@@ -47,6 +48,15 @@
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
$related_array=getRelatedLists($currentModule,$focus);
$smarty->assign("RELATEDLISTS", $related_array);
+
+$cvObj = new CustomView("Contacts");
+$cvcombo = $cvObj->getCustomViewCombo();
+$smarty->assign("CONTCVCOMBO","<select id='cont_cv_list' onchange='loadCvList(\"Contacts\",".$_REQUEST["record"].");'><option>-- Select One --</option>".$cvcombo."</select>");
+
+$cvObj = new CustomView("Leads");
+$cvcombo = $cvObj->getCustomViewCombo();
+$smarty->assign("LEADCVCOMBO","<select id='lead_cv_list' onchange='loadCvList(\"Leads\",".$_REQUEST["record"].");'> <option>-- Select One --</option>".$cvcombo."</select>");
+
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
More information about the vtigercrm-commits
mailing list