[TASK] Style progress bar with Twitter Bootstrap in ext:scheduler 76/34276/2
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 17 Nov 2014 17:43:12 +0000 (18:43 +0100)
committerFelix Kopp <felix-source@phorax.com>
Wed, 19 Nov 2014 19:01:33 +0000 (20:01 +0100)
Resolves: #63036
Releases: master
Change-Id: Iee337cc14a9d64b49484769aab6e263dfc678bea
Reviewed-on: http://review.typo3.org/34276
Reviewed-by: Kai Vogel <kai.vogel@speedprogs.de>
Tested-by: Kai Vogel <kai.vogel@speedprogs.de>
Reviewed-by: Felix Kopp <felix-source@phorax.com>
Tested-by: Felix Kopp <felix-source@phorax.com>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/Resources/Private/Styles/styles.less
typo3/sysext/scheduler/Resources/Public/Styles/styles.css

index 9b73393..3cf3d99 100644 (file)
@@ -425,7 +425,9 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
         */
        protected function renderTaskProgressBar($progress) {
                $progressText = $GLOBALS['LANG']->getLL('status.progress') . ':&nbsp;' . $progress . '%';
-               return '<div class="progress"> <div class="bar" style="width: ' . $progress . '%;">' . $progressText . '</div> </div>';
+               return '<div class="progress">'
+                       . '<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="' . $progress . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $progress . '%;">' . $progressText . '</div>'
+                       . '</div>';
        }
 
        /**
@@ -951,14 +953,14 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
 
                                        if ($this->scheduler->isValidTaskObject($task)) {
                                                // The task object is valid
-                                               $name = htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')');
+                                               $name = '<div class="title">' . htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')') . '</div>';
                                                $additionalInformation = $task->getAdditionalInformation();
                                                if ($task instanceof \TYPO3\CMS\Scheduler\ProgressProviderInterface) {
                                                        $progress = round(floatval($task->getProgress()), 2);
-                                                       $name .= '<br />' . $this->renderTaskProgressBar($progress);
+                                                       $name .= $this->renderTaskProgressBar($progress);
                                                }
                                                if (!empty($additionalInformation)) {
-                                                       $name .= '<br />[' . htmlspecialchars($additionalInformation) . ']';
+                                                       $name .= '<div class="additional-information">[' . htmlspecialchars($additionalInformation) . ']</div>';
                                                }
                                                // Check if task currently has a running execution
                                                if (!empty($schedulerRecord['serialized_executions'])) {
index 891e127..cf98139 100644 (file)
@@ -47,29 +47,6 @@ Scheduler
                font-weight: bold;
        }
 
-       .progress {
-               overflow: hidden;
-               height: 14px;
-               background-color: #DADADA;
-               border-radius: 2px;
-               box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
-               margin: 3px 0px;
-
-               .bar {
-                       width: 0%;
-                       height: 14px;
-                       background-color: #5b5b5b;
-                       background-image: linear-gradient(top,  #7f7f7f 10%,#5b5b5b 100%);
-                       background-repeat: repeat-x;
-                       text-align: left;
-                       color: #fff;
-                       font-size: 8px;
-                       vertical-align: top;
-                       padding-left: 3px;
-                       padding-top: -1px;
-               }
-       }
-
 }
 
 /* Definition for BE function "Setup check" */
index a1a344d..075d0d3 100644 (file)
@@ -35,27 +35,6 @@ Scheduler
   padding-bottom: 5px;
   font-weight: bold;
 }
-.tx_scheduler_mod1 .progress {
-  overflow: hidden;
-  height: 14px;
-  background-color: #DADADA;
-  border-radius: 2px;
-  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
-  margin: 3px 0px;
-}
-.tx_scheduler_mod1 .progress .bar {
-  width: 0%;
-  height: 14px;
-  background-color: #5b5b5b;
-  background-image: linear-gradient(top, #7f7f7f 10%, #5b5b5b 100%);
-  background-repeat: repeat-x;
-  text-align: left;
-  color: #fff;
-  font-size: 8px;
-  vertical-align: top;
-  padding-left: 3px;
-  padding-top: -1px;
-}
 /* Definition for BE function "Setup check" */
 .info-block {
   margin: 25px 0px 0px 0px;