function getHTML($id) { $BC = new Button("Abbrechen", "stop"); $BC->style("margin:10px;float:right;"); $BC->onclick("\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing'); });"); $gui = new HTMLGUIX($this); $gui->name("Bricklet"); $gui->type("TinkerforgeBrickletTinkerforgeID", "hidden"); $gui->type("TinkerforgeBrickletType", "select", self::$types); $gui->addToEvent("onSave", "\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ " . OnEvent::reloadPopup("Tinkerforge") . " }); }); "); return $BC . "<div style=\"clear:both;\"></div>" . $gui->getEditHTML(); }
public function browser() { $BA = new Button("Eintrag\nhinzufügen", "new"); $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass())); $BA->style("margin:10px;"); $cols = 3 + count($this->colsLeft) + count($this->colsRight); $TE = new HTMLTable($cols, "Einträge"); $TE->setColWidth(1, 20); $TE->setColWidth($cols, 20); $TE->useForSelection(false); $TE->maxHeight(400); $TE->weight("light"); $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic"); $autoLoad = false; while ($A = $this->object->getNextEntry()) { $BD = new Button("Eintrag löschen", "trash_stroke", "iconic"); $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');"); $isEmpty = false; if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") { $autoLoad = $A->getID(); $isEmpty = true; } if (!$isEmpty) { $div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A)); } else { $div = "Neuer Eintrag"; } $row = array(); $row[] = $BD; $row[] = $div; foreach ($this->colsRight as $col) { $c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A)); $row[] = $c; } $row[] = $BE; $TE->addRow($row); $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });"; $TE->addCellEvent(2, "click", $action); $TE->addCellID(2, "popupEntryID" . $A->getID()); $TE->addCellEvent(count($row), "click", $action); } if ($this->object->numLoaded() == 0) { $TE->addRow("Keine Einträge"); $TE->addRowColspan(1, 3); } return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : ""); }
/** * 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; } }
public function bricklets() { $BA = new Button("Bricklet\nhinzufügen", "new"); $BA->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BA->rmePCR("Tinkerforge", $this->getID(), "createNew", "", OnEvent::reloadPopup("Tinkerforge")); $BA->style("margin:10px;"); $TE = new HTMLTable(4, "Bricklets"); $TE->setColWidth(1, 20); $TE->setColWidth(2, 35); $TE->setColWidth(4, 20); $TE->useForSelection(false); $TE->maxHeight(400); $TE->weight("light"); $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic"); $autoLoad = false; $AC = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $this->getID()); while ($A = $AC->getNextEntry()) { $B = new Button("Master", "bars", "iconicL"); $B->popup("", "Plot", "TinkerforgeBricklet", $A->getID(), "getControls", "", "", "{width:820}"); $B->style("float:right;"); $BD = new Button("Eintrag löschen", "trash_stroke", "iconic"); $BD->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BD->onclick("deleteClass('TinkerforgeBricklet','" . $A->getID() . "', function() { Popup.refresh('Tinkerforge'); },'Eintrag wirklich löschen?');"); if ($A->A("TinkerforgeBrickletUID") == "") { $autoLoad = $A->getID(); } $div = "<span id=\"TinkerforgeBrickletUID" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neues Bricklet") . "</span> <br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"TinkerforgeBrickletType" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletType") != "" ? TinkerforgeBricklet::$types[$A->A("TinkerforgeBrickletType")] : "") . "</small>"; $TE->addRow(array($BD, $B, $div, $BE)); $TE->addCellEvent(3, "click", "contentManager.selectRow(this); \$j('#editDetailsTinkerforge').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("editAP", "TinkerforgeBricklet", $A->getID(), "0", "function(){ \$j('#editAP').fadeIn(); }") . " });"); } if ($AC->numLoaded() == 0) { $TE->addRow("Keine Bricklets eingetragen"); $TE->addRowColspan(1, 3); } echo "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"editAP\"></div>\n\t\t\t<div id=\"listAP\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#TinkerforgeBrickletUID" . $autoLoad . "').parent().trigger(Touch.trigger);") : ""); }
public function getPopup() { $bps = $this->getMyBPSData(); $gui = $this->getGUI($this->getID()); $onSave = "Popup.close('LoginData', 'edit');"; #$gui->setJSEvent("onSave", "function() { Popup.close('', 'mailServer'); contentManager.reloadFrame('contentRight'); }"); #$gui->setStandardSaveButton($this,"mLoginData"); $gui->displayMode("popup"); $gui->label("server", "Server"); $gui->label("passwort", "Passwort"); $html = ""; #$html2 = ""; if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "mailServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "MailServerUserPass"); $gui->descriptionField("server", "Für eine verschlüsselte Verbindung tragen Sie ein: Protokoll://server.de:Port<br />Also zum Beispiel tls://smtp.1und1.de:465 oder tls://smtp.strato.de:465"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "jabberServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "JabberServerUserPass"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AWS") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "AWSUserPass"); $gui->label("benutzername", "Access key"); $gui->label("passwort", "Secret key"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "regID") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $gui->type("server", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "RegIDUserPass"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and strpos($bps["preset"], "mailServerAdditional") !== false) { $Nr = str_replace("mailServerAdditional", "", $bps["preset"]); $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn eine Absender-Domain nicht über den Standard-Mailserver verschickt werden kann.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "MailServer{$Nr}UserPass"); $gui->label("optionen", "Absender-Domain"); $onSave .= OnEvent::reloadPopup("mInstallation"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "remoteMailServer1" or $bps["preset"] == "remoteMailServer2" or $bps["preset"] == "remoteMailServer3")) { $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "RemoteMailServer" . substr($bps["preset"], -1) . "APIKey"); $gui->type("optionen", "hidden"); $gui->type("passwort", "hidden"); $gui->label("benutzername", "API key"); $gui->descriptionField("server", "Der Pfad zur openMM-Installation inklusive Protokollangabe. Zum Beispiel https://www.meinMailserver.de/openMM"); $onSave .= OnEvent::reloadPopup("mVUser"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupFTPServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen FTP-Server hochladen möchten.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "BackupFTPServerUserPass"); $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll"); $gui->label("optionen", "Verzeichnis"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupSFTPServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen SFTP-Server hochladen möchten.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "BackupSFTPServerUserPass"); $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll"); $gui->label("optionen", "Verzeichnis"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "googleData" or $bps["preset"] == "GoogleAccountUserPass")) { $html = "<p>Bitte beachten Sie: Es werden nur Ihre eigenen Termine synchronisiert.</p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", Session::currentUser()->getID()); $gui->type("name", "hidden"); $this->changeA("name", "GoogleAccountUserPass"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AnySMSUserPass") { $html = ""; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "AnySMSUserPass"); #$gui->type("optionen", "hidden"); #$gui->type("server", "hidden"); $gui->label("server", "Gateway"); $gui->label("optionen", "Absender"); $gui->descriptionField("optionen", "Dies ist vom gewählten Gateway abhängig."); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "klickTelAPIKey") { $html = ""; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->label("benutzername", "API-Key"); $gui->type("name", "hidden"); $this->changeA("name", "klickTelAPIKey"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); $gui->type("passwort", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "adServer") { $this->changeA("UserID", "-1"); $this->changeA("name", "ADServerUserPass"); #$html = ""; /* $gui->label("benutzername", "API-Key"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); $gui->type("passwort", "hidden");*/ $gui->type("name", "hidden"); $gui->type("UserID", "hidden"); $gui->label("server", "AD-Server"); $gui->label("optionen", "Benutzer-Pfad"); $gui->descriptionField("benutzername", "Mit Domain-Name. Z.B. Administator@Furtmeier.dom"); $gui->descriptionField("optionen", "Bitte geben Sie den LDAP-Pfad zum Benutzer-Verzeichnis ein. Z.B. OU=Benutzer,DC=furtmeier,DC=dom"); $onSave = "Popup.close('Users', 'edit');"; } #$gui->label("benutzername", "Benutzername"); $gui->addToEvent("onSave", $onSave); echo $html . $gui->getEditHTML(); }
public function getListTable() { $T = new HTMLTable(2, "Gerichte"); $T->maxHeight(480); $T->setColWidth(2, 30); $T->weight("light"); $T->useForSelection(false); $AC = anyC::get("Gericht"); $AC->addAssocV3("GerichtAdded", ">", "0"); while ($E = $AC->getNextEntry()) { $BT = new Button("Löschen", "trash_stroke", "iconicL"); $BT->onclick(OnEvent::rme($this, "reMoveItem", $E->getID(), OnEvent::reloadPopup("mGericht"))); $T->addRow(array($E->A("GerichtName"), $BT)); $T->addRowStyle("font-size:20px;"); #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }")); } if ($AC->numLoaded() == 0) { $T->addRow(array("Die Liste enthält keine Einträge.")); $T->addRowColspan(1, 2); } return $T; }
public function setTableMode($TM) { if ($TM == null) { $TM = "BrowserRight"; } $this->tableMode = $TM; if ($this->tableMode == "CRMSubframeContainer") { $this->showFlipPage = false; $this->functionPageSpecific = $this->functionPagePrevious = $this->functionPageNext = $this->functionPageLast = $this->functionPageFirst = "contentManager.loadFrame('subFrameContainer{$this->collectionName}', '{$this->collectionName}', -1, %PAGE);"; } if ($this->tableMode == "BrowserLeft") { $this->multiPageDetails["target"] = "contentLeft"; $this->addToEvent("onDelete", "contentManager.reloadFrame('contentLeft');"); } if ($this->tableMode == "BrowserRight") { $this->multiPageDetails["target"] = "contentRight"; } if ($this->tableMode == "screen") { $this->multiPageDetails["target"] = "contentScreen"; } if ($this->tableMode == "popup") { $this->functionPageFirst = OnEvent::reloadPopup($this->collectionName, "", "0"); $this->functionPageLast = OnEvent::reloadPopup($this->collectionName, "", "%PAGE"); $this->functionPageNext = OnEvent::reloadPopup($this->collectionName, "", "%PAGE"); $this->functionPagePrevious = OnEvent::reloadPopup($this->collectionName, "", "%PAGE"); $this->functionPageSpecific = OnEvent::reloadPopup($this->collectionName, "", "%PAGE"); } }
public static function parserDefault($w, $E) { $I = new HTMLInput("isDefault", "checkbox", $E->getID() == self::$fieldDefaultFile[1] ? "1" : "0"); $I->onchange(OnEvent::rme(self::$fieldDefaultFile[0], "saveMultiEditField", array("'" . self::$fieldDefaultFile[2] . "'", "this.checked ? '" . $E->getID() . "' : ''"), OnEvent::reloadPopup("mFile"), "", OnEvent::reloadPopup("mFile"))); return $I; }
public function browser() { $BA = new Button("Eintrag\nhinzufügen", "new"); $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass())); $BA->style("margin:10px;"); if (!$this->showNew) { $BA = ""; } $cols = ($this->showTrash ? 1 : 0) + ($this->showEdit ? 1 : 0) + 1 + count($this->colsLeft) + count($this->colsRight); $TE = new HTMLTable($cols, "Einträge"); if ($this->showTrash) { $TE->setColWidth(1, 20); } if ($this->showEdit) { $TE->setColWidth($cols, 20); $TE->useForSelection(false); } $TE->maxHeight(400); $TE->weight("light"); $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic"); $autoLoad = false; while ($A = $this->object->getNextEntry()) { $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });"; $BD = new Button("Eintrag löschen", "trash_stroke", "iconic"); $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });"); $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');"); $isEmpty = false; if ($this->emptyCheckField != null and !is_array($this->emptyCheckField) and $A->A($this->emptyCheckField) == $this->emptyCheckValue) { $autoLoad = $action; $isEmpty = true; } if ($this->emptyCheckField != null and is_array($this->emptyCheckField)) { $ec = 0; foreach ($this->emptyCheckField as $field) { if ($A->A($field) != "") { continue; } $autoLoad = $action; $isEmpty = true; $ec++; } $isEmpty = $ec == count($this->emptyCheckField); } if (!$isEmpty) { $obj = get_class($this->object); $meth = $this->parsers["main"]; if (strpos($this->parsers["main"], "::")) { $ex = explode("::", $this->parsers["main"]); $obj = $ex[0]; $meth = $ex[1]; } $div = Util::invokeStaticMethod($obj, $meth, array($A)); #($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neuer Eintrag"); } else { $div = "Neuer Eintrag"; } $row = array(); if ($this->showTrash) { $row[] = $BD; } $row[] = $div; foreach ($this->colsRight as $col) { $obj = get_class($this->object); $meth = $col[0]; if (strpos($col[0], "::")) { $ex = explode("::", $col[0]); $obj = $ex[0]; $meth = $ex[1]; } $row[] = Util::invokeStaticMethod($obj, $meth, array($A)); } if ($this->showEdit) { $row[] = $BE; } $TE->addRow($row); if ($this->showTrash) { $TE->addCellStyle(1, "vertical-align:top;"); } #$TE->addCellEvent(2, "click", $action); if ($this->showEdit) { $TE->addCellID(count($row), "popupEntryID" . $A->getID()); $TE->addCellStyle(count($row), "vertical-align:top;"); $TE->addCellEvent(count($row), "click", $action); } } if ($this->object->numLoaded() == 0) { $TE->addRow("Keine Einträge"); $TE->addRowColspan(1, $cols); } return "{$BA}\n\t\t\t<div style=\"float:right;width:calc(100% - 400px);height:500px;display:none;background-color:#f4f4f4;overflow:auto;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script($autoLoad) : ""); }
public function getListTable() { $T = new HTMLTable(2); $T->maxHeight(400); $T->setColWidth(2, 30); $T->weight("light"); $T->useForSelection(false); $AC = anyC::get("Einkaufszettel", "EinkaufszettelBought", "0"); $AC->addOrderV3("EinkaufszettelTime", "DESC"); while ($E = $AC->getNextEntry()) { $BT = new Button("Löschen", "trash_stroke", "iconicL"); #$BT->onclick(); $T->addRow(array(($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : ""), $BT)); $T->addRowStyle("font-size:20px;"); $T->addRowEvent("click", OnEvent::rme($E, "deleteMe", "", OnEvent::reloadPopup("mEinkaufszettel"))); #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }")); } if ($AC->numLoaded() == 0) { $T->addRow(array("Die Einkaufsliste enthält keine Einträge.")); $T->addRowColspan(1, 2); } return $T . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());"); }