3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
44 <script type="text/javascript">
45 SUGAR.util.doWhen("typeof get_module_name != 'undefined'", function()
47 SUGAR.subpanelUtils.currentSubpanelGroup = '{$startSubPanel}';
49 SUGAR.subpanelUtils.subpanelMoreTab = '{$moreTab}';
51 SUGAR.subpanelUtils.subpanelMaxSubtabs = '{$maxSubtabs}';
53 SUGAR.subpanelUtils.subpanelHtml = new Array();
55 SUGAR.subpanelUtils.loadedGroups = Array();
56 SUGAR.subpanelUtils.loadedGroups.push('{$startSubPanel}');
58 SUGAR.subpanelUtils.subpanelSubTabs = new Array();
59 SUGAR.subpanelUtils.subpanelGroups = new Array();
60 {foreach from=$othertabs item=tab}
61 {assign var='notFirst' value='0'}
62 SUGAR.subpanelUtils.subpanelGroups['{$tab.key}'] = [{foreach from=$tab.tabs item=subtab}{if $notFirst != 0}, {else}{assign var='notFirst' value='1'}{/if}'{$subtab.key}'{/foreach}{foreach from=$otherMoreSubMenu[$tab.key].tabs item=subtab}, '{$subtab.key}'{/foreach}];
65 {assign var='notFirst' value='0'}
66 SUGAR.subpanelUtils.subpanelTitles = {$subpanelTitlesJSON};
68 SUGAR.subpanelUtils.tabCookieName = get_module_name() + '_sp_tab';
70 SUGAR.subpanelUtils.showLinks = {$showLinks};
72 SUGAR.subpanelUtils.requestUrl = 'index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$smarty.request.module}&record={$smarty.request.record}&subpanels=';
77 {if !empty($sugartabs)}
78 <ul id="groupTabs" class="subpanelTablist">
79 {foreach from=$sugartabs item=tab}
80 <li id="{$tab.label}_sp_tab">
81 <a class="{$tab.type}" href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('{$tab.label}');">{$tab.label}</a>
84 {if !empty($moreMenu)}
86 <div id='MorePanelHandle' onmouseover='SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,"","",0);'>
87 {sugar_getimage name="blank" ext=".gif" width="16" height="16" alt=$app_strings.LBL_MORE other_attributes='border="0" '}
92 {* Table closed in SubPanelTiles.php, line 295 *}
93 <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm">
98 {if $showLinks == 'true'}
99 <table cellpadding="0" cellspacing="0" width='100%'>
101 <td class="subpanelSubTabBar" colspan="100" id="subpanelSubTabs">
102 <table border="0" cellpadding="0" cellspacing="0" height="20" width="100%" class="subTabs">
105 {foreach from=$subtabs item=tab}
106 {if !empty($notFirst) && ($notFirst != 0) && ($notFirst != 1)}
107 <td width='1'> | </td>
109 {assign var='notFirst' value='2'}
112 <a href='#{$tab.key}' class='subTabLink'>{$tab.label}</a>
115 {if !empty($otherMoreSubMenu[$moreSubMenuName].tabs)}
116 <td nowrap="nowrap"> | <span class="subTabMore" id="MoreSub{$moreSubMenuName}PanelHandle" style="margin-left:2px; cursor: pointer; cursor: hand;" align="absmiddle" onmouseover="SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,'','',0);">>></span></td>
118 <td width='100%'> </td>
127 {if !empty($moreMenu)}
128 <div id="MorePanelMenu" class="menu">
129 {foreach from=$moreMenu item=tab}
130 <a href="javascript:SUGAR.subpanelUtils.loadSubpanelGroupFromMore('{$tab.label}');" class="menuItem" id="{$tab.label}_sp_mm" parentid="MorePanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$tab.label}</a>
135 {foreach from=$otherMoreSubMenu item=group}
136 {if !empty($group.tabs)}
137 <div id="MoreSub{$group.key}PanelMenu" class="menu">
138 {foreach from=$group.tabs item=subtab}
139 <a href="#{$subtab.key}" class="menuItem" parentid="MoreSub{$group.key}PanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$subtab.label}</a>