[CLEANUP] Removed unused JavaScript snippets
authorTolleiv Nietsch <info@tolleiv.de>
Sun, 22 Jan 2012 17:51:24 +0000 (18:51 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Fri, 27 Jan 2012 21:24:17 +0000 (22:24 +0100)
Some parts of our JavaScript are unused. Let's do some house-
keeping and remove parts which aren't needed.

Releases: 4.7

Change-Id: Id88d02748037d794aab519e7856dc4d77d05012f
Reviewed-on: http://review.typo3.org/8643
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/workspaces/Resources/Public/JavaScript/helpers.js
typo3/sysext/workspaces/Resources/Public/JavaScript/workspacegrid.js [deleted file]
typo3/sysext/workspaces/Resources/Public/JavaScript/workspacemenu.js

index 872c720..e161db7 100644 (file)
@@ -77,16 +77,6 @@ TYPO3.Workspaces.Helpers = {
                });
        },
 
-       getPropertyOfElementsArray: function(elements, property) {
-               var result = [];
-
-               Ext.each(elements, function(element) {
-                       result.push(element[property]);
-               });
-
-               return result;
-       },
-
        getElementsArrayOfSelection: function(selection) {
                var elements = [];
 
diff --git a/typo3/sysext/workspaces/Resources/Public/JavaScript/workspacegrid.js b/typo3/sysext/workspaces/Resources/Public/JavaScript/workspacegrid.js
deleted file mode 100644 (file)
index 71da999..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010 Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-Ext.ns('TYPO3');
-
-TYPO3.workspaceGrid = Ext.extend(Ext.grid.GridPanel, {
-
-               // component build
-       initComponent: function() {
-               this.bodyCfg = {}
-               Ext.apply(this, {
-                       border : true,
-                       store : TYPO3.Workspaces.MainStore,
-                       colModel : new Ext.grid.ColumnModel({
-                               columns: [
-                                       TYPO3.Workspaces.SelectionModel,
-                                       TYPO3.Workspaces.RowExpander,
-                                       {id: 'uid', dataIndex : 'uid', width: 20, sortable: true, header : 'WS-Id', hidden: true, filterable : true },
-                                       {id: 't3ver_oid', dataIndex : 't3ver_oid', width: 20, sortable: true, header : 'Live-Id', hidden: true, filterable : true },
-                                       {id: 'workspace_Title', dataIndex : 'workspace_Title', width: 120, sortable: true, header : 'Workspace', hidden: true, filter : {type : 'string'}},
-                                       TYPO3.Workspaces.Configuration.WsPath,
-                                       TYPO3.Workspaces.Configuration.LivePath,
-                                       TYPO3.Workspaces.Configuration.WsTitleWithIcon,
-                                       TYPO3.Workspaces.Configuration.SwapButton,
-                                       TYPO3.Workspaces.Configuration.TitleWithIcon,
-                                       TYPO3.Workspaces.Configuration.ChangeDate,
-                                       TYPO3.Workspaces.Configuration.ChangeState,
-                                       TYPO3.Workspaces.Configuration.Stage,
-                                       TYPO3.Workspaces.Configuration.RowButtons
-                               ],
-                               listeners: {
-                                       columnmoved: function(colModel) {
-                                               TYPO3.Workspaces.Actions.updateColModel(colModel);
-                                       },
-                                       hiddenchange: function(colModel) {
-                                               TYPO3.Workspaces.Actions.updateColModel(colModel);
-                                       }
-                               }
-                       }),
-                       sm: TYPO3.Workspaces.SelectionModel,
-                       loadMask : true,
-                       height: 630,
-                       stripeRows: true,
-                               // below the grid we need 40px space for the legend
-                       heightOffset: 40,
-                       plugins : [
-                               TYPO3.Workspaces.RowExpander
-                               ,TYPO3.Workspaces.Configuration.GridFilters
-                               ,new Ext.ux.plugins.FitToParent()],
-                       view : new Ext.grid.GroupingView({
-                               forceFit: true,
-                               groupTextTpl : '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
-                       }),
-                       bbar : [
-                               {
-                                       xtype: 'label'
-                                       ,html: 'Records to display'
-                               },
-                               TYPO3.Workspaces.Toolbar.selectPagerSizePerPage,
-                               TYPO3.Workspaces.Toolbar.Pager
-                       ],
-                       tbar : TYPO3.Workspaces.Toolbar.FullTopToolbar
-               });
-               TYPO3.workspaceGrid.superclass.initComponent.apply(this, arguments);
-
-                       // apply the addListener patch for 'message:tagging'
-               this.addListener = this.on;
-
-       }
-});
-Ext.reg('workspaceGrid', TYPO3.workspaceGrid);
index 5408cd4..0546276 100644 (file)
@@ -86,26 +86,6 @@ var WorkspaceMenu = Class.create({
        },
 
        /**
-        * toggles the workspace frontend preview
-        */
-       toggleFrontendPreview: function(event) {
-               var clickedElement = Event.element(event);
-               var toggle = TYPO3.Ajax.ExtDirect.ToolbarMenu.toggleWorkspacePreviewMode({}, function(response) {
-                       var stateActiveClass = 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-checked';
-                       var stateInactiveClass = 't3-icon t3-icon-empty t3-icon-empty-empty t3-icon-empty';
-                       if (response.newWorkspacePreviewState === '1') {
-                               TYPO3.configuration.workspaceFrontendPreviewEnabled = 1;
-                               clickedElement.previous().removeClassName(stateInactiveClass).addClassName(stateActiveClass);
-                       } else {
-                               TYPO3.configuration.workspaceFrontendPreviewEnabled = 0;
-                               clickedElement.previous().removeClassName(stateActiveClass).addClassName(stateInactiveClass);
-                       }
-                       top.TYPO3.ModuleMenu.App.reloadFrames();
-               });
-               this.toggleMenu(event);
-       },
-
-       /**
         * redirects the user to the workspace module
         */
        goToWorkspaceModule: function(event) {
@@ -188,5 +168,4 @@ var WorkspaceMenu = Class.create({
 
 });
 
-var TYPO3BackendWorkspaceMenu = new WorkspaceMenu();
-//TYPO3BackendWorkspaceMenu.initialize();
\ No newline at end of file
+var TYPO3BackendWorkspaceMenu = new WorkspaceMenu();
\ No newline at end of file