mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
(Partial) fix for Trac #285: turn email fields into click-able mailto: hyperlinks.
SVN:trunk[915]
This commit is contained in:
@@ -359,6 +359,7 @@ class AttributeLinkedSet extends AttributeDefinition
|
|||||||
{
|
{
|
||||||
return "ERROR: LIST OF OBJECTS";
|
return "ERROR: LIST OF OBJECTS";
|
||||||
}
|
}
|
||||||
|
public function DuplicatesAllowed() {return false;} // No duplicates for 1:n links, never
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -375,6 +376,7 @@ class AttributeLinkedSetIndirect extends AttributeLinkedSet
|
|||||||
public function IsIndirect() {return true;}
|
public function IsIndirect() {return true;}
|
||||||
public function GetExtKeyToRemote() { return $this->Get('ext_key_to_remote'); }
|
public function GetExtKeyToRemote() { return $this->Get('ext_key_to_remote'); }
|
||||||
public function GetEditClass() {return "LinkedSet";}
|
public function GetEditClass() {return "LinkedSet";}
|
||||||
|
public function DuplicatesAllowed() {$bRet = $this->GetOptional("duplicates", false); echo "<p>Dups: $bRet</p>"; return $bRet;} // The same object may be linked several times... or not...
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1086,6 +1088,11 @@ class AttributeEmailAddress extends AttributeString
|
|||||||
{
|
{
|
||||||
return "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
|
return "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function GetAsHTML($sValue)
|
||||||
|
{
|
||||||
|
return '<a class="mailto" href="mailto:'.$sValue.'">'.parent::GetAsHTML($sValue).'</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -400,7 +400,8 @@ abstract class DBObject
|
|||||||
$aAvailableFields = array();
|
$aAvailableFields = array();
|
||||||
foreach ($aExtKeyFriends as $sDispAttCode => $oExtField)
|
foreach ($aExtKeyFriends as $sDispAttCode => $oExtField)
|
||||||
{
|
{
|
||||||
$aAvailableFields[$oExtField->GetExtAttCode()] = $oExtField->GetAsHTML($this->Get($oExtField->GetCode()));
|
// $aAvailableFields[$oExtField->GetExtAttCode()] = $oExtField->GetAsHTML($this->Get($oExtField->GetCode()));
|
||||||
|
$aAvailableFields[$oExtField->GetExtAttCode()] = $this->Get($oExtField->GetCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$sTargetClass = $oAtt->GetTargetClass(EXTKEY_ABSOLUTE);
|
$sTargetClass = $oAtt->GetTargetClass(EXTKEY_ABSOLUTE);
|
||||||
|
|||||||
@@ -172,6 +172,19 @@ td a.no-arrow:hover {
|
|||||||
padding-left:0px;
|
padding-left:0px;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
}
|
}
|
||||||
|
td a.mailto, td a.mailto:visited {
|
||||||
|
text-decoration:none;
|
||||||
|
color:#000000;
|
||||||
|
padding-left:20px;
|
||||||
|
background: url(../images/mail.png) no-repeat left;
|
||||||
|
}
|
||||||
|
td a.mailto:hover {
|
||||||
|
text-decoration:underline;
|
||||||
|
color:#EB8F00;
|
||||||
|
padding-left:20px;
|
||||||
|
background: url(../images/mail.png) no-repeat left;
|
||||||
|
}
|
||||||
|
|
||||||
a.small_action {
|
a.small_action {
|
||||||
font-family: Tahoma, Verdana, Arial, Helvetica;
|
font-family: Tahoma, Verdana, Arial, Helvetica;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
|
|||||||
BIN
images/mail.png
Normal file
BIN
images/mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 348 B |
Reference in New Issue
Block a user