本文整理汇总了PHP中HTMLTable::addCellClass方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::addCellClass方法的具体用法?PHP HTMLTable::addCellClass怎么用?PHP HTMLTable::addCellClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTable
的用法示例。
在下文中一共展示了HTMLTable::addCellClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getConfigPopup
/**
* Popup zur Konfiguration eines Servers.
*/
public function getConfigPopup($echo = true)
{
// Button
$BCreate = new Button("Server\nhinzufügen", "new");
$BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
$htmlTableButton = new HTMLTable(1);
$htmlTableButton->addRow($BCreate);
// Liste der konfigurierten Server
$userId = $_SESSION["S"]->getCurrentUser()->getID();
$T = new HTMLTable(1, "xCal Server");
$BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
$BDeleteRaw->style("float: right;");
$serverList = anyC::get("xCal", "xCalUserID", $userId);
$counter = 0;
while ($S = $serverList->getNextEntry()) {
$BDelete = clone $BDeleteRaw;
$BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
$F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
$F->getTable()->setColWidth(1, 120);
$F->setValues($S);
$F->setLabel("xCalName", "Bezeichnung");
$F->setLabel("xCalUrl", "URL");
$F->setLabel("xCalServerActive", "Für den Import verwenden");
$F->setType("xCalServerActive", "checkbox");
$F->useRecentlyChanged();
$F->setSaveClass("xCal", $S->getID(), "''");
$display = "none";
if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
$display = "";
}
$div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span> <br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . " </small>\n\t\t\t\t</div>";
$T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
$T->addRowClass("backgroundColor0");
$T->addCellClass(1, "borderColor1");
$counter++;
}
if ($counter == 0) {
$T->addRow("Keine Server eingetragen!");
}
if ($echo == "" || $echo === true) {
echo $htmlTableButton . $T;
} else {
return $htmlTableButton . $T;
}
}
示例2: getSetTable
function getSetTable($DeviceID, $values)
{
$controls = new HTMLTable(1);
$controls->setTableStyle("width:100%;border:0px;");
$i = 0;
foreach ($values as $v => $l) {
$controls->addRow(array($l));
$controls->addRowClass("backgroundColor0");
$controls->addCellStyle(1, "padding-top:10px;padding-bottom:10px;cursor:pointer;");
if ($i != count($values) - 1) {
$controls->addCellStyle(1, "border-bottom-style:solid;border-bottom-width:1px;");
$controls->addCellClass(1, "borderColor1");
}
$controls->addCellEvent(1, "click", OnEvent::rme($this, "setDevice", array(str_replace(array("D", "H"), "", $DeviceID), "'{$v}'"), "function(){ \$j('#controls_{$DeviceID}').hide(); if(Fhem.doAutoUpdate) Fhem.requestUpdate(); }"));
$i++;
}
$controls = "<div id=\"controls_{$DeviceID}\" style=\"display:none;width:50px;position:absolute;margin-left:150px;border-style:solid;border-width:1px;padding:3px;\" class=\"borderColor1 backgroundColor0 fhemeControl\">{$controls}</div>";
return $controls;
}