[FEATURE] Tooltip for next/prev stage icons with stage-title
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 10 Feb 2012 15:31:38 +0000 (16:31 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Mon, 27 Feb 2012 17:28:08 +0000 (18:28 +0100)
ExtJS-tooltip for the next and prev stage icons
are extended with the title of that stage.

Change-Id: I8674c084664a95074a9c3b25d86af2f341999b92
Resolves: #12284
Releases: 4.7
Reviewed-on: http://review.typo3.org/8970
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/workspaces/Classes/Service/GridData.php
typo3/sysext/workspaces/Resources/Public/JavaScript/Store/mainstore.js
typo3/sysext/workspaces/Resources/Public/JavaScript/configuration.js

index 8e8e16f..13725fd 100644 (file)
@@ -121,6 +121,10 @@ class Tx_Workspaces_Service_GridData {
                                        $versionArray['label_Workspace'] = htmlspecialchars(t3lib_befunc::getRecordTitle($table, $versionRecord));
                                        $versionArray['label_Live'] = htmlspecialchars(t3lib_befunc::getRecordTitle($table, $origRecord));
                                        $versionArray['label_Stage'] = htmlspecialchars($stagesObj->getStageTitle($versionRecord['t3ver_stage']));
+                                       $tempStage = $stagesObj->getNextStage($versionRecord['t3ver_stage']);
+                                       $versionArray['label_nextStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
+                                       $tempStage = $stagesObj->getPrevStage($versionRecord['t3ver_stage']);
+                                       $versionArray['label_prevStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
                                        $versionArray['change'] = $pctChange;
                                        $versionArray['path_Live'] = htmlspecialchars(t3lib_BEfunc::getRecordPath($record['livepid'], '', 999));
                                        $versionArray['path_Workspace'] = htmlspecialchars(t3lib_BEfunc::getRecordPath($record['wspid'], '', 999));
index 925eae0..8396709 100644 (file)
@@ -10,6 +10,8 @@ TYPO3.Workspaces.Configuration.StoreFieldArray = [
        {name : 'label_Live'},
        {name : 'label_Workspace'},
        {name : 'label_Stage'},
+       {name : 'label_nextStage'},
+       {name : 'label_prevStage'},
        {name : 'workspace_Title'},
        {name : 'actions'},
        {name : 'icon_Workspace'},
index 7082e8c..b591e83 100644 (file)
@@ -192,15 +192,21 @@ TYPO3.Workspaces.Configuration.Stage = {
        renderer: function(value, metaData, record, rowIndex, colIndex, store) {
                var returnCode = '';
                if (record.json.allowedAction_prevStage && TYPO3.settings.Workspaces.allView !== '1') {
+                       var tempTooltip = TYPO3.Workspaces.Configuration.SendToPrevStageButton.items[0].tooltip;
+                       TYPO3.Workspaces.Configuration.SendToPrevStageButton.items[0].tooltip += ' &quot;'+ record.json.label_prevStage + '&quot;';
                        var prevButton = new Ext.grid.ActionColumn(TYPO3.Workspaces.Configuration.SendToPrevStageButton);
                        returnCode += prevButton.renderer(1, metaData, record, rowIndex, 1, store);
+                       TYPO3.Workspaces.Configuration.SendToPrevStageButton.items[0].tooltip = tempTooltip;
                } else {
                        returnCode += "<span class=\"t3-icon t3-icon-empty t3-icon-empty-empty\">&nbsp;</span>";
                }
                returnCode += record.json.label_Stage;
                if (record.json.allowedAction_nextStage && TYPO3.settings.Workspaces.allView !== '1') {
+                       var tempTooltip = TYPO3.Workspaces.Configuration.SendToNextStageButton.items[1].tooltip;
+                       TYPO3.Workspaces.Configuration.SendToNextStageButton.items[1].tooltip += ' &quot;'+ record.json.label_nextStage + '&quot;';
                        var nextButton = new Ext.grid.ActionColumn(TYPO3.Workspaces.Configuration.SendToNextStageButton);
                        returnCode += nextButton.renderer(2, metaData, record, rowIndex, 2, store);
+                       TYPO3.Workspaces.Configuration.SendToNextStageButton.items[1].tooltip = tempTooltip;
                } else {
                        returnCode += "<span class=\"t3-icon t3-icon-empty t3-icon-empty-empty\">&nbsp;</span>";
                }