[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 {*<!-- 2 /********************************************************************************* 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 * 10 ********************************************************************************/ 11 -->*} 12 13 <div class="dashboardWidgetHeader"> 14 {include file="dashboards/WidgetHeader.tpl"|@vtemplate_path:$MODULE_NAME} 15 </div> 16 <div class="dashboardWidgetContent"> 17 {include file="dashboards/DashBoardWidgetContents.tpl"|@vtemplate_path:$MODULE_NAME} 18 </div> 19 20 21 {literal} 22 <script type="text/javascript"> 23 Vtiger_MultiBarchat_Widget_Js('Vtiger_Pipelinedamountpersalesperson_Widget_Js',{},{ 24 getCharRelatedData : function() { 25 var container = this.getContainer(); 26 var data = container.find('.widgetData').val(); 27 data = JSON.parse(data); 28 var users = new Array(); 29 var stages = new Array(); 30 var count = new Array(); 31 for(var i=0; i<data.length ;i++) { 32 if($.inArray(data[i].last_name, users) == -1) { 33 users.push(data[i].last_name); 34 } 35 if($.inArray(data[i].sales_stage, stages) == -1) { 36 stages.push(data[i].sales_stage); 37 } 38 } 39 var allLinks = new Array(); 40 for(j in stages) { 41 var salesStageCount = new Array(); 42 var links = new Array(); 43 for(i in users) { 44 var salesCount = 0; 45 for(var k in data) { 46 var userData = data[k]; 47 if(userData.sales_stage == stages[j] && userData.last_name == users[i]) { 48 salesCount = parseInt(userData.amount); 49 link = userData.links 50 break; 51 } 52 } 53 links.push(link); 54 salesStageCount.push(salesCount); 55 } 56 allLinks.push(links); 57 count.push(salesStageCount); 58 } 59 return { 60 'data' : count, 61 'ticks' : users, 62 'labels' : stages, 63 'links' : allLinks 64 } 65 } 66 }); 67 </script> 68 {/literal}
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |