[ 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 {literal} 21 <script type="text/javascript"> 22 23 Vtiger_MultiBarchat_Widget_Js('Vtiger_Groupedbysalesperson_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 40 var allLinks = new Array(); 41 for(j in stages) { 42 var salesStageCount = new Array(); 43 var links = new Array(); 44 for(i in users) { 45 var salesCount = 0; 46 for(var k in data) { 47 var userData = data[k]; 48 if(userData.sales_stage == stages[j] && userData.last_name == users[i]) { 49 salesCount = parseInt(userData.count); 50 link = userData.links 51 break; 52 } 53 } 54 links.push(link); 55 salesStageCount.push(salesCount); 56 } 57 allLinks.push(links); 58 count.push(salesStageCount); 59 } 60 return { 61 'data' : count, 62 'ticks' : users, 63 'labels' : stages, 64 'links' : allLinks 65 } 66 } 67 }); 68 </script> 69 {/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 |