[TASK] Move "Save and close" to the last position in scheduler 72/46772/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 19 Feb 2016 11:07:59 +0000 (12:07 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 19 Feb 2016 12:08:41 +0000 (13:08 +0100)
The "Save and close" link in the split button for scheduler tasks
is moved to the last position to ensure a more consistent UI.

The "Save and close" is at the last position when editing pages,
content elements etc.

Change-Id: I649dd2941a64ea11183eb5e8711b490933481c35
Resolves: #73561
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/46772
Reviewed-by: Gianluigi Martino <gmartino27@gmail.com>
Tested-by: Gianluigi Martino <gmartino27@gmail.com>
Reviewed-by: Ralf Merz <info@merzilla.de>
Reviewed-by: Richard Haeser <richardhaeser@gmail.com>
Tested-by: Richard Haeser <richardhaeser@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 278fd2b..42f2bc6 100644 (file)
@@ -1556,13 +1556,6 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL))
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:save'));
             $saveButtonDropdown->addItem($saveButton);
-            $saveAndCloseButton = $buttonBar->makeInputButton()
-                ->setName('CMD')
-                ->setValue('saveclose')
-                ->setForm('tx_scheduler_form')
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save-close', Icon::SIZE_SMALL))
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose'));
-            $saveButtonDropdown->addItem($saveAndCloseButton);
             $saveAndNewButton = $buttonBar->makeInputButton()
                 ->setName('CMD')
                 ->setValue('savenew')
@@ -1570,6 +1563,13 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save-new', Icon::SIZE_SMALL))
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndCreateNewDoc'));
             $saveButtonDropdown->addItem($saveAndNewButton);
+            $saveAndCloseButton = $buttonBar->makeInputButton()
+                ->setName('CMD')
+                ->setValue('saveclose')
+                ->setForm('tx_scheduler_form')
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save-close', Icon::SIZE_SMALL))
+                ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose'));
+            $saveButtonDropdown->addItem($saveAndCloseButton);
             $buttonBar->addButton($saveButtonDropdown, ButtonBar::BUTTON_POSITION_LEFT, 3);
         }
         // Edit