Correction of path to workspaces.js (minor bug, but prevented workspace selector...
[Packages/TYPO3.CMS.git] / typo3 / classes / class.workspaceselector.php
index dc7d855..f9521cd 100644 (file)
@@ -137,7 +137,7 @@ class WorkspaceSelector implements backend_toolbarItem {
                $this->changeWorkspace();
 
                $options             = array();
-               $workspaceSelector   = '';
+               $workspaceSelector   = '<span class="toolbar-item">';
                $availableWorkspaces = $this->getAvailableWorkspaces();
 
                        // build selector box options
@@ -176,7 +176,7 @@ class WorkspaceSelector implements backend_toolbarItem {
                                                'align="top"'
                                        ).'</a>';
 
-               return $workspaceSelector;
+               return $workspaceSelector.'</span>';
        }
 
        /**
@@ -184,7 +184,16 @@ class WorkspaceSelector implements backend_toolbarItem {
         *
         */
        private function addJavascriptToBackend() {
-               $this->backendReference->addJavascriptFile('typo3/js/workspaces.js');
+               $this->backendReference->addJavascriptFile('js/workspaces.js');
+       }
+
+       /**
+        * returns additional attributes for the list item in the toolbar
+        *
+        * @return      string          list item HTML attibutes
+        */
+       public function getAdditionalAttributes() {
+               return ' id="workspace-selector"';
        }
 }