From d916be7f6994d2c6100c8f51d747b94febdde2b3 Mon Sep 17 00:00:00 2001 From: Andreas Fernandez <a.fernandez@scripting-base.de> Date: Mon, 23 Feb 2015 14:15:43 +0100 Subject: [PATCH] [TASK] Streamline Scheduler Streamline the layout of the scheduler. Resolves: #65233 Releases: master Change-Id: I2f91f187e21359d2228e81efb198b9bf9134d400 Reviewed-on: http://review.typo3.org/37110 Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Scheduler/FieldProvider.php | 8 +- .../ValidatorTaskAdditionalFieldProvider.php | 18 +- ...StatusUpdateTaskNotificationEmailField.php | 2 +- .../Classes/Task/BulkUpdateFieldProvider.php | 4 +- .../Controller/SchedulerModuleController.php | 302 +++++++++++------- .../SleepTaskAdditionalFieldProvider.php | 2 +- .../TestTaskAdditionalFieldProvider.php | 2 +- ...rbageCollectionAdditionalFieldProvider.php | 2 +- ...orageExtractionAdditionalFieldProvider.php | 4 +- ...StorageIndexingAdditionalFieldProvider.php | 2 +- ...rbageCollectionAdditionalFieldProvider.php | 2 +- ...rbageCollectionAdditionalFieldProvider.php | 6 +- .../ViewHelpers/ModuleLinkViewHelper.php | 30 +- .../ViewHelpers/SpriteIconViewHelper.php | 34 -- .../DevelopersGuide/CreatingTasks/Index.rst | 2 +- .../Resources/Private/Language/locallang.xlf | 12 +- .../Resources/Private/Styles/styles.less | 46 --- .../Backend/SchedulerModule/InfoScreen.html | 11 +- .../Backend/SchedulerModule/ListTasks.html | 29 +- .../Resources/Public/Images/Icons/RunTask.png | Bin 703 -> 0 bytes .../Public/Images/status_disabled.png | Bin 223 -> 0 bytes .../Public/Images/status_failure.png | Bin 354 -> 0 bytes .../Resources/Public/Images/status_late.png | Bin 368 -> 0 bytes .../Public/Images/status_running.png | Bin 377 -> 0 bytes .../Public/Images/status_scheduled.png | Bin 225 -> 0 bytes .../Resources/Public/Images/stop.png | Bin 647 -> 0 bytes .../Resources/Public/JavaScript/Scheduler.js | 48 +-- .../Resources/Public/Styles/styles.css | 34 -- .../Styles/TYPO3/_element_message.less | 5 + .../Resources/Public/Css/visual/t3skin.css | 3 + 30 files changed, 231 insertions(+), 377 deletions(-) delete mode 100644 typo3/sysext/scheduler/Classes/ViewHelpers/SpriteIconViewHelper.php delete mode 100644 typo3/sysext/scheduler/Resources/Private/Styles/styles.less delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/Icons/RunTask.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/status_disabled.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/status_failure.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/status_late.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/status_running.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/status_scheduled.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Images/stop.png delete mode 100644 typo3/sysext/scheduler/Resources/Public/Styles/styles.css diff --git a/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php b/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php index f6a2586d0d17..c61876e71fe5 100644 --- a/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php +++ b/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php @@ -282,7 +282,7 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter */ protected function renderSelectField($name, array $options, $selectedOptionValue) { $html = array( - '<select name="tx_scheduler[task_extbase][' . htmlspecialchars($name) . ']">' + '<select class="form-control" name="tx_scheduler[task_extbase][' . htmlspecialchars($name) . ']">' ); foreach ($options as $optionValue => $optionLabel) { $selected = $optionValue === $selectedOptionValue ? ' selected="selected"' : ''; @@ -305,11 +305,11 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter $fieldName = 'tx_scheduler[task_extbase][arguments][' . htmlspecialchars($name) . ']'; if ($type === 'boolean') { // checkbox field for boolean values. - $html = '<input type="hidden" name="' . $fieldName . '" value="0" />'; - $html .= '<input type="checkbox" name="' . $fieldName . '" value="1" ' . ((bool)$currentValue ? ' checked="checked"' : '') . '/>'; + $html = '<input type="hidden" name="' . $fieldName . '" value="0">'; + $html .= '<div class="checkbox"><label><input type="checkbox" name="' . $fieldName . '" value="1" ' . ((bool)$currentValue ? ' checked="checked"' : '') . '></label></div>'; } else { // regular string, also the default field type - $html = '<input type="text" name="' . $fieldName . '" value="' . htmlspecialchars($currentValue) . '" /> '; + $html = '<input class="form-control" type="text" name="' . $fieldName . '" value="' . htmlspecialchars($currentValue) . '"> '; } return $html; } diff --git a/typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php b/typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php index 09f2e8d1a534..fcc2151f2c75 100644 --- a/typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php +++ b/typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php @@ -96,7 +96,7 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt } } $fieldId = 'task_page'; - $fieldCode = '<input type="text" name="tx_scheduler[linkvalidator][page]" id="' . $fieldId . '" value="' . htmlspecialchars($taskInfo['page']) . '"/>'; + $fieldCode = '<input type="text" class="form-control" name="tx_scheduler[linkvalidator][page]" id="' . $fieldId . '" value="' . htmlspecialchars($taskInfo['page']) . '">'; $lang = $this->getLanguageService(); $label = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.page'); $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label); @@ -114,7 +114,7 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt '4' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_4'), '999' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi') ); - $fieldCode = '<select name="tx_scheduler[linkvalidator][depth]" id="' . $fieldId . '">'; + $fieldCode = '<select class="form-control" name="tx_scheduler[linkvalidator][depth]" id="' . $fieldId . '">'; foreach ($fieldValueArray as $depth => $label) { $fieldCode .= "\t" . '<option value="' . htmlspecialchars($depth) . '"' . (($depth == $taskInfo['depth']) ? ' selected="selected"' : '') . @@ -128,7 +128,7 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt 'label' => $label ); $fieldId = 'task_configuration'; - $fieldCode = '<textarea name="tx_scheduler[linkvalidator][configuration]" id="' . $fieldId . '" >' . + $fieldCode = '<textarea class="form-control" name="tx_scheduler[linkvalidator][configuration]" id="' . $fieldId . '" >' . htmlspecialchars($taskInfo['configuration']) . '</textarea>'; $label = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.conf'); $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label); @@ -137,8 +137,8 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt 'label' => $label ); $fieldId = 'task_email'; - $fieldCode = '<input type="text" name="tx_scheduler[linkvalidator][email]" id="' . $fieldId . '" value="' . - htmlspecialchars($taskInfo['email']) . '" />'; + $fieldCode = '<input type="text" class="form-control" name="tx_scheduler[linkvalidator][email]" id="' . $fieldId . '" value="' . + htmlspecialchars($taskInfo['email']) . '">'; $label = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.email'); $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label); $additionalFields[$fieldId] = array( @@ -146,8 +146,8 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt 'label' => $label ); $fieldId = 'task_emailOnBrokenLinkOnly'; - $fieldCode = '<input type="checkbox" name="tx_scheduler[linkvalidator][emailOnBrokenLinkOnly]" id="' . $fieldId . '" ' . - (htmlspecialchars($taskInfo['emailOnBrokenLinkOnly']) ? 'checked="checked"' : '') . ' />'; + $fieldCode = '<div class="checkbox"><label><input type="checkbox" name="tx_scheduler[linkvalidator][emailOnBrokenLinkOnly]" id="' . $fieldId . '" ' . + (htmlspecialchars($taskInfo['emailOnBrokenLinkOnly']) ? 'checked="checked"' : '') . '></label></div>'; $label = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.emailOnBrokenLinkOnly'); $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label); $additionalFields[$fieldId] = array( @@ -155,8 +155,8 @@ class ValidatorTaskAdditionalFieldProvider implements AdditionalFieldProviderInt 'label' => $label ); $fieldId = 'task_emailTemplateFile'; - $fieldCode = '<input type="text" name="tx_scheduler[linkvalidator][emailTemplateFile]" id="' . $fieldId . - '" value="' . htmlspecialchars($taskInfo['emailTemplateFile']) . '" />'; + $fieldCode = '<input class="form-control" type="text" name="tx_scheduler[linkvalidator][emailTemplateFile]" id="' . $fieldId . + '" value="' . htmlspecialchars($taskInfo['emailTemplateFile']) . '">'; $label = $lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.emailTemplateFile'); $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label); $additionalFields[$fieldId] = array( diff --git a/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTaskNotificationEmailField.php b/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTaskNotificationEmailField.php index 797afd88b8bc..1367a29cf8e8 100644 --- a/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTaskNotificationEmailField.php +++ b/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTaskNotificationEmailField.php @@ -52,7 +52,7 @@ class SystemStatusUpdateTaskNotificationEmailField implements \TYPO3\CMS\Schedul // build html for additional email field $fieldName = $this->getFullFieldName('notificationEmail'); $fieldId = 'task_' . $fieldName; - $fieldHtml = '<textarea ' . 'rows="5" cols="50" name="tx_scheduler[' . $fieldName . ']" ' . 'id="' . $fieldId . '" ' . '>' . htmlspecialchars($taskInfo[$fieldName]) . '</textarea>'; + $fieldHtml = '<textarea class="form-control" ' . 'rows="5" cols="50" name="tx_scheduler[' . $fieldName . ']" ' . 'id="' . $fieldId . '" ' . '>' . htmlspecialchars($taskInfo[$fieldName]) . '</textarea>'; $additionalFields = array(); $additionalFields[$fieldId] = array( diff --git a/typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateFieldProvider.php b/typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateFieldProvider.php index 7b87adbda840..38579fd5ce80 100644 --- a/typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateFieldProvider.php +++ b/typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateFieldProvider.php @@ -63,7 +63,7 @@ class BulkUpdateFieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldPro $fieldId = 'task_saltedpasswordsBulkUpdateCanDeactivateSelf'; $fieldValue = 'IsChecked'; $fieldChecked = (bool)$taskInfo['scheduler_saltedpasswordsBulkUpdateCanDeactivateSelf']; - $fieldHtml = '<input type="checkbox"' . ' name="' . $fieldName . '"' . ' id="' . $fieldId . '"' . ' value="' . $fieldValue . '"' . ($fieldChecked ? ' checked="checked"' : '') . ' />'; + $fieldHtml = '<div class="checkbox"><label><input type="checkbox"' . ' name="' . $fieldName . '"' . ' id="' . $fieldId . '"' . ' value="' . $fieldValue . '"' . ($fieldChecked ? ' checked="checked"' : '') . '></label></div>'; $additionalFields[$fieldId] = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:saltedpasswords/locallang.xlf:ext.saltedpasswords.tasks.bulkupdate.label.canDeactivateSelf', @@ -74,7 +74,7 @@ class BulkUpdateFieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldPro $fieldName = 'tx_scheduler[scheduler_saltedpasswordsBulkUpdateNumberOfRecords]'; $fieldId = 'task_saltedpasswordsBulkUpdateNumberOfRecords'; $fieldValue = (int)$taskInfo['scheduler_saltedpasswordsBulkUpdateNumberOfRecords']; - $fieldHtml = '<input type="text" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '" />'; + $fieldHtml = '<input type="text" class="form-control" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '">'; $additionalFields[$fieldId] = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:saltedpasswords/locallang.xlf:ext.saltedpasswords.tasks.bulkupdate.label.numberOfRecords', diff --git a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php index 7d8744d66879..fd17136aad16 100644 --- a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php +++ b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php @@ -126,7 +126,6 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas $this->doc->bodyTagAdditions = 'class="tx_scheduler_mod1"'; $this->pageRenderer = $this->doc->getPageRenderer(); - $this->pageRenderer->addCssFile(ExtensionManagementUtility::extRelPath('scheduler') . 'Resources/Public/Styles/styles.css'); // Create scheduler instance $this->scheduler = GeneralUtility::makeInstance(\TYPO3\CMS\Scheduler\Scheduler::class); @@ -159,7 +158,6 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas if ($this->getBackendUser()->isAdmin()) { // Set the form $this->doc->form = '<form name="tx_scheduler_form" id="tx_scheduler_form" method="post" action="">'; - $this->pageRenderer->addInlineSetting('scheduler', 'runningIcon', ExtensionManagementUtility::extRelPath('scheduler') . 'Resources/Public/Images/status_running.png'); // Prepare main content $this->content = $this->doc->header($this->getLanguageService()->getLL('function.' . $this->MOD_SETTINGS['function'])); @@ -335,7 +333,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas // Check if a new uid was indeed generated (i.e. a new record was created) // (counting TCEmain errors doesn't work as some failures don't report errors) $numberOfNewIDs = count($tcemain->substNEWwithIDs); - if ($numberOfNewIDs == 1) { + if ($numberOfNewIDs === 1) { $message = $this->getLanguageService()->getLL('msg.userCreated'); $severity = FlashMessage::OK; } else { @@ -661,11 +659,14 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas // Disable checkbox $label = '<label for="task_disable">' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:disable') . '</label>'; - $table[] = '<div id="task_disable_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_disable', $label) . - '<input type="hidden" name="tx_scheduler[disable]" value="0" /> - <input class="checkbox" type="checkbox" name="tx_scheduler[disable]" value="1" id="task_disable" ' . ($taskInfo['disable'] == 1 ? ' checked="checked"' : '') . ' /> - </div>'; + $table[] = + '<div class="form-section" id="task_disable_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_disable', $label) + . '<div class="form-control-wrap">' + . '<input type="hidden" name="tx_scheduler[disable]" value="0">' + . '<input class="checkbox" type="checkbox" name="tx_scheduler[disable]" value="1" id="task_disable" ' . ($taskInfo['disable'] ? ' checked="checked"' : '') . '>' + . '</div>' + . '</div></div>'; // Task class selector $label = '<label for="task_class">' . $this->getLanguageService()->getLL('label.class') . '</label>'; @@ -673,7 +674,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas // On editing, don't allow changing of the task class, unless it was not valid if ($this->submittedData['uid'] > 0 && !empty($taskInfo['class'])) { $cell = '<div>' . $registeredClasses[$taskInfo['class']]['title'] . ' (' . $registeredClasses[$taskInfo['class']]['extension'] . ')</div>'; - $cell .= '<input type="hidden" name="tx_scheduler[class]" id="task_class" value="' . htmlspecialchars($taskInfo['class']) . '" />'; + $cell .= '<input type="hidden" name="tx_scheduler[class]" id="task_class" value="' . htmlspecialchars($taskInfo['class']) . '">'; } else { $cell = '<select name="tx_scheduler[class]" id="task_class" class="form-control">'; // Group registered classes by classname @@ -693,20 +694,26 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } $cell .= '</select>'; } - $table[] = '<div id="task_class_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_class', $label) . - $cell . - '</div>'; + $table[] = + '<div class="form-section" id="task_class_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_class', $label) + . '<div class="form-control-wrap">' + . $cell + . '</div>' + . '</div></div>'; // Task type selector $label = '<label for="task_type">' . $this->getLanguageService()->getLL('label.type') . '</label>'; - $table[] = '<div id="task_type_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_type', $label) . - '<select name="tx_scheduler[type]" id="task_type" class="form-control"> - <option value="1" ' . ($taskInfo['type'] == 1 ? ' selected="selected"' : '') . '>' . $this->getLanguageService()->getLL('label.type.single') . '</option> - <option value="2" ' . ($taskInfo['type'] == 2 ? ' selected="selected"' : '') . '>' . $this->getLanguageService()->getLL('label.type.recurring') . '</option> - </select> - </div>'; + $table[] = + '<div class="form-section" id="task_type_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_type', $label) + . '<div class="form-control-wrap">' + . '<select name="tx_scheduler[type]" id="task_type" class="form-control">' + . '<option value="1" ' . ((int)$taskInfo['type'] === 1 ? ' selected="selected"' : '') . '>' . $this->getLanguageService()->getLL('label.type.single') . '</option>' + . '<option value="2" ' . ((int)$taskInfo['type'] === 2 ? ' selected="selected"' : '') . '>' . $this->getLanguageService()->getLL('label.type.recurring') . '</option>' + . '</select>' + . '</div>' + . '</div></div>'; // Task group selector $label = '<label for="task_group">' . $this->getLanguageService()->getLL('label.group') . '</label>'; @@ -722,61 +729,76 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } $cell .= '</select>'; - $table[] = '<div id="task_group_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_group', $label) . - $cell . - '</div>'; + $table[] = + '<div class="form-section" id="task_group_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_group', $label) + . '<div class="form-control-wrap">' + . $cell + . '</div>' + . '</div></div>'; $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? '%H:%M %m-%d-%Y' : '%H:%M %d-%m-%Y'; $label = '<label for="tceforms-datetimefield-task_start">' . BackendUtility::wrapInHelp($this->cshKey, 'task_start', $this->getLanguageService()->getLL('label.start')) . '</label>'; $value = ($taskInfo['start'] > 0 ? strftime($dateFormat, $taskInfo['start']) : ''); - $table[] = '<div class="form-group">' . - $label . - '<div class="input-group" id="tceforms-datetimefield-task_start_row-wrapper">' . - '<input name="tx_scheduler[start]_hr" value="' . $value . '" class="form-control t3js-datetimepicker t3js-clearable" data-date-type="datetime" data-date-offset="0" type="text" ' . - 'id="tceforms-datetimefield-task_start_row">' . - '<input name="tx_scheduler[start]" value="' . $taskInfo['start'] . '" type="hidden">' . - '<span class="input-group-btn"><label class="btn btn-default" for="tceforms-datetimefield-task_start_row"><span class="fa fa-calendar"></span></label></span>' . - '</div>' . - '</div>'; - + $table[] = + '<div class="form-section"><div class="row"><div class="form-group col-sm-6">' + . $label + . '<div class="form-control-wrap">' + . '<div class="input-group" id="tceforms-datetimefield-task_start_row-wrapper">' + . '<input name="tx_scheduler[start]_hr" value="' . $value . '" class="form-control t3js-datetimepicker t3js-clearable" data-date-type="datetime" data-date-offset="0" type="text" id="tceforms-datetimefield-task_start_row">' + . '<input name="tx_scheduler[start]" value="' . $taskInfo['start'] . '" type="hidden">' + . '<span class="input-group-btn"><label class="btn btn-default" for="tceforms-datetimefield-task_start_row"><span class="fa fa-calendar"></span></label></span>' + . '</div>' + . '</div>' + . '</div>'; // End date/time field // NOTE: datetime fields need a special id naming scheme $value = ($taskInfo['end'] > 0 ? strftime($dateFormat, $taskInfo['end']) : ''); $label = '<label for="tceforms-datetimefield-task_end">' . $this->getLanguageService()->getLL('label.end') . '</label>'; - $table[] = '<div class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_end', $label) . - '<div class="input-group" id="tceforms-datetimefield-task_end_row-wrapper">' . - '<input name="tx_scheduler[end]_hr" value="' . $value . '" class="form-control t3js-datetimepicker t3js-clearable" data-date-type="datetime" data-date-offset="0" type="text" ' . - 'id="tceforms-datetimefield-task_end_row">' . - '<input name="tx_scheduler[end]" value="' . $taskInfo['end'] . '" type="hidden">' . - '<span class="input-group-btn"><label class="btn btn-default" for="tceforms-datetimefield-task_end_row"><span class="fa fa-calendar"></span></label></span>' . - '</div>' . - '</div>'; + $table[] = + '<div class="form-group col-sm-6">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_end', $label) + . '<div class="form-control-wrap">' + . '<div class="input-group" id="tceforms-datetimefield-task_end_row-wrapper">' + . '<input name="tx_scheduler[end]_hr" value="' . $value . '" class="form-control t3js-datetimepicker t3js-clearable" data-date-type="datetime" data-date-offset="0" type="text" id="tceforms-datetimefield-task_end_row">' + . '<input name="tx_scheduler[end]" value="' . $taskInfo['end'] . '" type="hidden">' + . '<span class="input-group-btn"><label class="btn btn-default" for="tceforms-datetimefield-task_end_row"><span class="fa fa-calendar"></span></label></span>' + . '</div>' + . '</div>' + . '</div></div></div>'; // Frequency input field $label = '<label for="task_frequency">' . $this->getLanguageService()->getLL('label.frequency.long') . '</label>'; - $table[] = '<div id="task_frequency_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_frequency', $label) . - '<input type="text" name="tx_scheduler[frequency]" class="form-control" id="task_frequency" value="' . htmlspecialchars($taskInfo['frequency']) . '" /> - </div>'; + $table[] = + '<div class="form-section" id="task_frequency_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_frequency', $label) + . '<div class="form-control-wrap">' + . '<input type="text" name="tx_scheduler[frequency]" class="form-control" id="task_frequency" value="' . htmlspecialchars($taskInfo['frequency']) . '">' + . '</div>' + . '</div></div>'; // Multiple execution selector $label = '<label for="task_multiple">' . $this->getLanguageService()->getLL('label.parallel.long') . '</label>'; - $table[] = '<div id="task_multiple_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_multiple', $label) . - '<input type="hidden" name="tx_scheduler[multiple]" value="0" /> - <input class="checkbox" type="checkbox" name="tx_scheduler[multiple]" value="1" id="task_multiple" ' . ($taskInfo['multiple'] == 1 ? 'checked="checked"' : '') . ' /> - </div>'; + $table[] = + '<div class="form-section" id="task_multiple_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_multiple', $label) + . '<div class="form-control-wrap">' + . '<input type="hidden" name="tx_scheduler[multiple]" value="0">' + . '<input class="checkbox" type="checkbox" name="tx_scheduler[multiple]" value="1" id="task_multiple" ' . ($taskInfo['multiple'] ? 'checked="checked"' : '') . '>' + . '</div>' + . '</div></div>'; // Description $label = '<label for="task_description">' . $this->getLanguageService()->getLL('label.description') . '</label>'; - $table[] = '<div id="task_description_row" class="form-group">' . - BackendUtility::wrapInHelp($this->cshKey, 'task_description', $label) . - '<textarea class="form-control" name="tx_scheduler[description]">' . htmlspecialchars($taskInfo['description']) . '</textarea> - </div>'; + $table[] = + '<div class="form-section" id="task_description_row"><div class="form-group">' + . BackendUtility::wrapInHelp($this->cshKey, 'task_description', $label) + . '<div class="form-control-wrap">' + . '<textarea class="form-control" name="tx_scheduler[description]">' . htmlspecialchars($taskInfo['description']) . '</textarea>' + . '</div>' + . '</div></div>'; // Display additional fields foreach ($allAdditionalFields as $class => $fields) { @@ -790,10 +812,12 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas foreach ($fields as $fieldID => $fieldInfo) { $label = '<label for="' . $fieldID . '">' . $this->getLanguageService()->sL($fieldInfo['label']) . '</label>'; $htmlClassName = strtolower(str_replace('\\', '-', $class)); - $table[] = '<div id="' . $fieldID . '_row"' . $additionalFieldsStyle . ' class="form-group extraFields extra_fields_' . $htmlClassName . '">' . - BackendUtility::wrapInHelp($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $label) . - '<div>' . $fieldInfo['code'] . '</div> - </div>'; + + $table[] = + '<div class="form-section extraFields extra_fields_' . $htmlClassName . '" ' . $additionalFieldsStyle . ' id="' . $fieldID . '_row"><div class="form-group">' + . BackendUtility::wrapInHelp($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $label) + . '<div class="form-control-wrap">' . $fieldInfo['code'] . '</div>' + . '</div></div>'; } } } @@ -905,17 +929,18 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Scheduler/Scheduler'); $table = array(); // Header row - $table[] = '<thead><tr> - <td><a href="#" id="checkall" title="' . $this->getLanguageService()->getLL('label.checkAll', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-select') . '</a></td> - <td> </td> - <td>' . $this->getLanguageService()->getLL('label.id', TRUE). '</td> - <td colspan="2">' . $this->getLanguageService()->getLL('task', TRUE). '</td> - <td>' . $this->getLanguageService()->getLL('label.type', TRUE). '</td> - <td>' . $this->getLanguageService()->getLL('label.frequency', TRUE). '</td> - <td>' . $this->getLanguageService()->getLL('label.parallel', TRUE). '</td> - <td>' . $this->getLanguageService()->getLL('label.lastExecution', TRUE). '</td> - <td>' . $this->getLanguageService()->getLL('label.nextExecution', TRUE). '</td> - </tr></thead>'; + $table[] = + '<thead><tr>' + . '<th><a href="#" id="checkall" title="' . $this->getLanguageService()->getLL('label.checkAll', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-select') . '</a></th>' + . '<th>' . $this->getLanguageService()->getLL('label.id', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('task', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('label.type', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('label.frequency', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('label.parallel', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('label.lastExecution', TRUE). '</th>' + . '<th>' . $this->getLanguageService()->getLL('label.nextExecution', TRUE). '</th>' + . '<th></th>' + . '</tr></thead>'; // Loop on all tasks $temporaryResult = array(); @@ -930,15 +955,16 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas $temporaryResult[$row['task_group']]['tasks'][] = $row; } foreach ($temporaryResult as $taskGroup) { - $groupText = '<strong>' . htmlspecialchars($taskGroup['groupName']) . '</strong>'; + if (!empty($taskGroup['groupName'])) { + $groupText = '<strong>' . htmlspecialchars($taskGroup['groupName']) . '</strong>'; if (!empty($taskGroup['groupDescription'])) { - $groupText .= '<br />' . nl2br(htmlspecialchars($taskGroup['groupDescription'])); + $groupText .= '<br>' . nl2br(htmlspecialchars($taskGroup['groupDescription'])); } - $table[] = '<tr><td colspan="10">' . $groupText . '</td></tr>'; - + $table[] = '<tr><td colspan="9">' . $groupText . '</td></tr>'; + } foreach ($taskGroup['tasks'] as $schedulerRecord) {// Define action icons - $editAction = '<a href="' . htmlspecialchars($this->moduleUri . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:edit', TRUE) . '" class="icon">' . + $editAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:edit', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>'; if ((int)$schedulerRecord['disable'] === 1) { $translationKey = 'enable'; @@ -947,21 +973,20 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas $translationKey = 'disable'; $spriteIcon = 'actions-edit-hide'; } - $toggleHiddenAction = '<a href="' . htmlspecialchars($this->moduleUri . '&CMD=toggleHidden&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:' . $translationKey, TRUE) . '" class="icon">' . + $toggleHiddenAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=toggleHidden&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:' . $translationKey, TRUE) . '" class="icon">' . IconUtility::getSpriteIcon($spriteIcon) . '</a>'; - $deleteAction = '<a href="' . htmlspecialchars($this->moduleUri . '&CMD=delete&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.delete')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" class="icon">' . + $deleteAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=delete&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.delete')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>'; - $stopAction = '<a href="' . htmlspecialchars($this->moduleUri . '&CMD=stop&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.stop')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:stop', TRUE) . '" class="icon">' . - '<img ' . IconUtility::skinImg($this->backPath, (ExtensionManagementUtility::extRelPath('scheduler') . '/Resources/Public/Images/stop.png')) . ' alt="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:stop') . '" /></a>'; - $runAction = '<a href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task', TRUE) . '" class="icon">' . + $stopAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=stop&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.stop')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:stop', TRUE) . '" class="icon">' . + IconUtility::getSpriteIcon('actions-document-close') . '</a>'; + $runAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('extensions-scheduler-run-task') . '</a>'; // Define some default values $lastExecution = '-'; $isRunning = FALSE; $showAsDisabled = FALSE; - $executionStatus = 'scheduled'; - $startExecutionElement = ' '; + $startExecutionElement = '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>'; // Restore the serialized task and pass it a reference to the scheduler object /** @var $task \TYPO3\CMS\Scheduler\Task\AbstractTask|\TYPO3\CMS\Scheduler\ProgressProviderInterface */ $task = unserialize($schedulerRecord['serialized_task_object']); @@ -982,7 +1007,8 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas if ($this->scheduler->isValidTaskObject($task)) { // The task object is valid - $name = '<div class="title">' . htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')') . '</div>'; + $labels = array(); + $name = htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')'); $additionalInformation = $task->getAdditionalInformation(); if ($task instanceof \TYPO3\CMS\Scheduler\ProgressProviderInterface) { $progress = round(floatval($task->getProgress()), 2); @@ -993,23 +1019,28 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } // Check if task currently has a running execution if (!empty($schedulerRecord['serialized_executions'])) { + $labels[] = array( + 'class' => 'success', + 'text' => $this->getLanguageService()->getLL('status.running') + ); $isRunning = TRUE; - $executionStatus = 'running'; } // Prepare display of next execution date // If task is currently running, date is not displayed (as next hasn't been calculated yet) // Also hide the date if task is disabled (the information doesn't make sense, as it will not run anyway) - if ($isRunning || $schedulerRecord['disable'] == 1) { + if ($isRunning || $schedulerRecord['disable']) { $nextDate = '-'; } else { $nextDate = date($dateFormat, $schedulerRecord['nextexecution']); if (empty($schedulerRecord['nextexecution'])) { $nextDate = $this->getLanguageService()->getLL('none'); } elseif ($schedulerRecord['nextexecution'] < $GLOBALS['EXEC_TIME']) { - // Next execution is overdue, highlight date - $nextDate = '<span class="late" title="' . $this->getLanguageService()->getLL('status.legend.scheduled') . '">' . $nextDate . '</span>'; - $executionStatus = 'late'; + $labels[] = array( + 'class' => 'warning', + 'text' => $this->getLanguageService()->getLL('status.late'), + 'description' => $this->getLanguageService()->getLL('status.legend.scheduled') + ); } } // Get execution type @@ -1031,15 +1062,18 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas $multiple = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:no'); } // Define checkbox - $startExecutionElement = '<input type="checkbox" name="tx_scheduler[execute][]" value="' . $schedulerRecord['uid'] . '" id="task_' . $schedulerRecord['uid'] . '" class="checkboxes" />'; + $startExecutionElement = '<label class="btn btn-default btn-checkbox"><input type="checkbox" name="tx_scheduler[execute][]" value="' . $schedulerRecord['uid'] . '" id="task_' . $schedulerRecord['uid'] . '"><span class="t3-icon fa"></span></label>'; $actions = $editAction . $toggleHiddenAction . $deleteAction; // Check the disable status // Row is shown dimmed if task is disabled, unless it is still running - if ($schedulerRecord['disable'] == 1 && !$isRunning) { + if ($schedulerRecord['disable'] && !$isRunning) { + $labels[] = array( + 'class' => 'default', + 'text' => $this->getLanguageService()->getLL('status.disabled') + ); $showAsDisabled = TRUE; - $executionStatus = 'disabled'; } // Show no action links (edit, delete) if task is running @@ -1050,52 +1084,60 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } // Check if the last run failed - $failureOutput = ''; if (!empty($schedulerRecord['lastexecution_failure'])) { // Try to get the stored exception object /** @var $exception \Exception */ $exception = unserialize($schedulerRecord['lastexecution_failure']); // If the exception could not be unserialized, issue a default error message if ($exception === FALSE || $exception instanceof \__PHP_Incomplete_Class) { - $failureDetail = $this->getLanguageService()->getLL('msg.executionFailureDefault'); + $labelDescription = $this->getLanguageService()->getLL('msg.executionFailureDefault'); } else { - $failureDetail = sprintf($this->getLanguageService()->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage()); + $labelDescription = sprintf($this->getLanguageService()->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage()); } - $failureOutput = ' <img ' . IconUtility::skinImg(ExtensionManagementUtility::extRelPath('scheduler'), 'Resources/Public/Images/status_failure.png') . ' alt="' . htmlspecialchars($this->getLanguageService()->getLL('status.failure')) . '" title="' . htmlspecialchars($failureDetail) . '" />'; + $labels[] = array( + 'class' => 'danger', + 'text' => $this->getLanguageService()->getLL('status.failure'), + 'description' => $labelDescription + ); } // Format the execution status, // including failure feedback, if any - $executionStatusOutput = '<img ' . IconUtility::skinImg(ExtensionManagementUtility::extRelPath('scheduler'), ('Resources/Public/Images/status_' . $executionStatus . '.png')) . ' id="executionstatus_' . $schedulerRecord['uid'] . '" alt="' . htmlspecialchars($this->getLanguageService()->getLL(('status.' . $executionStatus))) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL(('status.legend.' . $executionStatus))) . '" />' . $failureOutput; if ($schedulerRecord['description'] !== '') { $taskName = '<span title="' . htmlspecialchars($schedulerRecord['description']) . '">' . $name . '</span>'; } else { $taskName = $name; } - $table[] = '<tr class="' . ($showAsDisabled ? 'disabled' : '') . '"> - <td>' . $startExecutionElement . '</td> - <td class="right">' . $actions . '</td> - <td class="right">' . $schedulerRecord['uid'] . '</td> - <td>' . $executionStatusOutput . '</td> - <td>' . $taskName . '</td> - <td>' . $execType . '</td> - <td>' . $frequency . '</td> - <td>' . $multiple . '</td> - <td>' . $lastExecution . '</td> - <td>' . $nextDate . '</td> - </tr>'; + $table[] = + '<tr class="' . ($showAsDisabled ? 'disabled' : '') . '">' + . '<td>' . $startExecutionElement . '</td>' + . '<td class="right">' . $schedulerRecord['uid'] . '</td>' + . '<td>' . $taskName . ' ' . $this->makeStatusLabel($labels) . '</td>' + . '<td>' . $execType . '</td>' + . '<td>' . $frequency . '</td>' + . '<td>' . $multiple . '</td>' + . '<td>' . $lastExecution . '</td>' + . '<td>' . $nextDate . '</td>' + . '<td nowrap="nowrap"><div class="btn-group" role="group">' . $actions . '</div></td>' + . '</tr>'; } else { // The task object is not valid // Prepare to issue an error /** @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, sprintf($this->getLanguageService()->getLL('msg.invalidTaskClass'), $class), '', FlashMessage::ERROR); $executionStatusOutput = $flashMessage->render(); - $table[] = '<tr> - <td>' . $startExecutionElement . '</td> - <td class="right">' . $deleteAction . '</td> - <td class="right">' . $schedulerRecord['uid'] . '</td> - <td colspan="6">' . $executionStatusOutput . '</td> - </tr>'; + $table[] = + '<tr>' + . '<td>' . $startExecutionElement . '</td>' + . '<td class="right">' . $schedulerRecord['uid'] . '</td>' + . '<td colspan="6">' . $executionStatusOutput . '</td>' + . '<td nowrap="nowrap"><div class="btn-group" role="group">' + . $deleteAction + . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' + . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' + . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' + . '</div></td>' + . '</tr>'; } } } @@ -1111,6 +1153,24 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas return $this->view->render(); } + /** + * Generates bootstrap labels containing the label statuses + * + * @param array $labels + * @return string + */ + protected function makeStatusLabel(array $labels) { + $htmlLabels = array(); + foreach ($labels as $label) { + if (empty($label['text'])) { + continue; + } + $htmlLabels[] = '<span class="label label-' . $label['class'] . '" title="' . htmlspecialchars($label['description']) . '">' . $label['text'] . '</span>'; + } + + return implode(' ', $htmlLabels); + } + /** * Saves a task specified in the backend form to the database * @@ -1130,7 +1190,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas return; } // Register single execution - if ($this->submittedData['type'] == 1) { + if ((int)$this->submittedData['type'] === 1) { $task->registerSingleExecution($this->submittedData['start']); } else { if (!empty($this->submittedData['croncmd'])) { @@ -1172,7 +1232,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas // Create an instance of chosen class /** @var $task AbstractTask */ $task = GeneralUtility::makeInstance($this->submittedData['class']); - if ($this->submittedData['type'] == 1) { + if ((int)$this->submittedData['type'] === 1) { // Set up single execution $task->registerSingleExecution($this->submittedData['start']); } else { @@ -1469,12 +1529,12 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas } if ($this->CMD === 'add' || $this->CMD === 'edit') { $buttons['close'] = '<a href="#" onclick="document.location=' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->moduleUri)) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:cancel', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; - $buttons['save'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="save" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:save', TRUE) . '" />' . IconUtility::getSpriteIcon('actions-document-save') . '</button>'; - $buttons['saveclose'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="saveclose" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose', TRUE) . '" />' . IconUtility::getSpriteIcon('actions-document-save-close') . '</button>'; - $buttons['savenew'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="savenew" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndCreateNewDoc', TRUE) . '" />' . IconUtility::getSpriteIcon('actions-document-save-new') . '</button>'; + $buttons['save'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="save" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:save', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save') . '</button>'; + $buttons['saveclose'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="saveclose" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndClose', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save-close') . '</button>'; + $buttons['savenew'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="savenew" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:saveAndCreateNewDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-save-new') . '</button>'; } if ($this->CMD === 'edit') { - $buttons['delete'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="delete" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" />' . IconUtility::getSpriteIcon('actions-edit-delete') . '</button>'; + $buttons['delete'] = '<button style="padding: 0; margin: 0; cursor: pointer;" type="submit" name="CMD" value="delete" class="c-inputButton" src="clear.gif" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</button>'; } return $buttons; } diff --git a/typo3/sysext/scheduler/Classes/Example/SleepTaskAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Example/SleepTaskAdditionalFieldProvider.php index 47b9c6b9a618..bd6a51a15f65 100644 --- a/typo3/sysext/scheduler/Classes/Example/SleepTaskAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Example/SleepTaskAdditionalFieldProvider.php @@ -48,7 +48,7 @@ class SleepTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Additiona } // Write the code for the field $fieldID = 'task_sleepTime'; - $fieldCode = '<input type="text" name="tx_scheduler[sleepTime]" id="' . $fieldID . '" value="' . $taskInfo['sleepTime'] . '" size="10" />'; + $fieldCode = '<input type="text" class="form-control" name="tx_scheduler[sleepTime]" id="' . $fieldID . '" value="' . $taskInfo['sleepTime'] . '" size="10">'; $additionalFields = array(); $additionalFields[$fieldID] = array( 'code' => $fieldCode, diff --git a/typo3/sysext/scheduler/Classes/Example/TestTaskAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Example/TestTaskAdditionalFieldProvider.php index e91666270654..4b5362f2d521 100644 --- a/typo3/sysext/scheduler/Classes/Example/TestTaskAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Example/TestTaskAdditionalFieldProvider.php @@ -48,7 +48,7 @@ class TestTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Additional } // Write the code for the field $fieldID = 'task_email'; - $fieldCode = '<input type="text" name="tx_scheduler[email]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['email']) . '" size="30" />'; + $fieldCode = '<input type="text" class="form-control" name="tx_scheduler[email]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['email']) . '" size="30">'; $additionalFields = array(); $additionalFields[$fieldID] = array( 'code' => $fieldCode, diff --git a/typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php index 06b79f62aead..34584dd77963 100644 --- a/typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php @@ -47,7 +47,7 @@ class CachingFrameworkGarbageCollectionAdditionalFieldProvider implements \TYPO3 $fieldName = 'tx_scheduler[scheduler_cachingFrameworkGarbageCollection_selectedBackends][]'; $fieldId = 'task_cachingFrameworkGarbageCollection_selectedBackends'; $fieldOptions = $this->getCacheBackendOptions($taskInfo['scheduler_cachingFrameworkGarbageCollection_selectedBackends']); - $fieldHtml = '<select name="' . $fieldName . '" id="' . $fieldId . '" class="wide" size="10" multiple="multiple">' . $fieldOptions . '</select>'; + $fieldHtml = '<select class="form-control" name="' . $fieldName . '" id="' . $fieldId . '" class="from-control" size="10" multiple="multiple">' . $fieldOptions . '</select>'; $additionalFields[$fieldId] = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.cachingFrameworkGarbageCollection.selectBackends', diff --git a/typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php index 187c83a91588..db668d5adc23 100644 --- a/typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php @@ -60,7 +60,7 @@ class FileStorageExtractionAdditionalFieldProvider implements \TYPO3\CMS\Schedul $fieldName = 'tx_scheduler[scheduler_fileStorageIndexing_storage]'; $fieldId = 'scheduler_fileStorageIndexing_storage'; - $fieldHtml = '<select name="' . $fieldName . '" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; + $fieldHtml = '<select class="form-control" name="' . $fieldName . '" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; $fieldConfiguration = array( 'code' => $fieldHtml, @@ -81,7 +81,7 @@ class FileStorageExtractionAdditionalFieldProvider implements \TYPO3\CMS\Schedul $fieldName = 'tx_scheduler[scheduler_fileStorageIndexing_fileCount]'; $fieldId = 'scheduler_fileStorageIndexing_fileCount'; $fieldValue = $task !== NULL ? (int)$task->maxFileCount : 100; - $fieldHtml = '<input type="text" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '" />'; + $fieldHtml = '<input type="text" class="form-control" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '">'; $fieldConfiguration = array( 'code' => $fieldHtml, diff --git a/typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php index fdf87f181299..fcf678e9d49a 100644 --- a/typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php @@ -56,7 +56,7 @@ class FileStorageIndexingAdditionalFieldProvider implements \TYPO3\CMS\Scheduler $fieldName = 'tx_scheduler[scheduler_fileStorageIndexing_storage]'; $fieldId = 'scheduler_fileStorageIndexing_storage'; - $fieldHtml = '<select name="' . $fieldName . '" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; + $fieldHtml = '<select class="form-control" name="' . $fieldName . '" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; $fieldConfiguration = array( 'code' => $fieldHtml, diff --git a/typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionAdditionalFieldProvider.php index e0843e074d9a..8983d4a5fde2 100644 --- a/typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionAdditionalFieldProvider.php @@ -51,7 +51,7 @@ class RecyclerGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Sch $fieldName = 'tx_scheduler[scheduler_recyclerGarbageCollection_numberOfDays]'; $fieldId = 'task_recyclerGarbageCollection_numberOfDays'; $fieldValue = (int)$taskInfo['scheduler_recyclerGarbageCollection_numberOfDays']; - $fieldHtml = '<input type="text" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '" />'; + $fieldHtml = '<input class="form-control" type="text" name="' . $fieldName . '" id="' . $fieldId . '" value="' . htmlspecialchars($fieldValue) . '">'; $additionalFields[$fieldId] = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.recyclerGarbageCollection.numberOfDays', diff --git a/typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php index 75efca86620f..b8ecede22797 100644 --- a/typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php @@ -73,7 +73,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu } $fieldName = 'tx_scheduler[scheduler_tableGarbageCollection_allTables]'; $fieldId = 'task_tableGarbageCollection_allTables'; - $fieldHtml = '<input type="checkbox" ' . $checked . ' name="' . $fieldName . '" ' . 'id="' . $fieldId . '" />'; + $fieldHtml = '<div class="checkbox"><label><input type="checkbox" ' . $checked . ' name="' . $fieldName . '" ' . 'id="' . $fieldId . '"></label></div>'; $fieldConfiguration = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.tableGarbageCollection.allTables', @@ -115,7 +115,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu $fieldId = 'task_tableGarbageCollection_table'; $fieldHtml = array(); // Add table drop down html - $fieldHtml[] = '<select ' . 'name="' . $fieldName . '" ' . $disabled . ' id="' . $fieldId . '">' . implode(LF, $options) . '</select>'; + $fieldHtml[] = '<select class="form-control" name="' . $fieldName . '" ' . $disabled . ' id="' . $fieldId . '">' . implode(LF, $options) . '</select>'; // Add js array for default 'number of days' values $fieldHtml[] = '<script type="text/javascript">/*<![CDATA[*/<!--'; $fieldHtml[] = 'var defaultNumberOfDays = ' . json_encode($this->defaultNumberOfDays) . ';'; @@ -157,7 +157,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu } $fieldName = 'tx_scheduler[scheduler_tableGarbageCollection_numberOfDays]'; $fieldId = 'task_tableGarbageCollection_numberOfDays'; - $fieldHtml = '<input type="text" ' . 'name="' . $fieldName . '" ' . 'id="' . $fieldId . '" ' . $disabled . 'value="' . (int)$taskInfo['scheduler_tableGarbageCollection_numberOfDays'] . '" ' . 'size="4" />'; + $fieldHtml = '<input class="form-control" type="text" ' . 'name="' . $fieldName . '" ' . 'id="' . $fieldId . '" ' . $disabled . 'value="' . (int)$taskInfo['scheduler_tableGarbageCollection_numberOfDays'] . '" ' . 'size="4">'; $fieldConfiguration = array( 'code' => $fieldHtml, 'label' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:label.tableGarbageCollection.numberOfDays', diff --git a/typo3/sysext/scheduler/Classes/ViewHelpers/ModuleLinkViewHelper.php b/typo3/sysext/scheduler/Classes/ViewHelpers/ModuleLinkViewHelper.php index 187937f1cf2b..984b02bd3539 100644 --- a/typo3/sysext/scheduler/Classes/ViewHelpers/ModuleLinkViewHelper.php +++ b/typo3/sysext/scheduler/Classes/ViewHelpers/ModuleLinkViewHelper.php @@ -15,31 +15,13 @@ namespace TYPO3\CMS\Scheduler\ViewHelpers; */ use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper; +use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; /** - * Create internal link tag within backend app + * Create internal link within backend app * @internal */ -class ModuleLinkViewHelper extends AbstractTagBasedViewHelper { - - /** - * @var string - */ - protected $tagName = 'a'; - - /** - * Arguments initialization - * - * @return void - */ - public function initializeArguments() { - $this->registerUniversalTagAttributes(); - $this->registerTagAttribute('name', 'string', 'Specifies the name of an anchor'); - $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document'); - $this->registerTagAttribute('rev', 'string', 'Specifies the relationship between the linked document and the current document'); - $this->registerTagAttribute('target', 'string', 'Specifies where to open the linked document'); - } +class ModuleLinkViewHelper extends AbstractViewHelper { /** * Render module link with command and arguments @@ -57,11 +39,7 @@ class ModuleLinkViewHelper extends AbstractTagBasedViewHelper { $moduleArguments['tx_scheduler'] = $arguments; } - $uri = BackendUtility::getModuleUrl('system_txschedulerM1', $moduleArguments); - $this->tag->addAttribute('href', $uri); - $this->tag->setContent($this->renderChildren()); - $this->tag->forceClosingTag(TRUE); - return $this->tag->render(); + return BackendUtility::getModuleUrl('system_txschedulerM1', $moduleArguments); } } \ No newline at end of file diff --git a/typo3/sysext/scheduler/Classes/ViewHelpers/SpriteIconViewHelper.php b/typo3/sysext/scheduler/Classes/ViewHelpers/SpriteIconViewHelper.php deleted file mode 100644 index 8b93243006a0..000000000000 --- a/typo3/sysext/scheduler/Classes/ViewHelpers/SpriteIconViewHelper.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -namespace TYPO3\CMS\Scheduler\ViewHelpers; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -/** - * Displays sprite icon identified by iconName key - * - * @internal - */ -class SpriteIconViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper { - - /** - * Prints sprite icon html for $iconName key - * - * @param string $iconName - * @return string - */ - public function render($iconName) { - return \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($iconName); - } - -} \ No newline at end of file diff --git a/typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst b/typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst index 476e28b47ea4..71c476ca0de9 100644 --- a/typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst +++ b/typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst @@ -209,7 +209,7 @@ executed. It is thus very strongly recommended to use :: - $fieldCode = '<input type="text" name="tx_scheduler[email]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['email']) . '" size="30" />'; + $fieldCode = '<input type="text" class="form-control" name="tx_scheduler[email]" id="' . $fieldID . '" value="' . htmlspecialchars($taskInfo['email']) . '" size="30">'; .. _naming-of-additional-fields: diff --git a/typo3/sysext/scheduler/Resources/Private/Language/locallang.xlf b/typo3/sysext/scheduler/Resources/Private/Language/locallang.xlf index b9cd9895e6e7..b81451ea36ca 100644 --- a/typo3/sysext/scheduler/Resources/Private/Language/locallang.xlf +++ b/typo3/sysext/scheduler/Resources/Private/Language/locallang.xlf @@ -312,22 +312,22 @@ <trans-unit id="status.progress" xml:space="preserve"> <source>Progress</source> </trans-unit> - <trans-unit id="status.legend" xml:space="preserve"> + <trans-unit id="status.legend" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Status Legend</source> </trans-unit> - <trans-unit id="status.legend.disabled" xml:space="preserve"> + <trans-unit id="status.legend.disabled" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Disabled, will not be executed, except manually</source> </trans-unit> - <trans-unit id="status.legend.failure" xml:space="preserve"> + <trans-unit id="status.legend.failure" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Failure! An error occurred during the last execution (move over bullet for more details)</source> </trans-unit> - <trans-unit id="status.legend.late" xml:space="preserve"> + <trans-unit id="status.legend.late" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Late, will run with next execution</source> </trans-unit> - <trans-unit id="status.legend.running" xml:space="preserve"> + <trans-unit id="status.legend.running" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Currently running</source> </trans-unit> - <trans-unit id="status.legend.scheduled" xml:space="preserve"> + <trans-unit id="status.legend.scheduled" xml:space="preserve" deprecated="Unused since CMS 7"> <source>Scheduled, will run on next possible execution</source> </trans-unit> <trans-unit id="status.disabled" xml:space="preserve"> diff --git a/typo3/sysext/scheduler/Resources/Private/Styles/styles.less b/typo3/sysext/scheduler/Resources/Private/Styles/styles.less deleted file mode 100644 index 915ded847070..000000000000 --- a/typo3/sysext/scheduler/Resources/Private/Styles/styles.less +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -/* - - - - - - - - - - - - - - - - - - - - - -Scheduler -- - - - - - - - - - - - - - - - - - - - - */ - -.tx_scheduler_mod1 { - - a { - text-decoration: underline; - } - - a.icon, - a.typo3-csh-link { - text-decoration: none; - } - - #typo3-docheader { - a { - text-decoration: none; - } - } - - .late { - color: #f00; - font-weight: bold; - } - - .status-legend { - padding-top: 10px; - padding-bottom: 5px; - font-weight: bold; - } - -} diff --git a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html index 865a26fa5875..4a5744b8589c 100644 --- a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html +++ b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/InfoScreen.html @@ -26,14 +26,9 @@ <td>{classInfo.description}</td> <td> <div class="btn-group" role="group"> - <s:moduleLink - controller="scheduler" - action="add" arguments="{class: class}" - title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:new')}" - class="btn btn-default" - > - <s:spriteIcon iconName="actions-document-new" /> - </s:moduleLink> + <span class="btn btn-default"> + <f:be.buttons.icon uri="{s:moduleLink(controller:'scheduler', action: 'add', arguments: '{class: class}')}" icon="actions-document-new" title="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:new')}"/> + </span> </div> </td> </tr> diff --git a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/ListTasks.html b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/ListTasks.html index 4b4dfb40123a..98ab066cb7a4 100644 --- a/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/ListTasks.html +++ b/typo3/sysext/scheduler/Resources/Private/Templates/Backend/SchedulerModule/ListTasks.html @@ -1,35 +1,8 @@ -{namespace s = TYPO3\CMS\Scheduler\ViewHelpers} <f:format.raw>{table}</f:format.raw> -<button class="btn btn-primary" name="go" id="scheduler_executeselected"> - <s:spriteIcon iconName="extensions-scheduler-run-task" /> +<button class="btn btn-default" name="go" id="scheduler_executeselected"> <f:translate key="label.executeSelected" /> </button> -<h3><f:translate key="status.legend" /></h3> - -<ul class="list-unstyled"> - <li> - <f:image src="EXT:scheduler/Resources/Public/Images/status_failure.png" alt="{f:translate(extensionName:'scheduler',key:'status.failure')}" /> - <f:translate key="status.legend.failure" /> - </li> - <li> - <f:image src="EXT:scheduler/Resources/Public/Images/status_late.png" alt="{f:translate(extensionName:'scheduler',key:'status.legend.late')}" /> - <f:translate key="status.legend.late" /> - </li> - <li> - <f:image src="EXT:scheduler/Resources/Public/Images/status_running.png" alt="{f:translate(extensionName:'scheduler',key:'status.running')}" /> - <f:translate key="status.legend.running" /> - </li> - <li> - <f:image src="EXT:scheduler/Resources/Public/Images/status_scheduled.png" alt="{f:translate(extensionName:'scheduler',key:'status.scheduled')}" /> - <f:translate key="status.legend.scheduled" /> - </li> - <li> - <f:image src="EXT:scheduler/Resources/Public/Images/status_disabled.png" alt="{f:translate(extensionName:'scheduler',key:'status.disabled')}" /> - <f:translate key="status.legend.disabled" /> - </li> -</ul> - <h3><f:translate key="label.serverTime" /></h3> <p><f:translate key="msg.serverTimeHelp" /></p> <p><f:translate key="msg.serverTime" arguments="{0: now}" /></p> \ No newline at end of file diff --git a/typo3/sysext/scheduler/Resources/Public/Images/Icons/RunTask.png b/typo3/sysext/scheduler/Resources/Public/Images/Icons/RunTask.png deleted file mode 100644 index 019378a3f380ed646004abf26cd39cfc48d1cddf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 703 zcmV;w0zmzVP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0007pNkl<ZILoDz z?MqWp9LN1TcJJ=B4J42eg$NQt?NyLS>}ocYr8#Gsy1Ti27~QQHwNj#te8@3UO3N(m zVQW5axzwqRK^CsMN=UdjQExV^SAIKpFRn>qL<hcbIGoStcOEkUWc*M57&x<dL~WQm zER=@x#G>hgN!_F-sT<E0b%AW5(6?W`r=UEN&*{Ut30qi?d+{!etPZ5pztV}?@e|Mv zvkC1G%k3&4Rk`9<IjNg5Cj#rE@P4=jSFAZ5sqbGOLHj}r4tbTST(6SbAt(#ysfvR+ z8xkx{v`6dFv{Z}GmoeBD&f+{t>*6{1K0n5_*(PYZ=nc(nS|tng!5jx4DoIzCU@HOm zNEM_eNi4IK;Abk~h?wCg62s6jWZj@0vY=>EBlgET;fZ&kX|V?8c_SKTE3mb-m5wCg zL*?M747l^Q9o|?wGOyC2EI97V+I+V502iZHG)7FY&R4@aXOacqetb<!%oAmB%+z2c z-Veq}ZOQ`e6LxcSbr8-ap1>xu<SJOgl`@?AnZ(NXWmv{bAq1;28t(&R|6MS|ig%Yg z(EI*6Y_E-Jm=9I#fa?P#uo6Lc^fG!QZm=!X_7?K*GY;d^0{GS*p>>7`f~R4gHpp<@ z%adsEpMot=2H&Sa6nc(=ZKk#lG1sG19UxcZ4qNeDe2C_$ax{|tO0e0lCz0S%y!bc( z=U5FGi(-SdP^ujdDZ7K_GTW$>D_9Rdk@Q5}5T;DHFkwW`n=9}USO}P)tW%^2%<cM= z_qEX+>!K36J}r8e+!%i6!SJ#NT@e=wy7R#_C=x7BaeICy_7bgT9hAV@DUoSZBpF_j lBo##xfvuy|fBlXBnqMC4tlT}^#KZsq002ovPDHLkV1m<?N2UM( diff --git a/typo3/sysext/scheduler/Resources/Public/Images/status_disabled.png b/typo3/sysext/scheduler/Resources/Public/Images/status_disabled.png deleted file mode 100644 index 38efeddcd229021ebf646f781fa838f0a68596aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V3y@T|W;X*;k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X8a-VcLpWqv5AMuz3KU^DU|AKX7$(%w)xniC@&Es+B~7i~ zmpYC;X!~9`m-EM3`@SCrW?W6BcVE4H{3<U?vT((HHldKC^YwRLUJ=J2WnFope412f zV9R8kD1F@ps{@}buh(RVUAyqy8D7n$N6v<%i)oAde<;{!)ZgHH_eOG3qTn9J3x~A) UgEl!<10BQQ>FVdQ&MBb@09k}meE<Le diff --git a/typo3/sysext/scheduler/Resources/Public/Images/status_failure.png b/typo3/sysext/scheduler/Resources/Public/Images/status_failure.png deleted file mode 100644 index d683838e53d33a7284eae4349ff3a577a226caf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 354 zcmV-o0iFJdP)<h;3K|Lk000e1NJLTq000UA000UI1^@s6jWW-@0003gNkl<ZC=~_4 zO-{m46oAq1wl4}Pn1amEI3r;nj=BR9=B@$<x|JsEfQ1+n$4WGs04=2L`zhsmj?t$_ zP*7zd!V<_p0okDB2x~+zZD<jRUZV77#r-`py#qkMf3nN=Gt;7+tMY8l-Y=pwUB$B* zk_^B(P({Wg;$DyN{<i9h^1}q@m%Y&#={h)_00jgDP+&AB{QfPCw@ub73f$p9JWPm_ zApl)faj7d1!CRXd-!y1l5sHGYsX+w<6eaE_T#ZtEU1Pkpo7Va4dN81kB2WNDL@-H0 z@DA_n#<V`<yRXk|`tU%%-v?Dx6%pv#mfdzsupu|zHtS%U`Ng@_?PNllrT`RW$$qz| zvDK?;v^HIP26!${$B*)KT%u$Ezy=|Qc#Q`B0sJVW4+%R1rvLx|07*qoM6N<$f+`@F Ao&W#< diff --git a/typo3/sysext/scheduler/Resources/Public/Images/status_late.png b/typo3/sysext/scheduler/Resources/Public/Images/status_late.png deleted file mode 100644 index 815495f5513d0f8ab5c387e9a93a157e332916ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 368 zcmV-$0gwKPP)<h;3K|Lk000e1NJLTq000UA000UI1^@s6jWW-@0003uNkl<Zc-l>m zyG{a87=&ln!cvi~z4XNJ9K69+_PziR3k`*pG$vM57RqIX22UbbsF46h!9p91tP(|~ z5Wx!uqmKXCXkzhY{xjb+2h9xNI;Ny)3#yq0-Hb_nyIv>G837s_!X{#^LXiFD3i<7N z^siQUT?|sYizI;ab=a;7aM;a~AC-SprQ4!*dV^ZRP~Ee6@+D0^r-UT=nwEFUL%Vtc z3e`1}y?V%F(3s;_JIc?ysCRq)X^47*y*T(-3h-80f1lu`pzoXQaXyu2sW&JrL$!<3 z?3X6lDf;=aGr{|UkDXnMy~8QCi!;<4<d;mlv^vVSvc=)C#rLXT7~}BB$3exScKJov z$SpuHVh3@PtsKajL7srEEVv&B#m5A|2^+|SB_psUmB3$=6ESor-oOtN82oF%3M3c+ O0000<MNUMnLSTY)B&SvY diff --git a/typo3/sysext/scheduler/Resources/Public/Images/status_running.png b/typo3/sysext/scheduler/Resources/Public/Images/status_running.png deleted file mode 100644 index 44918438d3b6c050c16249dde1955d5cc73a4336..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 377 zcmV-<0fzpGP)<h;3K|Lk000e1NJLTq000UA000UI1^@s6jWW-@0003%Nkl<ZC=~_4 zF-se99LM3$_pgh0X_6}r;Uq=6+!@Mss*4T^PI(6jz77{LlsI(i)~%aJgzn~rB-9)o zD_$lwXY>@5|Ig>q!Jh-b5b7Bm0$nh`jfI^Xb^$_rqkYV5*o>MdpW1EWI0lL0=7#^* z*OZIJDcC?eXS=;-qcO^|j38J81OPzwR56)OSS-rEzWv_5%(5@tIF9iKLYNs602D>R zWI7$|>#xkxP6uHGL5*51M8NWKN%d5L#MRYbl>SUCNfK`F?s<NxFarR9FbIi0M*Pcj zwE5%nWhYI#ZgrLCs=^Gs_c-SW!+^KfH)i>4tc~v*y?Xt_DBVhN&f&cQ!bzBUW_ix? z;i0ef<8?s8M!k6w$1Pf|7Lq86IrDizS(c~Hxq+gi2!Itw&*0FTx`s!%vEk2!F2M5+ XeTsr0ymqTd00000NkvXXu0mjf)F7-R diff --git a/typo3/sysext/scheduler/Resources/Public/Images/status_scheduled.png b/typo3/sysext/scheduler/Resources/Public/Images/status_scheduled.png deleted file mode 100644 index b02b2aa94abd785ccbf8443f97cc284423ab51bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2VkYHF5IUx~9F_i@Q1vC7Qo~X1H$dfE_jVKAu zPb(=;EJ|f?Ovz75Rq)JBOiv9;O-!jQJeg_(R8;Ee;uyjqoBZSd|3iPePW=@B_dor| z{>6EZK0OtFUG^v4BG@kZVH4};<>B)ZXI!%2<yhvQJ?qqjh`6x(7vtjNCY}(8oH37s zC6jd`&)S<mB^@Trzk94eLudbn1q&4P-zXgZfApXyYip-tcjL2v_v2r`i`)GFe?7xR X1B>hZF3$yk4q)(f^>bP0l+XkKx!POQ diff --git a/typo3/sysext/scheduler/Resources/Public/Images/stop.png b/typo3/sysext/scheduler/Resources/Public/Images/stop.png deleted file mode 100644 index 55224b28f5397afb4762df6fe92205c992f87af5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 647 zcmV;20(kw2P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0006`Nkl<ZILoDy zJx^3Y6o#MOyMUk=3G%smK~PCl(85X+3px;E=|8YFMuUxw7MhSqfr>zkzracoet}jP zVH3!re7PV*<U<yA@4Yi~XU1Ze<wGruCpkGMlR3}(&g4X_wfs-S4j!z&8M+=RE_xb? zMqR75z!<F2C057<oyk11S`XJhcqsn}SQ&iTd8n>x@JLf#+;J?Z5R3t9(9*P~lc~4a z`P4n2cV{ND^MsXGFFJ~AD*KPNxQ))nJgk3*&_Jj_NH|(aSk=tW@u?YaE_J7&w{N5X zSQ&WUSyELwRDR|}+}W6i)n(9m2TJ8?;6p_<VO<OBiR6+$_w{yT|Lc(`K-6)1%1_nA zogdS%oPt1s@8{AB!1Hr1=BJ5${zzq0JRWhPJ%vB8M!OCnETwYFVF*&?)fLFR6DeRe zNvx(3jByJ9BSe5N$_WH0ePB@LdzI^j06)M4ez5C6NQ;z^_4Dd`1`Du!3IS4Lgs{5+ z8I+<GY;A#MkKzG<lHhq@G*-$|fGB{;WEQm_!m;D9wF%j5?xN>GHeY=Yw$f005+yZy zdwa0}Q0wd6t7FOK(7gZ^wXm7aL9+Ql&&Q<Gn0gog;#IzljxUF6Yu)=6Y5La98)Xe{ zU-hMPjYVVcVP*=f!OD<O2&~(Tx_ph552Lf0$%(sdi7&(Z002`R?Oo-kn+B@SpN$t8 zg;ok<Om3$PtbUpxlStfeo1A_2+bZuwvi(YzQ+D`CB<8p_4298}h&3hJ_ZRf$=3}&Z h*E%sH{|flm_yu$hf%RwL`QiWo002ovPDHLkV1jicFYN#T diff --git a/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js b/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js index c45c763892db..c82a98c54a22 100644 --- a/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js +++ b/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js @@ -88,61 +88,15 @@ define('TYPO3/CMS/Scheduler/Scheduler', ['jquery'], function($) { * Check or uncheck all checkboxes */ Scheduler.checkOrUncheckAllCheckboxes = function(theSelector) { - theSelector.parent().parent().parent().parent().find(':checkbox').prop('checked', !allCheckedStatus); + theSelector.parents('.tx_scheduler_mod1').find(':checkbox').prop('checked', !allCheckedStatus); allCheckedStatus = !allCheckedStatus; return false; }; - /** - * Change icon when running a single task - */ - Scheduler.runSingleTask = function(theSelector) { - var checkbox = theSelector.parent().parent().parent().find(':checkbox'); - var idParts = checkbox.attr('id').split('_'); - $('#executionstatus_' + idParts[1]).attr('src', TYPO3.settings.scheduler.runningIcon); - } - - /** - * Handle click event on a table row - */ - Scheduler.handleTableRowClick = function(theSelector, event) { - var checkbox = theSelector.find('input.checkboxes'); - if (!$(event.target).is('input')) { - if (checkbox.prop('checked')) { - checkbox.prop('checked', false); - } else { - checkbox.prop('checked', true); - } - } - } - - /** - * Execute selected task(s) - */ - Scheduler.executeSelected = function() { - // Set the status icon all to same status: running - $('.checkboxes:checked').each(function(index) { - var idParts = $(this).attr('id').split('_'); - $('#executionstatus_' + idParts[1]).attr('src', TYPO3.settings.scheduler.runningIcon); - }); - } - /** * Registers listeners */ Scheduler.initializeEvents = function() { - $('#scheduler_executeselected').on('click', function() { - Scheduler.executeSelected(); - }); - - $('.tx_scheduler_mod1 tbody tr').on('click', function(event) { - Scheduler.handleTableRowClick($(this), event); - }); - - $('.fa-play-circle').on('click', function() { - Scheduler.runSingleTask($(this)); - }); - $('#checkall').on('click', function() { Scheduler.checkOrUncheckAllCheckboxes($(this)); }); diff --git a/typo3/sysext/scheduler/Resources/Public/Styles/styles.css b/typo3/sysext/scheduler/Resources/Public/Styles/styles.css deleted file mode 100644 index 8394025efe14..000000000000 --- a/typo3/sysext/scheduler/Resources/Public/Styles/styles.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ -/* - - - - - - - - - - - - - - - - - - - - - -Scheduler -- - - - - - - - - - - - - - - - - - - - - */ -.tx_scheduler_mod1 a { - text-decoration: underline; -} -.tx_scheduler_mod1 a.icon, -.tx_scheduler_mod1 a.typo3-csh-link { - text-decoration: none; -} -.tx_scheduler_mod1 #typo3-docheader a { - text-decoration: none; -} -.tx_scheduler_mod1 .late { - color: #f00; - font-weight: bold; -} -.tx_scheduler_mod1 .status-legend { - padding-top: 10px; - padding-bottom: 5px; - font-weight: bold; -} diff --git a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_message.less b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_message.less index 5c9d20c1917b..270bdb171348 100644 --- a/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_message.less +++ b/typo3/sysext/t3skin/Resources/Private/Styles/TYPO3/_element_message.less @@ -32,6 +32,11 @@ } } +// remove margin if .alert is the last element in a table column +td .alert:last-child { + margin-bottom: 0; +} + .alert-notice { color: @state-notice-text; background-color: @state-notice-bg; diff --git a/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css b/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css index 3ed38fdfad24..21c7323096a1 100644 --- a/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css +++ b/typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css @@ -7825,6 +7825,9 @@ table#typo3-history-item img { .alert .alert-body p:last-child { margin-bottom: 0; } +td .alert:last-child { + margin-bottom: 0; +} .alert-notice { color: #8c8c8c; background-color: #f2f2f2; -- GitLab