[TASK] Move "Save and close" to the last position in scheduler 75/46775/2
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:09:04 +0000 (13:09 +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/46775
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 5c9285d..8000d4e 100644 (file)
@@ -1607,13 +1607,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')
@@ -1621,6 +1614,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