]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/MySugar/tpls/MySugar.tpl
Release 6.5.0
[Github/sugarcrm.git] / include / MySugar / tpls / MySugar.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38
39
40
41 *}
42 {literal}
43 <style>
44 .menu{
45         z-index:100;
46 }
47
48 .subDmenu{
49         z-index:100;
50 }
51
52 div.moduleTitle {
53 height: 10px;
54         }
55 </style>
56 {/literal}
57
58
59
60 {sugar_getscript file="cache/include/javascript/sugar_grp_yui_widgets.js"}
61 {sugar_getscript file='include/javascript/dashlets.js'}
62
63 {$chartResources}
64 {$mySugarChartResources}
65
66 <script type="text/javascript">
67 var activePage = {$activePage};
68 var theme = '{$theme}';
69 current_user_id = '{$current_user}';
70 jsChartsArray = new Array();
71 var moduleName = '{$module}';
72 document.body.setAttribute("class", "yui-skin-sam");
73 {literal}
74 var mySugarLoader = new YAHOO.util.YUILoader({
75         require : ["my_sugar", "sugar_charts"],
76     // Bug #48940 Skin always must be blank
77     skin: {
78         base: 'blank',
79         defaultSkin: ''
80     },
81         onSuccess: function(){
82                 initMySugar();
83                 initmySugarCharts();
84                 SUGAR.mySugar.maxCount =        {/literal}{$maxCount}{literal};
85                 SUGAR.mySugar.homepage_dd = new Array();
86                 var j = 0;
87
88                 {/literal}
89                 var dashletIds = {$dashletIds};
90
91                 {if !$lock_homepage}
92                         for(i in dashletIds) {ldelim}
93                                 SUGAR.mySugar.homepage_dd[j] = new ygDDList('dashlet_' + dashletIds[i]);
94                                 SUGAR.mySugar.homepage_dd[j].setHandleElId('dashlet_header_' + dashletIds[i]);
95                 // Bug #47097 : Dashlets not displayed after moving them
96                 // add new property to save real id of dashlet, it needs to have ability reload dashlet by id
97                 SUGAR.mySugar.homepage_dd[j].dashletID = dashletIds[i];
98                                 SUGAR.mySugar.homepage_dd[j].onMouseDown = SUGAR.mySugar.onDrag;
99                                 SUGAR.mySugar.homepage_dd[j].afterEndDrag = SUGAR.mySugar.onDrop;
100                                 j++;
101                         {rdelim}
102                         {if $hiddenCounter > 0}
103                         for(var wp = 0; wp <= {$hiddenCounter}; wp++) {ldelim}
104                                 SUGAR.mySugar.homepage_dd[j++] = new ygDDListBoundary('page_'+activePage+'_hidden' + wp);
105                         {rdelim}
106                         {/if}
107                         YAHOO.util.DDM.mode = 1;
108                 {/if}
109                 {literal}
110                 SUGAR.mySugar.renderDashletsDialog();
111                 SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage);
112                 {/literal}
113                 {literal}
114         }
115 });
116 mySugarLoader.addModule({
117         name :"my_sugar",
118         type : "js",
119         fullpath: {/literal}"{sugar_getjspath file='include/MySugar/javascript/MySugar.js'}"{literal},
120         varName: "initMySugar",
121         requires: []
122 });
123 mySugarLoader.addModule({
124         name :"sugar_charts",
125         type : "js",
126         fullpath: {/literal}"{sugar_getjspath file="include/SugarCharts/Jit/js/mySugarCharts.js"}"{literal},
127         varName: "initmySugarCharts",
128         requires: []
129 });
130 mySugarLoader.insert();
131 {/literal}
132 </script>
133
134
135
136
137 <div class="clear"></div>
138 <div id="pageContainer" class="yui-skin-sam">
139 <div id="pageNum_{$activePage}_div">
140 <table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 5px;">
141         <tr>
142                 <td>
143
144                 </td>
145
146                 <td rowspan="3">
147                                 {sugar_getimage name="blank.gif"  width='40' height='1' border='0'}
148                 </td>
149                 <td align='right'>
150                         {if !$lock_homepage}<input id="add_dashlets" class="button" type="button" value="{$lblAddDashlets}" onclick="return SUGAR.mySugar.showDashletsDialog();"/>{/if}
151                 </td>
152         </tr>
153         <tr>
154                 {counter assign=hiddenCounter start=0 print=false}
155                 {foreach from=$columns key=colNum item=data}
156                 <td valign='top' width='{$data.width}'>
157                         <ul class='noBullet' id='col_{$activePage}_{$colNum}'>
158                                 <li id='page_{$activePage}_hidden{$hiddenCounter}b' style='height: 5px; margin-top:12px;' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
159                         {foreach from=$data.dashlets key=id item=dashlet}
160                                 <li class='noBullet' id='dashlet_{$id}'>
161                                         <div id='dashlet_entire_{$id}' class='dashletPanel'>
162                                                 {$dashlet.script}
163                                         {$dashlet.displayHeader}
164                                                 {$dashlet.display}
165                         {$dashlet.displayFooter}
166                   </div>
167                                 </li>
168                                 {/foreach}
169                                 <li id='page_{$activePage}_hidden{$hiddenCounter}' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
170                         </ul>
171                 </td>
172                 {counter}
173                 {/foreach}
174         </tr>
175 </table>
176         </div>
177
178         {foreach from=$divPages key=divPageIndex item=divPageNum}
179         <div id="pageNum_{$divPageNum}_div" style="display:none;">
180         </div>
181         {/foreach}
182
183
184
185         <div id="dashletsDialog" style="display:none;">
186                 <div class="hd" id="dashletsDialogHeader"><a href="javascript:void(0)" onClick="javascript:SUGAR.mySugar.closeDashletsDialog();">
187                         <div class="container-close">&nbsp;</div></a>{$lblAdd}
188                 </div>
189                 <div class="bd" id="dashletsList">
190                         <form></form>
191                 </div>
192
193         </div>
194                                 
195         
196 </div>