- Make sure that the search form preserves it's "action" (i.e. target page) when reloading (when specifying a derived class). This was breaking the UniversalSearch page.

- Prepare for the style cleanup
- Don't display the menu to create a new 'Email Notification" when listing the notifications sent on a ticket (in the Notifications tab) !

SVN:trunk[1182]
This commit is contained in:
Denis Flaven
2011-04-06 16:39:42 +00:00
parent 8e359682ae
commit 7908b87881
4 changed files with 19 additions and 7 deletions

View File

@@ -319,7 +319,7 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
// Display notifications regarding the object
$iId = $this->GetKey();
$oBlock = new DisplayBlock(DBObjectSearch::FromOQL("SELECT EventNotificationEmail AS Ev JOIN TriggerOnObject AS T ON Ev.trigger_id = T.id WHERE T.target_class IN ('$sClassList') AND Ev.object_id = $iId"), 'list', false);
$oBlock->Display($oPage, 'notifications', array());
$oBlock->Display($oPage, 'notifications', array('menu' => false));
}
}
@@ -1076,7 +1076,8 @@ EOF
$sClassesCombo = MetaModel::GetName($sClassName);
}
$oUnlimitedFilter = new DBObjectSearch($sClassName);
$sHtml .= "<form id=\"fs_{$sSearchFormId}\" action=\"../pages/UI.php\">\n"; // Don't use $_SERVER['SCRIPT_NAME'] since the form may be called asynchronously (from ajax.php)
$sAction = (isset($aExtraParams['action'])) ? $aExtraParams['action'] : '../pages/UI.php';
$sHtml .= "<form id=\"fs_{$sSearchFormId}\" action=\"{$sAction}\">\n"; // Don't use $_SERVER['SCRIPT_NAME'] since the form may be called asynchronously (from ajax.php)
$sHtml .= "<h2>".Dict::Format('UI:SearchFor_Class_Objects', $sClassesCombo)."</h2>\n";
$index = 0;
$sHtml .= "<p>\n";
@@ -1281,9 +1282,10 @@ EOF
$aEventsList[] ='validate';
$aEventsList[] ='keyup';
$aEventsList[] ='change';
$sHeader = '<div class="caselog_input_header">&nbsp;'.Dict::S('UI:CaseLogTypeYourTextHere').'</div>';
$sEditValue = $oAttDef->GetEditValue($value);
$sPreviousLog = $oAttDef->GetAsHTML($value);
$sHTMLValue = "<div style=\"overflow:auto;border:1px #999 solid; background:#fff;\"><table style=\"width:100%\"><tr><td><textarea class=\"resizable\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">$sEditValue</textarea>$sPreviousLog</td><td>{$sValidationField}</td></tr></table></div>";
$sHTMLValue = "<div style=\"overflow:auto;border:1px #999 solid; background:#fff;\"><table style=\"width:100%\"><tr><td>$sHeader<textarea class=\"resizable\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">$sEditValue</textarea>$sPreviousLog</td><td>{$sValidationField}</td></tr></table></div>";
break;
case 'HTML':