mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°2657 - MTP : Progress Bar has disappeared (support any code length)
This commit is contained in:
@@ -350,10 +350,10 @@ class ValueSetEnum extends ValueSetDefinition
|
||||
$this->m_values = $Values;
|
||||
}
|
||||
|
||||
// Helper to export the datat model
|
||||
// Helper to export the data model
|
||||
public function GetValueList()
|
||||
{
|
||||
$this->LoadValues($aArgs = array());
|
||||
$this->LoadValues(null);
|
||||
return $this->m_aValues;
|
||||
}
|
||||
|
||||
@@ -382,6 +382,29 @@ class ValueSetEnum extends ValueSetDefinition
|
||||
}
|
||||
}
|
||||
|
||||
class ValueSetEnumPadded extends ValueSetEnum
|
||||
{
|
||||
public function __construct($Values)
|
||||
{
|
||||
parent::__construct($Values);
|
||||
if (is_string($Values))
|
||||
{
|
||||
$this->LoadValues(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->m_aValues = $Values;
|
||||
}
|
||||
$aPaddedValues = array();
|
||||
foreach ($this->m_aValues as $sKey => $sVal)
|
||||
{
|
||||
$sKey = str_pad($sKey, 3, '_', STR_PAD_LEFT);
|
||||
$aPaddedValues[$sKey] = $sKey;
|
||||
}
|
||||
$this->m_values = $aPaddedValues;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixed set values, defined as a range: 0..59 (with an optional increment)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user