[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 {*<!-- 2 3 /********************************************************************************* 4 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 5 * ("License"); You may not use this file except in compliance with the License 6 * The Original Code is: vtiger CRM Open Source 7 * The Initial Developer of the Original Code is vtiger. 8 * Portions created by vtiger are Copyright (C) vtiger. 9 * All Rights Reserved. 10 * 11 ********************************************************************************/ 12 13 -->*} 14 15 {*<!-- module header -->*} 16 <script language="JavaScript" type="text/javascript" src="include/js/general.js"></script> 17 <script language="JavaScript" type="text/javascript" src="include/js/ListView.js"></script> 18 <script language="JavaScript" type="text/javascript" src="include/js/search.js"></script> 19 {if $MODULE eq 'Contacts'} 20 <div id="dynloadarea" style="z-index:100000001;float:left;position:absolute;left:350px;top:150px;"></div> 21 {/if} 22 <script language="JavaScript" type="text/javascript" src="modules/{$MODULE}/{$SINGLE_MOD}.js"></script> 23 <script language="javascript"> 24 function checkgroup() 25 {ldelim} 26 if(document.change_ownerform_name.user_lead_owner[1].checked) 27 {ldelim} 28 document.change_ownerform_name.lead_group_owner.style.display = "block"; 29 document.change_ownerform_name.lead_owner.style.display = "none"; 30 {rdelim} 31 else 32 {ldelim} 33 document.change_ownerform_name.lead_owner.style.display = "block"; 34 document.change_ownerform_name.lead_group_owner.style.display = "none"; 35 {rdelim} 36 37 {rdelim} 38 function callSearch(searchtype) 39 {ldelim} 40 for(i=1;i<=26;i++) 41 {ldelim} 42 var data_td_id = 'alpha_'+ eval(i); 43 getObj(data_td_id).className = 'searchAlph'; 44 {rdelim} 45 gPopupAlphaSearchUrl = ''; 46 search_fld_val= $('bas_searchfield').options[$('bas_searchfield').selectedIndex].value; 47 search_txt_val=document.basicSearch.search_text.value; 48 var urlstring = ''; 49 if(searchtype == 'Basic') 50 {ldelim} 51 urlstring = 'search_field='+search_fld_val+'&searchtype=BasicSearch&search_text='+search_txt_val+'&'; 52 {rdelim} 53 else if(searchtype == 'Advanced') 54 {ldelim} 55 var no_rows = document.basicSearch.search_cnt.value; 56 for(jj = 0 ; jj < no_rows; jj++) 57 {ldelim} 58 var sfld_name = getObj("Fields"+jj); 59 var scndn_name= getObj("Condition"+jj); 60 var srchvalue_name = getObj("Srch_value"+jj); 61 urlstring = urlstring+'Fields'+jj+'='+sfld_name[sfld_name.selectedIndex].value+'&'; 62 urlstring = urlstring+'Condition'+jj+'='+scndn_name[scndn_name.selectedIndex].value+'&'; 63 urlstring = urlstring+'Srch_value'+jj+'='+srchvalue_name.value+'&'; 64 {rdelim} 65 for (i=0;i<getObj("matchtype").length;i++){ldelim} 66 if (getObj("matchtype")[i].checked==true) 67 urlstring += 'matchtype='+getObj("matchtype")[i].value+'&'; 68 {rdelim} 69 urlstring += 'search_cnt='+no_rows+'&'; 70 urlstring += 'searchtype=advance&' 71 {rdelim} 72 new Ajax.Request( 73 'index.php', 74 {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim}, 75 method: 'post', 76 postBody:urlstring +'query=true&file=index&module={$MODULE}&action={$MODULE}Ajax&ajax=true', 77 onComplete: function(response) {ldelim} 78 $("status").style.display="none"; 79 result = response.responseText.split('&#&#&#'); 80 $("ListViewContents").innerHTML= result[2]; 81 if(result[1] != '') 82 alert(result[1]); 83 {rdelim} 84 {rdelim} 85 ); 86 87 {rdelim} 88 function alphabetic(module,url,dataid) 89 {ldelim} 90 for(i=1;i<=26;i++) 91 {ldelim} 92 var data_td_id = 'alpha_'+ eval(i); 93 getObj(data_td_id).className = 'searchAlph'; 94 95 {rdelim} 96 getObj(dataid).className = 'searchAlphselected'; 97 $("status").style.display="inline"; 98 new Ajax.Request( 99 'index.php', 100 {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim}, 101 method: 'post', 102 postBody: 'module='+module+'&action='+module+'Ajax&file=index&ajax=true&'+url, 103 onComplete: function(response) {ldelim} 104 $("status").style.display="none"; 105 result = response.responseText.split('&#&#&#'); 106 $("ListViewContents").innerHTML= result[2]; 107 if(result[1] != '') 108 alert(result[1]); 109 {rdelim} 110 {rdelim} 111 ); 112 {rdelim} 113 114 </script> 115 116 {include file='Buttons_List.tpl'} 117 <!-- Activity createlink layer start --> 118 {if $MODULE eq 'Calendar'} 119 <div id="reportLay" style="width: 125px; right: 159px; top: 260px; display: none; z-index:50" onmouseout="fninvsh('reportLay')" onmouseover="fnvshNrm('reportLay')"> 120 <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%"> 121 <tr> 122 <td> 123 <a href="index.php?module={$MODULE}&action=EditView&return_module={$MODULE}&activity_mode=Events&return_action=DetailView&parenttab={$CATEGORY}" class="calMnu">{$NEW_EVENT}</a> 124 <a href="index.php?module={$MODULE}&action=EditView&return_module={$MODULE}&activity_mode=Task&return_action=DetailView&parenttab={$CATEGORY}" class="calMnu">{$NEW_TASK}</a> 125 </td> 126 </tr> 127 </table> 128 129 </div> 130 {/if} 131 <!-- Activity createlink layer end --> 132 133 <div id="searchingUI" style="display:none;"> 134 <table border=0 cellspacing=0 cellpadding=0 width=100%> 135 <tr> 136 <td align=center> 137 <img src="images/searching.gif" alt="Searching... please wait" title="Searching... please wait"> 138 </td> 139 </tr> 140 </table> 141 142 </div> 143 </td> 144 </tr> 145 </table> 146 </td> 147 </tr> 148 </table> 149 150 {*<!-- Contents -->*} 151 <form name="basicSearch" action="index.php" onsubmit="return false;"> 152 <table border=0 cellspacing=0 cellpadding=0 width=98% align=center> 153 <tr> 154 <td valign=top><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td> 155 156 <td class="showPanelBg" valign="top" width=100% style="padding:10px;"> 157 <!-- SIMPLE SEARCH --> 158 <div id="searchAcc" style="z-index:1;display:none;position:relative;"> 159 <table width="80%" cellpadding="5" cellspacing="0" class="searchUIBasic small" align="center" border=0> 160 <tr> 161 <td class="searchUIName small" nowrap align="left"> 162 <span class="moduleName">{$APP.LBL_SEARCH}</span><br><span class="small"><a href="#" onClick="fnhide('searchAcc');show('advSearch');document.basicSearch.searchtype.value='advance';">{$APP.LBL_GO_TO} {$APP.LNK_ADVANCED_SEARCH}</a></span> 163 <!-- <img src="{$IMAGE_PATH}basicSearchLens.gif" align="absmiddle" alt="{$APP.LNK_BASIC_SEARCH}" title="{$APP.LNK_BASIC_SEARCH}" border=0> --> 164 </td> 165 <td class="small" nowrap align=right><b>{$APP.LBL_SEARCH_FOR}</b></td> 166 <td class="small"><input type="text" class="txtBox" style="width:120px" name="search_text"></td> 167 <td class="small" nowrap><b>{$APP.LBL_IN}</b> </td> 168 <td class="small" nowrap> 169 <div id="basicsearchcolumns_real"> 170 <select name="search_field" id="bas_searchfield" class="txtBox" style="width:150px"> 171 {html_options options=$SEARCHLISTHEADER } 172 </select> 173 </div> 174 <input type="hidden" name="searchtype" value="BasicSearch"> 175 <input type="hidden" name="module" value="{$MODULE}"> 176 <input type="hidden" name="parenttab" value="{$CATEGORY}"> 177 <input type="hidden" name="action" value="index"> 178 <input type="hidden" name="query" value="true"> 179 <input type="hidden" name="search_cnt"> 180 </td> 181 <td class="small" nowrap width=40% > 182 <input name="submit" type="button" class="crmbutton small create" onClick="callSearch('Basic');" value=" {$APP.LBL_SEARCH_NOW_BUTTON} "> 183 184 </td> 185 <td class="small" valign="top" onMouseOver="this.style.cursor='pointer';" onclick="moveMe('searchAcc');searchshowhide('searchAcc','advSearch')">[x]</td> 186 </tr> 187 <tr> 188 <td colspan="7" align="center" class="small"> 189 <table border=0 cellspacing=0 cellpadding=0 width=100%> 190 <tr> 191 {$ALPHABETICAL} 192 </tr> 193 </table> 194 </td> 195 </tr> 196 </table> 197 </div> 198 <!-- ADVANCED SEARCH --> 199 <div id="advSearch" style="display:none;"> 200 <table cellspacing=0 cellpadding=5 width=80% class="searchUIAdv1 small" align="center" border=0> 201 <tr> 202 <td class="searchUIName small" nowrap align="left"><span class="moduleName">{$APP.LBL_SEARCH}</span><br><span class="small"><a href="#" onClick="show('searchAcc');fnhide('advSearch')">{$APP.LBL_GO_TO} {$APP.LNK_BASIC_SEARCH}</a></span></td> 203 <td nowrap class="small"><b><input name="matchtype" type="radio" value="all"> {$APP.LBL_ADV_SEARCH_MSG_ALL}</b></td> 204 <td nowrap width=60% class="small" ><b><input name="matchtype" type="radio" value="any" checked> {$APP.LBL_ADV_SEARCH_MSG_ANY}</b></td> 205 <td class="small" valign="top" onMouseOver="this.style.cursor='pointer';" onclick="moveMe('searchAcc');searchshowhide('searchAcc','advSearch')">[x]</td> 206 </tr> 207 </table> 208 <table cellpadding="2" cellspacing="0" width="80%" align="center" class="searchUIAdv2 small" border=0> 209 <tr> 210 <td align="center" class="small" width=90%> 211 <div id="fixed" style="position:relative;width:95%;height:80px;padding:0px; overflow:auto;border:1px solid #CCCCCC;background-color:#ffffff" class="small"> 212 <table border=0 width=95%> 213 <tr> 214 <td align=left> 215 <table width="100%" border="0" cellpadding="2" cellspacing="0" id="adSrc" align="left"> 216 <tr > 217 <td width="31%"><select name="Fields0" class="detailedViewTextBox"> 218 {$FIELDNAMES} 219 </select> 220 </td> 221 <td width="32%"><select name="Condition0" class="detailedViewTextBox"> 222 {$CRITERIA} 223 </select> 224 </td> 225 <td width="32%"><input type="text" name="Srch_value0" class="detailedViewTextBox"></td> 226 </tr> 227 </table> 228 </td> 229 </tr> 230 </table> 231 </div> 232 </td> 233 </tr> 234 </table> 235 236 <table border=0 cellspacing=0 cellpadding=5 width=80% class="searchUIAdv3 small" align="center"> 237 <tr> 238 <td align=left width=40%> 239 <input type="button" name="more" value=" {$APP.LBL_MORE} " onClick="fnAddSrch('{$FIELDNAMES}','{$CRITERIA}')" class="crmbuttom small edit" > 240 <input name="button" type="button" value=" {$APP.LBL_FEWER_BUTTON} " onclick="delRow()" class="crmbuttom small edit" > 241 </td> 242 <td align=left class="small"><input type="button" class="crmbutton small create" value=" {$APP.LBL_SEARCH_NOW_BUTTON} " onClick="totalnoofrows();callSearch('Advanced');"> 243 </td> 244 </tr> 245 </table> 246 </div> 247 </form> 248 {*<!-- Searching UI -->*} 249 250 <!-- PUBLIC CONTENTS STARTS--> 251 <div id="ListViewContents" class="small" style="width:100%;position:relative;"> 252 {include file="ListViewEntries.tpl"} 253 </div> 254 255 </td> 256 <td valign=top><img src="{$IMAGE_PATH}showPanelTopRight.gif"></td> 257 </tr> 258 </table> 259 260 261 <div id="changeowner" class="layerPopup" style="display:none;width:325px;"> 262 <table width="100%" border="0" cellpadding="3" cellspacing="0" class="layerHeadingULine"> 263 <tr> 264 <td class="layerPopupHeading" align="left" width="60%">{$APP.LBL_CHANGE_OWNER}</td> 265 <td> </td> 266 <td align="right" width="40%"><img onClick="fninvsh('changeowner');" title="{$APP.LBL_CLOSE}" alt="{$APP.LBL_CLOSE}" style="cursor:pointer;" src="{$IMAGE_PATH}close.gif" align="absmiddle" border="0"></td> 267 </tr> 268 </table> 269 <table border=0 cellspacing=0 cellpadding=5 width=95% align=center> 270 <tr> 271 <td class=small > 272 273 <!-- popup specific content fill in starts --> 274 <form name="change_ownerform_name"> 275 <table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white> 276 <tr> 277 <td width="50%"><b>{$APP.LBL_TRANSFER_OWNERSHIP}</b></td> 278 <td width="2%"><b>:</b></td> 279 <td width="48%"> 280 <input type = "radio" name = "user_lead_owner" onclick=checkgroup(); checked>{$APP.LBL_USER} 281 <input type = "radio" name = "user_lead_owner" onclick=checkgroup(); >{$APP.LBL_GROUP}<br> 282 <select name="lead_owner" id="lead_owner" class="detailedViewTextBox"> 283 {$CHANGE_OWNER} 284 </select> 285 <select name="lead_group_owner" id="lead_group_owner" class="detailedViewTextBox" style="display:none;"> 286 {$CHANGE_GROUP_OWNER} 287 </select> 288 </td> 289 </tr> 290 </table> 291 </form> 292 </td> 293 </tr> 294 </table> 295 <table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport"> 296 <tr> 297 <td align="center"> 298 <input type="button" name="button" class="crmbutton small edit" value="{$APP.LBL_UPDATE_OWNER}" onClick="ajaxChangeStatus('owner')"> 299 <input type="button" name="button" class="crmbutton small cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" onClick="fninvsh('changeowner')"> 300 </td> 301 </tr> 302 </table> 303 </div> 304 305 306 {if $MODULE eq 'Leads'} 307 <div id="changestatus" class="layerPopup" style="display:none;width:325px;"> 308 <table width="100%" border="0" cellpadding="3" cellspacing="0" class="layerHeadingULine"> 309 <tr> 310 <td class="genHeaderSmall" align="left" style="border-bottom:1px solid #CCCCCC;" width="60%">{$APP.LBL_CHANGE_STATUS}</td> 311 <td> </td> 312 <td align="right" style="border-bottom:1px solid #CCCCCC;" width="40%"><img onClick="fninvsh('changestatus');" title="{$APP.LBL_CLOSE}" alt="{$APP.LBL_CLOSE}" style="cursor:pointer;" src="{$IMAGE_PATH}close.gif" align="absmiddle" border="0"></td> 313 </tr> 314 </table> 315 <table border=0 cellspacing=0 cellpadding=5 width=95% align=center> 316 <tr> 317 <td class=small > 318 319 <!-- popup specific content fill in starts --> 320 321 <table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white> 322 <tr> 323 <td width="50%"><b>{$APP.LBL_SELECT_STATUS}</b></td> 324 <td width="2%"><b>:</b></td> 325 <td width="48%"> 326 <select name="lead_status" id="lead_status" class="detailedViewTextBox"> 327 {$CHANGE_STATUS} 328 </select> 329 </td> 330 </tr> 331 </tr> 332 </table> 333 </td> 334 </tr> 335 </table> 336 <table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport"> 337 <tr> 338 <td align="center"> 339 <input type="button" name="button" class="crmbutton small edit" value="{$APP.LBL_UPDATE_STATUS}" onClick="ajaxChangeStatus('status')"> 340 </td> 341 </tr> 342 </table> 343 </div> 344 {/if} 345 {if $MODULE eq 'Leads' or $MODULE eq 'Contacts' or $MODULE eq 'Accounts'} 346 <form name="SendMail"><div id="sendmail_cont" style="z-index:100001;position:absolute;"></div></form> 347 {/if} 348 <script> 349 {literal} 350 351 function ajaxChangeStatus(statusname) 352 { 353 $("status").style.display="inline"; 354 var viewid = document.getElementById('viewname').options[document.getElementById('viewname').options.selectedIndex].value; 355 var idstring = document.getElementById('idlist').value; 356 if(statusname == 'status') 357 { 358 fninvsh('changestatus'); 359 var url='&leadval='+document.getElementById('lead_status').options[document.getElementById('lead_status').options.selectedIndex].value; 360 var urlstring ="module=Users&action=updateLeadDBStatus&return_module=Leads"+url+"&viewname="+viewid+"&idlist="+idstring; 361 } 362 else if(statusname == 'owner') 363 { 364 if(document.change_ownerform_name.user_lead_owner[0].checked) 365 { 366 fninvsh('changeowner'); 367 var url='&user_id='+document.getElementById('lead_owner').options[document.getElementById('lead_owner').options.selectedIndex].value; 368 {/literal} 369 var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+url+"&viewname="+viewid+"&idlist="+idstring; 370 {literal} 371 } 372 else 373 { 374 fninvsh('changeowner'); 375 var url='&group_id='+document.getElementById('lead_group_owner').options[document.getElementById('lead_group_owner').options.selectedIndex].value; 376 {/literal} 377 var urlstring ="module=Users&action=updateLeadDBStatus&return_module={$MODULE}"+url+"&viewname="+viewid+"&idlist="+idstring; 378 {literal} 379 } 380 } 381 new Ajax.Request( 382 'index.php', 383 {queue: {position: 'end', scope: 'command'}, 384 method: 'post', 385 postBody: urlstring, 386 onComplete: function(response) { 387 $("status").style.display="none"; 388 result = response.responseText.split('&#&#&#'); 389 $("ListViewContents").innerHTML= result[2]; 390 if(result[1] != '') 391 alert(result[1]); 392 } 393 } 394 ); 395 396 } 397 </script> 398 {/literal} 399 400 {if $MODULE eq 'Contacts'} 401 {literal} 402 <script> 403 function modifyimage(divid,imagename) 404 { 405 document.getElementById('dynloadarea').innerHTML = '<img width="260" height="200" src="'+imagename+'" class="thumbnail">'; 406 show(divid); 407 } 408 </script> 409 {/literal} 410 {/if} 411 412
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |