Development

Changeset 3872

You must first sign up to be able to contribute.

Changeset 3872

Show
Ignore:
Timestamp:
04/26/07 01:41:43 (6 years ago)
Author:
Jonathan.Wage
Message:

sfTabbedContentPlugin: Fixed issue with non ajax loading tabbed content.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfTabbedContentPlugin/lib/BasesfTabbedContent.class.php

    r3839 r3872  
    854854     
    855855    $li = "\n".'<li id="'.$id.'" class="'.$class.'_level_'.$level.'">'; 
     856     
     857    $options = $element->getOptions(); 
     858    $useAjaxLoading = array_key_exists('ajax', $options) ? $options['ajax']:$this->getUseAjaxLoading(); 
    856859 
    857860    // the event trigger for changing a tab 
    858     $onClick = $this->getTabRenderTrigger().'="javascript: changeTab(\''.$this->getId().'\', \''.$name.'\', \''.$this->getAjaxUpdateUrl($name, $element).'\', \''.$parent.'\', \''.!$this->getUseAjaxLoading().'\', \''.$level.'\');"'; 
     861    $onClick = $this->getTabRenderTrigger().'="javascript: changeTab(\''.$this->getId().'\', \''.$name.'\', \''.$this->getAjaxUpdateUrl($name, $element).'\', \''.$parent.'\', \''.!$useAjaxLoading.'\', \''.$level.'\');"'; 
    859862     
    860863    // If parents with children collapse/expand and show tab content when the trigger occurs 
  • plugins/sfTabbedContentPlugin/web/js/tabbed_content.js

    r3722 r3872  
    77  if( !ajax ) 
    88  { 
    9     window.location.href = window.location.href + '?tabbed_content_id=' + id + '&set_current_tab=' + newTabName; 
    10     return; 
     9    new Ajax.Request(changeCurrentTabPath, {asynchronous: false, evalScripts: true}); 
     10    window.location.reload(); 
     11    return; 
    1112  } 
    1213