ENHANCEMENT SSF-124 make tab select pages list view if the current url is 'listchildren' otherwise use the default action defined in TabSet.js

This commit is contained in:
Normann Lou 2012-04-11 15:01:31 +12:00
parent 7900da4d9d
commit 653625914d
2 changed files with 16 additions and 1 deletions

View File

@ -3,6 +3,21 @@
*/
(function($) {
$.entwine('ss', function($){
$('#pages-controller-cms-content').entwine({
/**
* we need to check if the current url contains a sub url 'listchildren' and
* assign a cookie accordingly so the default selected tab is defined on initail
*/
redrawTabs: function() {
if(window.location.href.match(/listchildren/)){
this.rewriteHashlinks();
this.tabs({ selected: 1 });
}else{
this._super();
}
}
});
/**
* Class: #Form_SearchForm

View File

@ -1,4 +1,4 @@
<div class="cms-content center ss-tabset $BaseCSSClasses" data-layout-type="border">
<div id="pages-controller-cms-content" class="cms-content center ss-tabset $BaseCSSClasses" data-layout-type="border">
<div class="cms-content-header north">
<div>