]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/MySugar/tpls/MySugar.tpl
Release 6.4.1
[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 <!-- begin includes for overlib -->
59 {sugar_getscript file="cache/include/javascript/sugar_grp_overlib.js"}
60 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>
61 <!-- end includes for overlib -->
62
63
64 {sugar_getscript file="cache/include/javascript/sugar_grp_yui_widgets.js"}
65 {sugar_getscript file='include/javascript/dashlets.js'}
66 <link rel='stylesheet' href='{sugar_getjspath file='include/ytree/TreeView/css/folders/tree.css'}'>
67 {$chartResources}
68 {$mySugarChartResources}
69
70 <script type="text/javascript">
71 var activePage = {$activePage};
72 var theme = '{$theme}';
73 current_user_id = '{$current_user}';
74 jsChartsArray = new Array();
75 var moduleName = '{$module}';
76 document.body.setAttribute("class", "yui-skin-sam");
77 {literal}
78 var mySugarLoader = new YAHOO.util.YUILoader({
79         require : ["my_sugar", "sugar_charts"],
80     // Bug #48940 Skin always must be blank
81     skin: {
82         base: 'blank',
83         defaultSkin: ''
84     },
85         onSuccess: function(){
86                 initMySugar();
87                 initmySugarCharts();
88                 SUGAR.mySugar.maxCount =        {/literal}{$maxCount}{literal};
89                 SUGAR.mySugar.homepage_dd = new Array();
90                 var j = 0;
91
92                 {/literal}
93                 var dashletIds = {$dashletIds};
94
95                 {if !$lock_homepage}
96                         for(i in dashletIds) {ldelim}
97                                 SUGAR.mySugar.homepage_dd[j] = new ygDDList('dashlet_' + dashletIds[i]);
98                                 SUGAR.mySugar.homepage_dd[j].setHandleElId('dashlet_header_' + dashletIds[i]);
99                 // Bug #47097 : Dashlets not displayed after moving them
100                 // add new property to save real id of dashlet, it needs to have ability reload dashlet by id
101                 SUGAR.mySugar.homepage_dd[j].dashletID = dashletIds[i];
102                                 SUGAR.mySugar.homepage_dd[j].onMouseDown = SUGAR.mySugar.onDrag;
103                                 SUGAR.mySugar.homepage_dd[j].afterEndDrag = SUGAR.mySugar.onDrop;
104                                 j++;
105                         {rdelim}
106                         {if $hiddenCounter > 0}
107                         for(var wp = 0; wp <= {$hiddenCounter}; wp++) {ldelim}
108                                 SUGAR.mySugar.homepage_dd[j++] = new ygDDListBoundary('page_'+activePage+'_hidden' + wp);
109                         {rdelim}
110                         {/if}
111                         YAHOO.util.DDM.mode = 1;
112                 {/if}
113                 {literal}
114                 SUGAR.mySugar.renderDashletsDialog();
115                 SUGAR.mySugar.sugarCharts.loadSugarCharts(activePage);
116                 {/literal}
117                 {literal}
118         }
119 });
120 mySugarLoader.addModule({
121         name :"my_sugar",
122         type : "js",
123         fullpath: {/literal}"{sugar_getjspath file='include/MySugar/javascript/MySugar.js'}"{literal},
124         varName: "initMySugar",
125         requires: []
126 });
127 mySugarLoader.addModule({
128         name :"sugar_charts",
129         type : "js",
130         fullpath: {/literal}"{sugar_getjspath file="include/SugarCharts/Jit/js/mySugarCharts.js"}"{literal},
131         varName: "initmySugarCharts",
132         requires: []
133 });
134 mySugarLoader.insert();
135 {/literal}
136 </script>
137
138
139
140
141 <div class="clear"></div>
142 <div id="pageContainer" class="yui-skin-sam">
143 <div id="pageNum_{$activePage}_div">
144 <table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top: 5px;">
145         <tr>
146                 <td>
147
148                 </td>
149
150                 <td rowspan="3">
151                                 {sugar_getimage name="blank.gif"  width='40' height='1' border='0'}
152                 </td>
153                 <td align='right'>
154                         {if !$lock_homepage}<input id="add_dashlets" class="button" type="button" value="{$lblAddDashlets}" onclick="return SUGAR.mySugar.showDashletsDialog();"/>{/if}
155                 </td>
156         </tr>
157         <tr>
158                 {counter assign=hiddenCounter start=0 print=false}
159                 {foreach from=$columns key=colNum item=data}
160                 <td valign='top' width='{$data.width}'>
161                         <ul class='noBullet' id='col_{$activePage}_{$colNum}'>
162                                 <li id='page_{$activePage}_hidden{$hiddenCounter}b' style='height: 5px; margin-top:12px;' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
163                         {foreach from=$data.dashlets key=id item=dashlet}
164                                 <li class='noBullet' id='dashlet_{$id}'>
165                                         <div id='dashlet_entire_{$id}' class='dashletPanel'>
166                                                 {$dashlet.script}
167                                         {$dashlet.displayHeader}
168                                                 {$dashlet.display}
169                         {$dashlet.displayFooter}
170                   </div>
171                                 </li>
172                                 {/foreach}
173                                 <li id='page_{$activePage}_hidden{$hiddenCounter}' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
174                         </ul>
175                 </td>
176                 {counter}
177                 {/foreach}
178         </tr>
179 </table>
180         </div>
181
182         {foreach from=$divPages key=divPageIndex item=divPageNum}
183         <div id="pageNum_{$divPageNum}_div" style="display:none;">
184         </div>
185         {/foreach}
186
187
188
189         <div id="dashletsDialog" style="display:none;">
190                 <div class="hd" id="dashletsDialogHeader"><a href="javascript:void(0)" onClick="javascript:SUGAR.mySugar.closeDashletsDialog();">
191                         <div class="container-close">&nbsp;</div></a>{$lblAdd}
192                 </div>
193                 <div class="bd" id="dashletsList">
194                         <form></form>
195                 </div>
196
197         </div>
198                                 
199         
200 </div>