Skip to content
Snippets Groups Projects
Commit 2ad3bb7d authored by colemanw's avatar colemanw
Browse files

CRM-13997 - Fix unsupported 'selected' param to ui.tabs

parent 660c46f3
No related branches found
No related tags found
No related merge requests found
......@@ -103,19 +103,13 @@
{* Tab management *}
<script type="text/javascript">
var selectedTab = 'summary';
var spinnerImage = '<img src="{$config->resourceBase}i/loading.gif" style="width:10px;height:10px"/>';
{if $selectedChild}selectedTab = "{$selectedChild}";{/if}
{literal}
//explicitly stop spinner
function stopSpinner( ) {
cj('li.crm-tab-button').each(function(){ cj(this).find('span').text(' ');})
}
cj( function() {
var tabIndex = cj('#tab_' + selectedTab).prevAll().length;
cj("#mainTabContainer").tabs({ selected: tabIndex, spinner: spinnerImage, cache: true, load: stopSpinner});
cj("#mainTabContainer").tabs({ active: tabIndex, cache: true});
cj(".crm-tab-button").addClass("ui-corner-bottom");
});
{/literal}
......
......@@ -159,7 +159,7 @@
{literal}
cj( function() {
var tabIndex = cj('#tab_' + selectedTab).prevAll().length
cj("#mainTabContainer").tabs( {selected: tabIndex} );
cj("#mainTabContainer").tabs( {active: tabIndex} );
});
{/literal}
</script>
......
......@@ -75,7 +75,7 @@ cj(document).ready( function( ) {
var selectedTabIndex = {/literal}{$selectedTabIndex}{literal};
cj("#mainTabContainer").tabs( {
selected: selectedTabIndex,
active: selectedTabIndex,
spinner: spinnerImage,
cache: true,
load: stopSpinner
......
......@@ -58,7 +58,7 @@ cj(document).ready( function( ) {
var selectedTabIndex = {/literal}{$selectedTabIndex}{literal};
cj("#mainTabContainer").tabs( {
selected: selectedTabIndex,
active: selectedTabIndex,
spinner: spinnerImage,
cache: false,
load: stopSpinner
......
......@@ -341,7 +341,7 @@
var tabIndex = $('#tab_' + selectedTab).prevAll().length;
var spinnerImage = '<img src="{$config->resourceBase}i/loading.gif" style="width:10px;height:10px"/>';
{literal}
$("#mainTabContainer").tabs({ selected: tabIndex, spinner: spinnerImage, cache: true, load: stopSpinner});
$("#mainTabContainer").tabs({ active: tabIndex, spinner: spinnerImage, cache: true, load: stopSpinner});
$(".crm-tab-button").addClass("ui-corner-bottom");
$().crmAccordions();
......
......@@ -159,7 +159,7 @@
{literal}
cj( function() {
var tabIndex = cj('#tab_' + selectedTab).prevAll().length
cj("#mainTabContainer").tabs( {selected: tabIndex} );
cj("#mainTabContainer").tabs( {active: tabIndex} );
});
{/literal}
</script>
......
......@@ -56,7 +56,7 @@
cj( function() {
var tabIndex = cj('#tab_' + selectedTab).prevAll().length
cj("#mainTabContainer").tabs( {
selected: tabIndex,
active: tabIndex,
spinner: spinnerImage,
select: function(event, ui) {
// we need to change the action of parent form, so that form submits to correct page
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment