From d2c5e57a0132b29f7bffd5b9b669f97028899743 Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Mon, 29 Jan 2018 11:43:13 +0100 Subject: [PATCH] ci server - fix highlighting for build+accept; added highlight in deploy button --- .../deployment/classes/project.class.php | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index d0122f97..58ce86d7 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -2628,19 +2628,30 @@ class project extends base { $sRole = ''; $sOnMouseover = ''; $sOnMouseout = ''; - if ($sFunction == "build") { - $sRole = 'developer'; - $sOnMouseover = '$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');'; - $sOnMouseout = '$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');'; - } - if ($sFunction == "accept") { - $sRole = 'developer'; - if ($sNext == "live") { - $sRole = 'pl'; - // $aLinkdata[$sFunction]['icon']='glyphicon glyphicon-star'; - } - $sOnMouseover = '$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');'; - $sOnMouseout = '$(\'.' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');'; + switch($sFunction){ + case 'accept'; + $sRole = 'developer'; + if ($sNext == "live") { + $sRole = 'pl'; + // $aLinkdata[$sFunction]['icon']='glyphicon glyphicon-star'; + } + $sOnMouseover = '$(\'.td-phase-' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');'; + $sOnMouseout = '$(\'.td-phase-' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');'; + break; + case 'build'; + $sRole = 'developer'; + $sOnMouseover = '$(\'.td-phase-' . $sNext . '.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');'; + $sOnMouseout = '$(\'.td-phase-' . $sNext . '.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');'; + break; + case 'deploy'; + $sRole = 'developer'; + $sOnMouseover = '$(\'.td-phase-' . $sPhase . '.td-place-ready2install.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');' + .'$(\'.td-phase-' . $sPhase . '.td-place-deployed.td' . $this->_aConfig["id"] . '\').addClass(\'highlight\');' + ; + $sOnMouseout = '$(\'.td-phase-' . $sPhase . '.td-place-ready2install.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');' + .'$(\'.td-phase-' . $sPhase . '.td-place-deployed.td' . $this->_aConfig["id"] . '\').removeClass(\'highlight\');' + ; + break; } // $sClass = $sPhase; @@ -2861,7 +2872,7 @@ class project extends base { } if (!$this->isActivePhase($sPhase)) { return ' - <td class="' . $sPhase . ' tdphase ' . $this->_aConfig["id"] . '" colspan="' . count($this->_aPlaces) . '"> + <td class="td-phase-' . $sPhase . ' ' . $this->_aConfig["id"] . '" colspan="' . count($this->_aPlaces) . '"> <div class="versioninfo center inactive"><i class="glyphicon glyphicon-ban-circle"></i> ' . t('inactive') . '</div> </td>'; } -- GitLab