Yii Framework Forum: CTabView / disabled javascript - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CTabView / disabled javascript non js browsers / people / mobile browsers Rate Topic: -----

#1 User is offline   totha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 15-September 10

Posted 22 October 2010 - 06:00 AM

hi

does CTabView supports scenario following scenario:

1. we define "view" to be used AND "url" for "tab"
2. on no javascript, url is used to reload whole page with particular tab open

and if does, an example please ???

cheers!
0

#2 User is offline   totha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 15-September 10

Posted 22 October 2010 - 09:46 AM

raw solution:

replace in CTabView->renderHeader() {:

$url=isset($tab['url'])?$tab['url']:"#{$id}";

with:

if(isset($tab['url'])) {
$url = $tab['url'] . (@strpos('?', $tab['url']) !== false ? '&' : '?') . 'activeTab=' . $id . '#' . $id;
} else {
$url = '?activeTab=' . $id . '#' . $id;
}


... and tabs works with disabled js (think about high end super phones with browsers still in 80s)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users