30,14 → 30,6 |
protected $urns = array(); |
|
/** |
* <code>true</code> generates form controls for submitting test case |
* results |
* |
* @var bool |
*/ |
protected $testcase = false; |
|
/** |
* The list of language features |
* |
* @var array[Features] |
61,8 → 53,7 |
{ |
$aVars = get_class_vars(get_class($this)); |
|
|
foreach ($aVars as $key => $value) |
while ((list($key, $value) = each($aVars))) |
{ |
if (isset($a[$key])) |
{ |
69,7 → 60,7 |
$this->$key = $a[$key]; |
} |
} |
|
|
/* Inform items of ourself so that URNs can be used for links */ |
if (is_array($this->items)) |
{ |
92,27 → 83,13 |
} |
} |
|
/* |
* Protected properties may be read, but not written |
*/ |
public function __get($property) |
{ |
if (property_exists(get_class($this), $property)) |
{ |
return $this->$property; |
} |
} |
|
public function printHeaders() |
{ |
foreach ($this->versions as $key => $ver) |
foreach ($this->versions as $ver) |
{ |
if ($key || $this->testcase) |
{ |
?> |
<th><?php echo $ver; ?></th> |
<?php |
} |
} |
} |
|
245,7 → 222,7 |
{ |
$aVars = get_class_vars(__CLASS__); |
|
foreach ($aVars as $key => $value) |
while ((list($key, $value) = each($aVars))) |
{ |
if (isset($params[$key])) |
{ |
442,11 → 419,9 |
?></th> |
<?php |
$versions = $this->versions; |
$testcase = false; |
if (!is_null($this->list)) |
{ |
$versions =& $this->list->versions; |
$testcase = $this->list->testcase; |
} |
|
static $row = 0; |
460,15 → 435,13 |
$column++; |
$id = "td$row-$column"; |
$ver = isset($thisVersions[$key]) ? $thisVersions[$key] : ''; |
if ($key || $testcase) |
{ |
?> |
<td<?php |
if (!$key) |
{ |
echo " id='$id'"; |
} |
|
if (!$key) |
{ |
echo " id='$id'"; |
} |
|
echo $this->getAssumed($ver) . $this->getTested($ver); |
|
if (!$key) |
486,7 → 459,7 |
. '"'; |
} |
else |
{ |
{ |
echo ' title="Not applicable: No automated test case' |
. ' is available for this feature. If possible, please' |
. ' click the feature code in the first column to run' |
493,14 → 466,6 |
. ' a manual test."'; |
} |
} |
else |
{ |
echo ' title="' |
. htmlspecialchars( |
preg_replace('/<.*?>/', '', $value), |
ENT_COMPAT, FEATURES_ENCODING) |
. '"'; |
} |
?>><?php |
if ($key) |
{ |
513,15 → 478,14 |
} |
} |
else |
{ |
if (!empty($ver) && $testcase) |
{ |
if (!empty($ver)) |
{ |
?><script type="text/javascript"> |
// <![CDATA[ |
var s = test(<?php echo $ver; ?>, |
'<input title="Supported" name="<?php echo htmlspecialchars($this->title, ENT_COMPAT, FEATURES_ENCODING); ?>" value="+" readonly>', |
'<input title="Not supported" name="<?php echo htmlspecialchars($this->title, ENT_COMPAT, FEATURES_ENCODING); ?>" value="−" readonly>'); |
jsx.tryThis("document.write(s);", |
var s = test(<?php echo $ver; ?>, '<span title="Supported">+<\/span>', |
'<span title="Not supported">−<\/span>'); |
tryThis("document.write(s);", |
"document.getElementById('<?php echo $id; ?>').appendChild(" |
+ "document.createTextNode(s));"); |
// ]]> |
528,13 → 492,12 |
</script><?php |
} |
else |
{ |
{ |
echo '<abbr>N/A</abbr>'; |
} |
} |
?></td> |
<?php |
} |
} |
?> |
</tr> |