本文整理汇总了PHP中Button::rmePCR方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::rmePCR方法的具体用法?PHP Button::rmePCR怎么用?PHP Button::rmePCR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::rmePCR方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTML
function getHTML($id)
{
$B = new Button("Element\nlöschen", "trash", "icon");
$B->rmePCR("poolAnzeigeControl", $this->getID(), "deleteMe", "", OnEvent::closePopup("poolAnzeigeControl") . OnEvent::reload("Screen"));
$B->style("margin:10px;");
$gui = new HTMLGUIX($this);
$gui->name("Element");
$gui->displayMode("popupS");
$gui->attributes(array("poolAnzeigeControlCaption", "poolAnzeigeControlLabel", "poolAnzeigeControlNewLine", "poolAnzeigeControlClass", "poolAnzeigeControlSrc", "poolAnzeigeControlServer", "poolAnzeigeControlMaster", "poolAnzeigeControlValue", "poolAnzeigeControlUpdate", "poolAnzeigeControlGroup", "poolAnzeigeControlGroupDelay", "poolAnzeigeControlGroupDelayIf"));
$gui->label("poolAnzeigeControlNewLine", "Neue Zeile");
$gui->label("poolAnzeigeControlCaption", "Überschrift");
$gui->label("poolAnzeigeControlLabel", "Beschriftung");
$gui->label("poolAnzeigeControlOrder", "Reihenfolge");
$gui->label("poolAnzeigeControlClass", "Klasse");
$gui->label("poolAnzeigeControlSrc", "Bild");
$gui->label("poolAnzeigeControlServer", "Steuerung");
$gui->label("poolAnzeigeControlGroupDelay", "Verzögerung in s");
$gui->label("poolAnzeigeControlGroup", "Eigene Gruppe");
$gui->label("poolAnzeigeControlUpdate", "Update Gruppe(n)");
$gui->label("poolAnzeigeControlGroupDelayIf", "Wenn");
$gui->type("poolAnzeigeControlNewLine", "checkbox");
$gui->type("poolAnzeigeControlServer", "readonly");
$gui->type("poolAnzeigeControlClass", "select", array("manual" => "Statisch", "load" => "Laden", "value" => "Wert"));
$gui->type("poolAnzeigeControlGroupDelayIf", "select", array("" => "ohne", "on" => "Ein"));
if ($this->A("poolAnzeigeControlMasterValues") != "") {
$gui->type("poolAnzeigeControlMaster", "select", poolAnzeigeControl::values($this->A("poolAnzeigeControlMasterValues")));
}
$gui->descriptionField("poolAnzeigeControlUpdate", "Mehrere Gruppen durch Komma trennen");
$gui->descriptionField("poolAnzeigeControlNewLine", "Fügt eine neue Zeile vor dem Element ein");
$gui->space("poolAnzeigeControlClass");
$gui->space("poolAnzeigeControlServer");
$gui->space("poolAnzeigeControlUpdate");
return $B . $gui->getEditHTML();
}
示例2: showInfo
function showInfo($name, $language)
{
$Ad = new thetvdbcomAdapter();
$info = $Ad->getInfo($name, $language);
if ($info === null) {
die("<p>Sorry, there is no information available for '{$name}({$language})'</p>");
}
BPS::setProperty("NewSeriesGUI", "loadBanner", str_replace("http://", "", $info->Banner));
$B = new Button("save\nseries", "./trinityDB/Serien/Serien.png");
$B->rmePCR("Serie", "-1", "newSeriesFromID", array("'{$info->Name}'", "'{$language}'", "'{$info->SeriesID}'"), "contentManager.loadFrame('contentLeft', 'Serie', transport.responseText);");
#$B->style("float:right;");
echo "\n\t\t\t<div style=\"margin-left:10px;width:765px;border-right-width:1px;border-right-style:solid;\" class=\"borderColor1\">\n\t\t\t\t{$B}\n\t\t\t\t<div style=\"height:20px;\"></div>\n\t\t\t\t<img src=\"" . DBImageGUI::imageLink("NewSeriesGUI", "loadBanner" . $info->SeriesID, "Banner") . "\" style=\"width:758px;height:140px;\" /><br />\n\t\t\t\t<p style=\"-moz-column-count: 3;-moz-column-gap: 1em;-moz-column-rule: 1px solid black;-webkit-column-count: 3;-webkit-column-gap: 1em;-webkit-column-rule: 1px solid black;\">" . $info->Overview . "</p>\n\t\t\t</div>";
}
示例3: getHTML
function getHTML($id)
{
$this->loadMeOrEmpty();
$gui = new HTMLGUI2();
$gui->setObject($this);
$gui->setName("Serie");
$gui->setShowAttributes(array("name", "sprache", "dir", "lastupdate", "genre", "description", "status", "quality", "RSSFilterID", "altFeedName1", "altFileName1"));
#$gui->setType("adapter", "hidden");
#$gui->setType("lastupdate", "readonly");
#$gui->setType("siteID", "hidden");
#$gui->setType("url", "hidden");
$gui->setType("description", "textarea");
$gui->setLabel("sprache", "Language");
$gui->setLabel("lastupdate", "Last update");
$gui->setLabel("RSSFilterID", "RSS feed");
$gui->setLabel("altFileName1", "alt. file name");
$gui->setLabel("altFeedName1", "alt. feed name");
$gui->setFieldDescription("altFileName1", "This is useful if the filenames do not match the full series name. trinityDB will then look for both names on the harddrive. For example 'switch' instead of 'Switch Reloaded'.");
$gui->setFieldDescription("altFeedName1", "This is useful if the feed names do not match the full series name. trinityDB will then look for both names in the feeds. For example 'Human.Target.2010' instead of 'Human Target (2010)'.");
$gui->setParser("lastupdate", "SerieGUI::lastUpdateParser");
$gui->setType("quality", "select");
$gui->setOptions("quality", array_keys(self::getQualities()), array_values(self::getQualities()));
$gui->setType("sprache", "select");
$gui->setOptions("sprache", array("en", "de"), array("english", "deutsch"));
$gui->setStandardSaveButton($this);
$gui->insertSpaceAbove("RSSFilterID");
$gui->selectWithCollection("RSSFilterID", new mRSSFilterGUI(), "RSSFilterName", "none");
$tab = new HTMLSideTable("right");
$B = new Button("Download\nepisodes", "./trinityDB/Serien/Updates.png");
#$B->rmePCR("Serie", $this->ID, "downloadEpisodes", array("'1'"), "Popup.display('Download-Status', transport);");
$B->popup("", "Download-Status", "Serie", $this->ID, "downloadEpisodes", array("'1'"));
$S = new Button("Settings", "./images/i2/settings.png");
$S->type("icon");
$S->style("float:right;margin-right:-20px;");
$S->contextMenu("Serie", "download", "Settings");
$tab->addRow($S . $B);
$B = new Button("Show\nepisodes", "./trinityDB/Serien/Folge.png");
$B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $this->getID() . "');");
$tab->addRow($B);
#$B = new Button("Find new\nepisodes","./trinityDB/RSSFilter/RSSFilter.png");
#$B->rmePCR("Serie", $this->ID, "checkRSS", "", "Popup.display('Episoden-Status', transport);");
#$tab->addRow($B);
$B = new Button("Check\nepisodes", "okCatch");
$B->rmePCR("Serie", $this->ID, "checkAllEpisodes", "", "Popup.display('Episoden-Status', transport);");
$tab->addRow($B);
$Image = new Button("", DBImageGUI::imageLink("Serie", $this->getID(), "cover", false, true), "icon");
$Image->style("width:150px;");
$tab->addRow(array($Image));
return $tab . $gui->getEditHTML();
}
示例4: browser
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);") : "");
}
示例5: 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;
}
}
示例6: getHTML
function getHTML($id)
{
$this->loadMeOrEmpty();
$gui = new HTMLGUI();
$gui->setObject($this);
$gui->setName("Preset");
$gui->selectWithCollection("FhemPresetServerID", new mFhemServerGUI(), "FhemServerName");
$gui->setLabel("FhemPresetServerID", "Server");
$gui->setLabel("FhemPresetName", "Name");
$gui->setType("FhemPresetHide", "checkbox");
$gui->setLabel("FhemPresetHide", "Hide?");
$gui->setType("FhemPresetNightOnly", "checkbox");
$gui->setLabel("FhemPresetNightOnly", "Night only?");
$gui->setLabel("FhemPresetLocationID", "Location");
$gui->setLabel("FhemPresetRunOn", "run on");
$gui->settype("FhemPresetLocationID", "select");
$gui->selectWithCollection("FhemPresetLocationID", new mFhemLocationGUI(), "FhemLocationName");
$gui->setFieldDescription("FhemPresetRunOn", "The event that triggers this Preset. For example HomeStatus:here will trigger this Preset when the dummy 'HomeStatus' is set to 'here'. The Preset will create its own dummy if this field is empty.");
$gui->setStandardSaveButton($this, "mFhemPreset");
#$gui->setIsDisplayMode(true);
#$gui->setShowAttributes(array("name"));
$gui->setShowAttributes(array("FhemPresetServerID", "FhemPresetLocationID", "FhemPresetName", "FhemPresetRunOn", "FhemPresetHide", "FhemPresetNightOnly"));
$desc = new HTMLTable(1);
$desc->addRow("For the \"Night only\"-option to work correctly you might want to set <code>{sunrise_coord(\"10.873799\",\"48.699495\",\"Europe/Berlin\")}</code> in the <code>fhem.cfg</code>-file. With your own coordinates/timezone of course.");
if ($id == -1) {
return $gui->getEditHTML() . $desc;
}
$_SESSION["BPS"]->registerClass("mFhemSelection");
$_SESSION["BPS"]->setACProperty("selectionServerID", $this->A->FhemPresetServerID);
$B = new Button("add Device", "./fheME/Fhem/fhem.png");
$B->select("false", "mFhem", "FhemPreset", $this->ID, "addDevice");
$BW = new Button("add custom", "backup");
$BW->rmePCR("FhemPreset", $this->ID, "addWait", "", "contentManager.reloadFrame('contentLeft');");
$BW->style("float:right;");
$t = new HTMLTable(1);
$t->addRow($BW . $B);
$_SESSION["CurrentAppPlugins"]->addClass("Presets", "mFhemPreset");
$mFE = new mFhemEventGUI();
$mFE->addJoinV3("Fhem", "FhemEventFhemID", "=", "FhemID");
$mFE->addAssocV3("FhemEventPresetID", "=", $this->ID);
return $gui->getEditHTML() . $desc . "<div style=\"height:30px;\"></div>" . $t . $mFE->getHTML(-1) . "<div style=\"height:30px;\"></div>";
}
示例7: getHTML
public function getHTML($id, $page)
{
$this->addOrderV3("name");
$this->filterCategories();
$this->loadMultiPageMode($id, $page, 0);
$gui = new HTMLGUIX($this);
$gui->version("mSerie");
$gui->options(true, true, true, true);
$gui->name("Serie");
$gui->attributes(array("name", "sprache"));
$gui->parser("name", "mSerieGUI::nameParser");
$Tab = new HTMLSideTable("left");
$B = new Button("check for\nupdates", "./trinityDB/Serien/Updates.png");
$B->rmePCR("mSerie", "", "checkUpdates", "", "Popup.display('Updates', transport);");
$Tab->addRow($B);
try {
return ($id == -1 ? $Tab : "") . $gui->getBrowserHTML($id);
} catch (Exception $e) {
}
}
示例8: editInWindow
public function editInWindow($UDID)
{
$T = new HTMLTable(1);
$B = new Button("Desktop-Link\nlöschen", "trash");
$B->onclick("");
$B->style("float:right;");
$B->rmePCR("DesktopLink", "", "delete", $UDID, "if(checkResponse(transport)){ Popup.close('', 'DesktopLinkPopup'); DesktopLink.loadContent(true); }");
$T->addRow($B);
$T->addRowClass("backgroundColor0");
$UD = new Userdata($UDID);
$F = new HTMLForm("DesktopLinkEdit", array("order", "symbol", "name", "UDID"), "Bearbeiten:");
$F->setSaveRMEP("Desktop-Link speichern", "./images/i2/save.gif", "DesktopLink", "{$UDID}", "save", "if(checkResponse(transport)){ Popup.close(\\'\\', \\'DesktopLinkPopup\\'); DesktopLink.loadContent(true); }");
$v = explode(";", $UD->A("wert"));
$F->setValue("order", $v[0]);
$F->setValue("symbol", $v[1]);
$F->setValue("name", $v[2]);
$F->setValue("UDID", $UDID);
$F->setType("UDID", "hidden");
$F->setType("order", "hidden");
$F->setType("symbol", "hidden");
echo $T . $F;
}
示例9: EMailPopup
/**
* Method to display an E-Mail popup for easy E-Mail sending
*
* Requires a method named "getEMailData" in $dataClass which returns an array:
* array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
*
* Will call $dataClass($dataClassID)::sendEmail afterwards
*
* @param string $dataClass
* @param string $dataClassID
*/
public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null)
{
$c = new $dataClass($dataClassID);
$data = $c->getEMailData($callbackParameter);
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
$tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>");
if (count($data["recipients"]) == 1) {
$tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small><" . $data["recipients"][0][1] . "></small>");
} else {
$recipients = array();
foreach ($data["recipients"] as $ID => $Rec) {
$recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID);
}
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
$tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
$tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
$tab->addRowColspan(1, 2);
$tab->addRowClass("backgroundColor0");
if ($onSuccessFunction == null) {
$onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
}
$BAbort = new Button("Abbrechen", "stop");
$BAbort->onclick("Popup.close('Util', 'edit');");
$BAbort->style("margin-bottom:10px;margin-top:10px;");
$BGo = new Button("E-Mail\nsenden", "okCatch");
$BGo->style("float:right;margin-top:10px;");
$BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
#$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
$tab->addRow(array($BGo . $BAbort));
$tab->addRowColspan(1, 2);
#$tab->addRowClass("backgroundColor0");
echo $tab;
}
示例10: bricklets
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);") : "");
}
示例11: reminderList
public function reminderList()
{
#$T = new HTMLTable(2);
#$T->setTableStyle("width:100%;");
#$T->setColWidth(1, "30%");
$B = $this->reminderCheck();
$R = array();
$Kal = new Kalender();
foreach ($B as $E) {
switch (get_class($E)) {
case "KalenderEvent":
$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'" . $E->UID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", $E->summary() != "" ? addslashes($E->summary()) : "Keine Beschreibung") . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tKalender\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . $E->title() . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($Kal->parseTime($E->getTime())) . " - " . Util::CLTimeParser($Kal->parseTime($E->getEndTime())) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
break;
case "Aufgabe":
$id = "Aufgabe_" . $E->getID();
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'Aufgabe'", "'" . $E->getID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", addslashes(nl2br($E->A("AufgabeText")))) . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tAufgabe\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . mb_substr($E->A("AufgabeText"), 0, 30) . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($E->A("AufgabeUhrzeitVon")) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
/*$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'".$E->UID()."'"), "function(){ \$j('#bottom').html(''); \$j('#$id').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array(
$id,
"<div class=\"event\" id=\"$id\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('".str_replace("\n", "", addslashes($E->summary()))."');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">
<div style=\"width:15%;display:inline-block;vertical-align:top;\">
Kalender
</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">
".$E->title()."
</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">
".Util::CLTimeParser($Kal->parseTime($E->getTime()))." - ".Util::CLTimeParser($Kal->parseTime($E->getEndTime()))." Uhr"."
</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">
$BD
</div>
</div>"
);*/
break;
}
}
echo json_encode($R, JSON_UNESCAPED_UNICODE);
}
示例12: buildFilteredWarningLine
public function buildFilteredWarningLine($label = null)
{
$dB = new Button("Filter löschen", "./images/i2/delete.gif", "icon");
$dB->style("float:right;");
$dB->rmePCR("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->collectionName}'"), "if(checkResponse(transport)) contentManager.reloadFrame('contentRight');");
$BW = new Button("", "./images/i2/note.png", "icon");
if ($this->tableMode == "popup") {
$dB->style("");
$dB->rmePCR("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->collectionName}'"), OnEvent::reloadPopup($this->collectionName));
$BW->style("margin-right:5px;float:left;");
$wholeLine2 = array("{$BW}<span style=\"color:grey;\">Die Anzeige wurde gefiltert " . ($label != null ? "nach {$label}" : "") . "</span>");
for ($i = 1; $i < count($this->referenceLine) - 1; $i++) {
$wholeLine2[] = "";
}
$wholeLine2[] = $dB;
$this->table->addRow($wholeLine2);
$this->table->addRowColspan(1, count($this->referenceLine) - 1);
$this->table->addRowClass("backgroundColor0");
} else {
$wholeLine2 = array($BW, $dB . "<span style=\"color:grey;\">Die Anzeige wurde gefiltert " . ($label != null ? "nach {$label}" : "") . "</span>");
$this->table->addRow($wholeLine2);
$this->table->addRowColspan(2, count($this->referenceLine) - 1);
$this->table->addRowClass("backgroundColor0");
}
}
示例13: rolesPopup
public function rolesPopup($UserID)
{
echo "<p class=\"highlight\">Die Rollen fassen mehrere Berechtigungen aus unterschiedlichen Plugins zusammen.</p><div style=\"max-height:400px;overflow:auto;\">";
$ps = $_SESSION["CurrentAppPlugins"]->getAllPlugins();
foreach ($this->roles() as $R => $O) {
$T = new HTMLTable(3, $R);
$T->weight("light");
$T->setColWidth(1, 70);
$T->setColWidth(3, 30);
$i = 0;
foreach ($O as $c => $s) {
if ($c == "cantEdit" or $c == "cantDelete" or $c == "cantCreate") {
foreach ($s as $p) {
if ($p == "WAdresse") {
continue;
}
if ($c == "cantEdit") {
$T->addRow(array($p, "Kann nicht bearbeiten"));
}
if ($c == "cantDelete") {
$T->addRow(array($p, "Kann nicht löschen"));
}
if ($c == "cantCreate") {
$T->addRow(array($p, "Kann nicht erstellen"));
}
}
continue;
}
if ($c == "hidePlugin") {
foreach ($s as $p) {
$T->addRow(array(array_search($p, $ps), "Plugin ausblenden"));
}
continue;
}
$B = new Button("Rolle aktivieren", "./plugins/Userdata/role.png", "icon");
$B->rmePCR("mUserdata", "-1", "rolesActivate", array($UserID, "'{$R}'"), OnEvent::reload("Left"));
$class = new $c();
$pSs = $class->getPluginSpecificRestrictions();
$l = "";
foreach ($s as $k => $p) {
$l .= ($k > 0 ? "<br>" : "") . $pSs[$p];
}
$T->addRow(array(array_search($c, $ps) . ":", $l, $i == 0 ? $B : ""));
if ($i == 0) {
$T->addColStyle(3, "vertical-align:top;");
$T->addColRowspan(3, 3);
}
$i++;
}
#$T->addRow(array($l, $B));
#$T->addColStyle(2, "vertical-align:top;");
echo $T;
}
echo "</div>";
}
示例14: getInfo
function getInfo($time)
{
$BE = "";
$BD = "";
$BDS = "";
if ($this->editable != null) {
if ($this->editable[0] != null) {
$BE = new Button("Bearbeiten", "edit", "icon");
$BE->style("margin:10px;float:right;");
$BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'"));
}
$BD = new Button("Dieses Event löschen", "trash", "icon");
$BD->style("float:right;margin:10px;");
$BD->doBefore("if(confirm('Löschen?')) %AFTER");
$BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentScreen'); Popup.close('mKalender', 'edit');");
if ($this->repeat() !== false) {
$BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
$BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon");
$BDS->style("float:right;margin:10px;");
$BDS->doBefore("if(confirm('Löschen?')) %AFTER");
$BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
}
}
$T = new HTMLTable(2, "Eventdetails");
$T->setColWidth(1, 120);
$T->addColStyle(1, "vertical-align:top;");
$T->addLV("Betreff", $this->title);
$T->addLV("Tag", Util::CLDateParser($time));
if (!$this->allDay) {
$T->addLV("Uhrzeit", $this->formatTime($this->time));
} else {
$T->addLV("Uhrzeit", "Ganzer Tag");
}
$T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>");
if ($this->organizer) {
$T->addLV("Organisator", $this->organizer);
}
if (count($this->values) > 0) {
$T->insertSpaceAbove();
}
foreach ($this->values as $label => $value) {
$T->addLV($label, $value);
}
$BN = "";
if ($this->canNotify) {
// TODO: Entfernen sobald Einladungen funktionieren
$BN = new Button("Terminbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon");
$BN->style("margin-top:10px;margin-left:10px;");
$BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'"));
}
$BR = "";
if ($this->isRepeatable and $this->getException() === false) {
$BR = new Button("Wiederholungen", "refresh", "icon");
$BR->style("margin:10px;float:right;");
$BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventSideContent').html(''); \$j('#editDetailsmKalender').animate({'width':'400px'}, 200, 'swing'); \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }");
}
$BI = new Button("Teilnehmer", "./ubiquitous/Kalender/einladungen.png", "icon");
$BI->style("margin: 10px; float: right;");
$BI->rmePCR("mKalender", "-1", "getInvitees", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#eventAdditionalContent').html(''); \$j('#editDetailsmKalender').animate({'width':'800px'}, 200, 'swing', function(){ \$j('#eventSideContent').html(t.responseText).fadeIn(); }); }");
if (!$this->canInvite) {
$BI = "";
}
$closed = "";
if ($this->closeable) {
$BC = new Button("Termin abschließen", "bestaetigung", "icon");
$BC->style("margin: 10px; float: right;");
$BC->rmePCR("mKalender", "-1", "getClose", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#editDetailsContentmKalender').html(t.responseText); }");
if ($this->closed[0]) {
$BC = "";
$closed = "<p>Termin abgeschlossen am " . Util::CLDateParser($this->closed[0]) . ($this->closed[1] != "" ? ":<br>" . nl2br($this->closed[1]) : "") . "</p>";
}
}
$topButtons = "";
foreach ($this->topButtons as $B) {
$B->type("icon");
$B->style("margin-top:10px;margin-left:10px;");
$topButtons .= $B;
}
return "<div style=\"width:400px;\">" . $BDS . $BD . $BE . $BN . $topButtons . $BR . $BI . $BC . $closed . "</div><div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div><div style=\"display:none;width:400px;float:right;\" id=\"eventSideContent\"></div><div style=\"width:400px;float:left;\" id=\"eventDefaultContent\"{$T}</div>";
}
示例15: browser
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) : "");
}