3 /*********************************************************************************
4 * SugarCRM 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 ********************************************************************************/
45 SUGAR.subpanelUtils.currentSubpanelGroup = '{$startSubPanel}';
47 SUGAR.subpanelUtils.subpanelMoreTab = '{$moreTab}';
49 SUGAR.subpanelUtils.subpanelMaxSubtabs = '{$maxSubtabs}';
51 SUGAR.subpanelUtils.subpanelHtml = new Array();
53 SUGAR.subpanelUtils.loadedGroups = Array();
54 SUGAR.subpanelUtils.loadedGroups.push('{$startSubPanel}');
56 SUGAR.subpanelUtils.subpanelSubTabs = new Array();
57 SUGAR.subpanelUtils.subpanelGroups = new Array();
58 {foreach from=$othertabs item=tab}
59 {assign var='notFirst' value='0'}
60 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}];
63 {assign var='notFirst' value='0'}
64 SUGAR.subpanelUtils.subpanelTitles = {ldelim}{foreach from=$othertabs.All.tabs item=subtab}{if $notFirst != 0}, {else}{assign var='notFirst' value='1'}{/if}'{$subtab.key}':'{$subtab.label}'{/foreach}{foreach from=$otherMoreSubMenu.All.tabs item=subtab}, '{$subtab.key}':'{$subtab.label}'{/foreach}{rdelim};
66 SUGAR.subpanelUtils.tabCookieName = get_module_name() + '_sp_tab';
68 SUGAR.subpanelUtils.showLinks = {$showLinks};
70 SUGAR.subpanelUtils.requestUrl = 'index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$smarty.request.module}&record={$smarty.request.record}&subpanels=';
74 {if !empty($sugartabs)}
75 <ul id="groupTabs" class="subpanelTablist">
76 {foreach from=$sugartabs item=tab}
77 <li id="{$tab.label}_sp_tab">
78 <a class="{$tab.type}" href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('{$tab.label}');">{$tab.label}</a>
81 {if !empty($moreMenu)}
83 <div id='MorePanelHandle' onmouseover='SUGAR.subpanelUtils.menu.tbspButtonMouseOver(this.id,"","",0);'>
84 <img src="{sugar_getimagepath file='blank.gif'}" alt="more" border="0" height="16" width="16" />
89 {* Table closed in SubPanelTiles.php, line 295 *}
90 <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm">
95 {if $showLinks == 'true'}
96 <table cellpadding="0" cellspacing="0" width='100%'>
98 <td class="subpanelSubTabBar" colspan="100" id="subpanelSubTabs">
99 <table border="0" cellpadding="0" cellspacing="0" height="20" width="100%" class="subTabs">
102 {foreach from=$subtabs item=tab}
103 {if !empty($notFirst) && ($notFirst != 0) && ($notFirst != 1)}
104 <td width='1'> | </td>
106 {assign var='notFirst' value='2'}
109 <a href='#{$tab.key}' class='subTabLink'>{$tab.label}</a>
112 {if !empty($otherMoreSubMenu[$moreSubMenuName].tabs)}
113 <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>
115 <td width='100%'> </td>
124 {if !empty($moreMenu)}
125 <div id="MorePanelMenu" class="menu">
126 {foreach from=$moreMenu item=tab}
127 <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>
132 {foreach from=$otherMoreSubMenu item=group}
133 {if !empty($group.tabs)}
134 <div id="MoreSub{$group.key}PanelMenu" class="menu">
135 {foreach from=$group.tabs item=subtab}
136 <a href="#{$subtab.key}" class="menuItem" parentid="MoreSub{$group.key}PanelMenu" onmouseover="hiliteItem(this,'yes'); closeSubMenus(this);" onmouseout="unhiliteItem(this);">{$subtab.label}</a>