mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
7900da4d9d
commit
653625914d
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user