diff --git a/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php b/typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php index f6a2586d0d1727a8ad6f13871232c84cad7d0eb1..c61876e71fe5ba3d22368e37ac194cfedad64e55 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 09f2e8d1a5343dc5c6db333c93affb8901394aba..fcc2151f2c75aa3dc6e14f308741dd2c2dec0261 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 797afd88b8bc168251f8123a43fe0f070a3c9b49..1367a29cf8e8e458711f6b81eba04c046e953bb8 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 7b87adbda8406c7534edc40ac565508b8133381d..38579fd5ce80f9d5a4c3ca4834282a4eed7f2369 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 7d8744d66879019d765852d2593f2918100a11a1..fd17136aad1639386428a3972bc67441444f068a 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 47b9c6b9a618ef49b2a3bb806fba54feeaf654c6..bd6a51a15f65598d9c06f0fd37cbf2368e948ea1 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 e91666270654d0c083fa74ba2e6e6ca47e4bcc3c..4b5362f2d521caa9d15a65ea4ea790c15e92c845 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 06b79f62aead89c3d59014b475668e78c84d05f8..34584dd7796399b7a12cdd550adf41ac92b140f4 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 187c83a9158893054d138a7d5ba3bcc1d0eb8309..db668d5adc23d9be03540f8c5912f7599af9be36 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 fdf87f181299950a2779df2d7db5639cbdfb0ef7..fcf678e9d49a1939a0e3536934d7ad1b643d42d6 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 e0843e074d9ac1f82c8f2740b5bb42d124a7b286..8983d4a5fde2ee8ad5528dde08a4872051c78d5d 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 75efca86620ff1bc92db08ccaccc0246235d5881..b8ecede227975e0e7744f67e9fa7a6846db39cec 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 187937f1cf2bdfe21ee1166140fc3352d5f7b3e9..984b02bd353952b58223b8e9b981647505b727af 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 8b93243006a01dfeb37334464aff051bac7ee333..0000000000000000000000000000000000000000 --- 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 476e28b47ea4f1f5c6c691ff3c9869106ffaeeaf..71c476ca0de9228cedbce46f534ed26274863123 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 b9cd9895e6e73396b02c7538f864c974efeeab1d..b81451ea36cad019e335a141d406bfc241266727 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 915ded847070e7744a862e2499884943dd7565d0..0000000000000000000000000000000000000000 --- 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 865a26fa58753e721db3ae118765553a34e427f1..4a5744b8589c3189d86f21329b2afe1e70a19f70 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 4b4dfb40123a9ec20c0dfa4cd844becc18963a3d..98ab066cb7a480e77f3b682967037468bb4f06fa 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/Icons/RunTask.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/status_disabled.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/status_failure.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/status_late.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/status_running.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/status_scheduled.png and /dev/null differ 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 Binary files a/typo3/sysext/scheduler/Resources/Public/Images/stop.png and /dev/null differ diff --git a/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js b/typo3/sysext/scheduler/Resources/Public/JavaScript/Scheduler.js index c45c763892db4edaea47f3dc9f0647a78b8367fe..c82a98c54a2219abb7cece8f26abe0ac137ed2ab 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 8394025efe146017dfa2d39501a6fc60a4b95da0..0000000000000000000000000000000000000000 --- 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 5c9d20c1917bb71218f823179849185ffbe8e2c5..270bdb171348de5789a7de3b672764cc2aa82009 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 3ed38fdfad248ea80e89460f7c52e15b3071d8e4..21c7323096a1bc99d1c8af9437013495782c57c6 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;