Bug #23109 » 15014.diff
typo3/js/workspacemenu.js (working copy) | ||
---|---|---|
* switches the workspace, reloads the module menu, and the content frame
|
||
*/
|
||
switchWorkspace: function(event) {
|
||
var workspaceId = Event.element(event).identify().substring(3);
|
||
var clickedElement = Event.element(event);
|
||
var workspaceId = clickedElement.identify().substring(3);
|
||
|
||
var switchRequest = new Ajax.Request('ajax.php', {
|
||
parameters: 'ajaxID=WorkspaceMenu::setWorkspace&workspaceId=' + workspaceId,
|
||
onSuccess: function(transport, response) {
|
||
TYPO3.configuration.inWorkspace = response.setWorkspaceId === 0 ? 0 : 1;
|
||
TYPO3.configuration.inWorkspace = (response.setWorkspaceId === 0 ? 0 : 1);
|
||
|
||
// first remove all checks, then set the check in front of the selected workspace
|
||
var stateActiveClass = 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-checked';
|
||
... | ... | |
$$('#workspace-selector-menu li.selected')[0].removeClassName('selected');
|
||
|
||
// add "selected" class and checkmark
|
||
Event.element(event).previous().removeClassName(stateInactiveClass).addClassName(stateActiveClass);
|
||
Event.element(event).up().addClassName('selected');
|
||
clickedElement.previous().removeClassName(stateInactiveClass).addClassName(stateActiveClass);
|
||
clickedElement.up().addClassName('selected');
|
||
|
||
// when in web module reload, otherwise send the user to the web module
|
||
if (currentModuleLoaded.startsWith('web_')) {
|