diff --git a/typo3/sysext/workspaces/Resources/Public/JavaScript/Backend.js b/typo3/sysext/workspaces/Resources/Public/JavaScript/Backend.js index 5ed8c2bc1cb72bb537952dddbb9eee8c52523e8c..3420b96b5613bbe3e3db534a8dbf8051b6f99e8f 100644 --- a/typo3/sysext/workspaces/Resources/Public/JavaScript/Backend.js +++ b/typo3/sysext/workspaces/Resources/Public/JavaScript/Backend.js @@ -22,9 +22,10 @@ define([ 'TYPO3/CMS/Backend/Severity', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Wizard', + 'TYPO3/CMS/Backend/Storage/Persistent', 'nprogress', 'TYPO3/CMS/Backend/jquery.clearable' -], function($, Workspaces, Tooltip, Severity, Modal, Wizard, NProgress) { +], function($, Workspaces, Tooltip, Severity, Modal, Wizard, Persistent, NProgress) { 'use strict'; var Backend = { @@ -46,7 +47,6 @@ define([ pagination: '#workspace-pagination' }, settings: { - depth: TYPO3.settings.Workspaces.depth, dir: 'ASC', id: TYPO3.settings.Workspaces.id, language: TYPO3.settings.Workspaces.language, @@ -72,8 +72,8 @@ define([ Backend.getElements(); Backend.registerEvents(); - if (TYPO3.settings.Workspaces.depth > 0) { - Backend.elements.$depthSelector.val(TYPO3.settings.Workspaces.depth); + if (Persistent.get('Workspaces.Module.depth') > 0) { + Backend.elements.$depthSelector.val(Persistent.get('Workspaces.Module.depth')); } Backend.loadWorkspaceComponents(); @@ -211,8 +211,7 @@ define([ // Listen for depth changes Backend.elements.$depthSelector.on('change', function(e) { var $me = $(this); - Backend.settings.depth = $me.val(); - + Persistent.set('Workspaces.Module.depth', $me.val()); Backend.getWorkspaceInfos(); });