mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 01:29:54 -06:00
fix: update cookie handling in tab management
- Removed unused cookie helper functions from MainContentTabbed.php to streamline the code. - Updated the tab management logic to ensure cookies are cleared when no cookie exists, aligning with the behavior of the initab function. - Corrected the filename reference in MainContent.php from 'MainContentNotab.php' to 'MainContentNoTab.php' for consistency.
This commit is contained in:
@@ -101,28 +101,12 @@ function refresh(top) {
|
||||
}
|
||||
}
|
||||
|
||||
function initab(page) {
|
||||
function initab(page) { // @todo remove in the future
|
||||
$.removeCookie('one');
|
||||
$.removeCookie('tab');
|
||||
if (page != null) location.replace(page);
|
||||
}
|
||||
|
||||
function settab(tab) {
|
||||
<?switch ($myPage['name']):?>
|
||||
<?case'Main':?>
|
||||
$.cookie('tab',tab);
|
||||
<?if (_var($var,'fsState')=='Started'):?>
|
||||
$.cookie('one','tab1');
|
||||
<?endif;?>
|
||||
<?break;?>
|
||||
<?case'Cache':case'Data':case'Device':case'Flash':case'Parity':?>
|
||||
$.cookie('one',tab);
|
||||
<?break;?>
|
||||
<?default:?>
|
||||
$.cookie('one',tab);
|
||||
<?endswitch;?>
|
||||
}
|
||||
|
||||
function done(key) {
|
||||
var url = location.pathname.split('/');
|
||||
var path = '/'+url[1];
|
||||
|
||||
Reference in New Issue
Block a user