- Small bug fixes after a quick test by performing a clean installation on Windows/IE 8

SVN:trunk[417]
This commit is contained in:
Denis Flaven
2010-05-16 18:46:19 +00:00
parent d95b941d5a
commit 280c8579be
5 changed files with 23 additions and 12 deletions

View File

@@ -198,7 +198,15 @@ class WizardHelper
public function GetIdForField($sFieldName)
{
return $this->m_aData['m_oFieldsMap'][$sFieldName];
$sResult = '';
// It may happen that the field we'd like to update does not
// exist in the form. For example, if the field should be hidden/read-only
// in the current state of the object
if (isset($this->m_aData['m_oFieldsMap'][$sFieldName]))
{
$sResult = $this->m_aData['m_oFieldsMap'][$sFieldName];
}
return $sResult;
}
static function ParseJsonSet($oMe, $sLinkClass, $sExtKeyToMe, $sJsonSet)

View File

@@ -95,8 +95,7 @@ class lnkInfraError extends cmdbAbstractObject
}
if (false)
{
////////////////////////////////////////////////////////////////////////////////////
/**
* n-n link between any Contract and a Document
@@ -131,6 +130,5 @@ class lnkDocumentError extends cmdbAbstractObject
MetaModel::Init_SetZListItems('list', array('doc_id', 'error_name', 'link_type')); // Attributes to be displayed for a list
}
}
}
?>

View File

@@ -1268,7 +1268,7 @@ class AttributeDateTime extends AttributeDBField
}
// Init static constant once for all (remove when PHP allows real static const)
AttributeDate::InitStatics();
AttributeDateTime::InitStatics();
/**

View File

@@ -18,7 +18,6 @@ jQuery.fn.popupmenu = function ()
{
$(this).bind('mouseenter.popup_menu click.popup_menu', function (evt)
{
console.log(evt.type);
var previous_popup = popupmenu;
var bMenuClosed = false;
popupmenu = $(this).find('ul');

View File

@@ -88,12 +88,18 @@ switch($operation)
foreach($oWizardHelper->GetFieldsForAllowedValues() as $sAttCode)
{
$sId = $oWizardHelper->GetIdForField($sAttCode);
$value = $oObj->Get($sAttCode);
$displayValue = $oObj->GetEditValue($sAttCode);
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $value, $displayValue, $sId, '', 0, array('this' => $oObj));
$oWizardHelper->SetAllowedValuesHtml($sAttCode, $sHTMLValue);
if ($sId != '')
{
// It may happen that the field we'd like to update does not
// exist in the form. For example, if the field should be hidden/read-only
// in the current state of the object
$value = $oObj->Get($sAttCode);
$displayValue = $oObj->GetEditValue($sAttCode);
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $value, $displayValue, $sId, '', 0, array('this' => $oObj));
$oWizardHelper->SetAllowedValuesHtml($sAttCode, $sHTMLValue);
}
}
$oPage->add("<script type=\"text/javascript\">\noWizardHelper.m_oData=".$oWizardHelper->ToJSON().";\noWizardHelper.UpdateFields();\n</script>\n");
break;