[TASK] EM: Move Upload button to top button menu
authorFelix Kopp <felix-source@phorax.com>
Sun, 12 Feb 2012 11:38:05 +0000 (12:38 +0100)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 13 Feb 2012 22:30:32 +0000 (23:30 +0100)
Moves the button Upload Extension directly to
the top main button menu.

Change-Id: I1905d8fa9a31a5cfd3b538e3f60f7c8507833bd8
Fixes: #33868
Releases: 4.7
Reviewed-on: http://review.typo3.org/8989
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Stefan Galinski
Tested-by: Stefan Galinski
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/em/classes/index.php
typo3/sysext/em/res/js/em_repositorylist.js
typo3/templates/em_index.html

index 7f4029f..8b0fe0a 100644 (file)
@@ -582,18 +582,22 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
         * @return      array   all available buttons as an assoc. array
         */
        public function getButtons() {
+               $uploadButton = '<a href="#" onclick="TYPO3.EM.Tools.uploadExtension(); return false;" title="' . $GLOBALS['LANG']->getLL('upload_ext_directly') . '">' .
+                               t3lib_iconWorks::getSpriteIcon('actions-edit-upload') . '</a>';
 
                $buttons = array(
                        'csh' => '',
                        'back' => '',
-                       'shortcut' => ''
+                       'shortcut' => '',
+                       'upload' => $uploadButton
                );
 
-               // Shortcut
+                       // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('CMD', 'function', $this->MCONF['name']);
                }
-               // Back
+
+                       // Back
                if (($this->CMD['showExt'] && (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone'))) || ($this->CMD['importExt'] || $this->CMD['uploadExt'] && (!$this->CMD['standAlone'])) || $this->CMD['importExtInfo']) {
                        $buttons['back'] = '<a href="' . t3lib_div::linkThisScript(array(
                                'CMD' => ''
index 450396b..0f7fb32 100644 (file)
@@ -263,17 +263,6 @@ TYPO3.EM.RepositoryList = Ext.extend(Ext.grid.GridPanel, {
                                        scope: this,
                                        hidden: true
                                },
-                               '-',
-                               {
-                                       iconCls: 't3-icon t3-icon-actions t3-icon-actions-edit t3-icon-edit-upload',
-                                       tooltip: TYPO3.l10n.localize('upload_ext_directly'),
-                                       ref: '../uploadButton',
-                                       handler: function() {
-                                               TYPO3.EM.Tools.uploadExtension();
-                                       },
-                                       scope: this
-                               },
-                               '-',
                                '->',
                                {
                                        xtype: 'tbtext',
index 8719fa2..fdcd18a 100644 (file)
@@ -27,7 +27,7 @@
 <!-- ###BUTTON_GROUP_WRAP### -->
 
 <!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP1### -->###BACK###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUP1### -->###BACK######UPLOAD###<!-- ###BUTTON_GROUP1### -->
 <!-- ###BUTTON_GROUPS_LEFT### -->
 
 <!-- ###BUTTON_GROUPS_RIGHT### -->