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(); }
public function addSettingPopup() { $T = new HTMLTable(2); $T->setColWidth(1, 20); $T->useForSelection(false); $S = new System(1); $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon"); foreach ($S->types as $k => $v) { $T->addRow(array($B, $v->name)); $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }")); } echo $T; }
function getHTML($id) { $this->makeNewIfNew(); $gui = new HTMLGUIX($this); $gui->name("Device"); $gui->type("DeviceType", "select", array("Unbekannt", "Smartphone", "Tablet 7 Zoll", "Tablet 10 Zoll", "Desktop")); $gui->addFieldEvent("DeviceType", "onchange", "if(this.value == 4) \$j('#editOverview').hide(); else \$j('#editOverview').show();"); $B = $gui->addSideButton("Browser\nregistrieren", "./plugins/Devices/registerDevice.png"); $B->onclick("\$j.jStorage.set('phynxDeviceID','" . $this->getID() . "');" . OnEvent::reload("Left")); $B = $gui->addSideButton("Übersicht\neinrichten", "./fheME/Overview/fheOverview.png"); $B->popup("", "Übersicht einrichten", "mfheOverview", "-1", "manage", $this->getID(), "", "{width:800, top:40}"); $B->id("editOverview"); if ($this->A("DeviceType") == "4") { $B->style("display:none;"); } return $gui->getEditHTML(); }
function getHTML($id) { $gui = new HTMLGUIX($this); $gui->name("Wetter"); #$gui->type("OpenWeatherMapDataCurrent", "textarea"); #$gui->type("OpenWeatherMapDataForecast", "textarea"); $gui->space("OpenWeatherMapLastUpdate"); $gui->space("OpenWeatherMapDataCurrent"); $gui->parser("OpenWeatherMapDataCurrent", "parserJSON"); $gui->parser("OpenWeatherMapDataForecastDaily", "parserJSON"); $gui->parser("OpenWeatherMapDataForecast", "parserJSONForecast"); $gui->descriptionField("OpenWeatherMapUpdateInterval", "In Minuten"); $B = $gui->addSideButton("Suche nach\nStadt", "application"); $B->popup("", "Suche", "OpenWeatherMap", "-1", "popupSearchCity"); $B = $gui->addSideButton("Update", "down"); $B->rmePCR("OpenWeatherMap", $this->getID(), "download", "", OnEvent::reload("Left")); return $gui->getEditHTML(); }
function getHTML($id) { $gui = new HTMLGUIX($this); $gui->name("RSSParser"); $FB = new FileBrowser(); $FB->addDir(dirname(__FILE__)); $P = array_merge(array("" => "kein Parser"), array_flip($FB->getAsLabeledArray("iRSSParser", ".class.php"))); $FB = new FileBrowser(); $FB->addDir(dirname(__FILE__)); $PD = array_merge(array("" => "kein Parser"), array_flip($FB->getAsLabeledArray("iRSSDataParser", ".class.php"))); $fields = array("RSSParserName", "RSSParserURL", "RSSParserPOST", "RSSParserDataParserClass", "RSSParserUseCache", "RSSParserLastUpdate", "RSSParserCache"); if (Applications::activeApplication() == "fheME") { $fields[] = "RSSParserParserClass"; $fields[] = "RSSParserOnCall"; $fields[] = "RSSParserCount"; } $gui->attributes($fields); $gui->type("RSSParserParserClass", "select", $P); $gui->type("RSSParserDataParserClass", "select", $PD); $gui->type("RSSParserUseCache", "checkbox"); $gui->type("RSSParserPOST", "textarea"); $gui->label("RSSParserParserClass", "Parser"); $gui->label("RSSParserOnCall", "Button"); $gui->label("RSSParserCount", "Anzahl"); $gui->label("RSSParserDataParserClass", "Data-Parser"); $gui->descriptionField("RSSParserUseCache", "Der Cache funktioniert nur zusammen mit dem cronjob"); $gui->descriptionField("RSSParserPOST", "Format: Jeweils ein Name:Wert pro Zeile<br>Variablen: \$timestampToday"); $gui->parser("RSSParserLastUpdate", "parserLastUpdate"); $gui->parser("RSSParserCache", "parserCache"); $gui->descriptionField("RSSParserParserClass", "Der Parser kann die Anzeige des Feeds anpassen"); $gui->descriptionField("RSSParserDataParserClass", "Der Parser kann die Daten des Feeds anpassen"); $gui->descriptionField("RSSParserOnCall", "Der Feed wird mit einem eigenen Button geöffnet"); $gui->descriptionField("RSSParserCount", "Die maximale Anzahl der angezeigten Einträge. 0 zeigt alle"); #$gui->type("RSSParserLastUpdate", "hidden"); $gui->type("RSSParserOnCall", "checkbox"); $B = $gui->addSideButton("Update", "down"); $B->rmePCR("RSSParser", $this->getID(), "download", "", OnEvent::reload("Left")); #if($this->A("RSSParserCache") != ""){ # $B = $gui->addSideButton("XML\nvalidieren", "new"); # $B->popup("", "XML validieren", "RSSParser", $this->getID(), "validate"); #} return $gui->getEditHTML(); }
/** * 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; }
public function getHTML($id) { #$_SESSION["BPS"]->unregisterClass(get_class($this)); $defaultAnsicht = "monat"; if (Applications::activeApplication() == "personalKartei") { $defaultAnsicht = "jahr"; } $ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht); #$ansicht = $ansicht->getUDValue("KalenderAnsicht"); #if($ansicht == null) $ansicht = "monat"; $display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0"); $BThis = new Button("", "arrow_down", "iconicG"); $BThis->style("float:left;margin-top:-6px;margin-right:5px;"); $Calendars = ""; Registry::reset("Kalender"); while ($C = Registry::callNext("Kalender", "categories")) { if (!$C) { continue; } foreach ($C as $tab) { $Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>"; } } // <editor-fold defaultstate="collapsed" desc="styles"> $html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>"; // </editor-fold> $BLeft = new Button("Zurück", "back", "icon"); $BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');"); $BLeft->style("margin-right:10px;"); $BRight = new Button("Weiter", "navigation", "icon"); $BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');"); $BRight->style("margin-right:10px;"); $BToday = new Button("Aktuelles Datum", "down", "icon"); $BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');"); $BToday->style("margin-right:10px;"); $BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon"); $BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');"); $BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : "")); $BJahr->id("jahrButton"); $BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon"); $BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');"); $BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : "")); $BMonat->id("monatButton"); $BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon"); $BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');"); $BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : "")); $BWoche->id("wocheButton"); $BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon"); $BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');"); $BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : "")); $BTag->id("tagButton"); if (Applications::activeApplication() == "personalKartei") { $BTag = ""; $BWoche = ""; $BMonat = ""; } if (Applications::activeApplication() != "personalKartei") { $BJahr = ""; } $ST = new HTMLTable(1); $ST->setColClass(1, ""); #$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/"); $newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL"); $newWindow->style("margin-right:10px;"); $newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender"); if (Session::physion()) { $newWindow = ""; } $reminder = ""; if (Session::isPluginLoaded("mReminder")) { $reminder = Reminder::getButton(); $reminder->style("margin-right:10px;"); } $ST->addRow("<div id=\"calendar1stMonth\"></div>"); $ST->addRow("<div id=\"calendar2ndMonth\"></div>"); $TC = "KalenderView" . ucfirst($ansicht); $TC = new $TC(); $TCalendars = "<div>"; if (trim($Calendars) != "") { $TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>"; } $TCalendars .= "</div>"; $pCalButton = ""; if (Session::isPluginLoaded("mpCal")) { $pCalButton = pCal::getTBButton(); $pCalButton->type("icon"); $pCalButton->style("margin-right:10px;"); } $GoogleButton = ""; $GoogleDLButton = ""; if (Session::isPluginLoaded("mGoogle")) { $GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png"); $GoogleButton->type("icon"); $GoogleButton->style("margin-right:10px;"); $GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon"); $GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'")); $GoogleDLButton->style("margin-right:10px;"); } $xCalButton = ""; if (Session::isPluginLoaded("mxCal")) { $xCalButton = xCal::getButton(); $xCalButton->style("margin-right:10px;"); } $BShare = new Button("Kalender teilen", "fork", "iconicL"); $BShare->popup("", "Kalender teilen", "mKalender", "-1", "share"); $BShare->style("margin-right:10px;"); #$AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL"); #$AWVButton->popup("", "Müllabfuhr-Daten", "mKalender", "-1", "downloadTrashData"); $AWVButton = ""; $ST->addRow($pCalButton . $GoogleButton . $GoogleDLButton); $html .= "\n\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"padding-top:30px;padding-bottom:15px;padding-left:0px;\">\n\t\t\t\t\t{$newWindow}{$BShare}{$AWVButton}{$xCalButton}{$reminder}\n\t\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div style=\"margin-right:270px;\">\n\t\t<div id=\"KalenderTitle\" class=\"prettyTitle\">\n\t\t\t\n\t\t\t<span style=\"float:right;\">\n\t\t\t\t{$BLeft}{$BToday}{$BRight}\n\t\t\t</span>\n\t\t\t<div style=\"float:right;margin-right:100px;\">{$BTag}{$BWoche}{$BMonat}{$BJahr}</div>\n\t\t\t" . $TC->getTitle() . "\n\t\t</div>\n\t\t</div>\n\t\t<div id=\"KalenderAuswahl\">\n\t\t\t{$TCalendars}\n\t\t</div>\n\t\t" . $TC->getHeader() . "\n\t\t<div id=\"KalenderWrapper\" style=\"overflow:auto;\">\n\t\t\t" . ($ansicht != "jahr" ? "\n\t\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"height:23px;\"></div>{$ST}\n\t\t\t</div>" : "") . "\n\t\t\t<div style=\"" . ($ansicht != "jahr" ? "margin-right:270px;" : "") . "\">\n\n\t\t\t" . $TC->getTable($this) . "\n\t\t\t</div>\n\t\t</div>"; $nextMonths = new Datum(); $nextMonths->setToMonth1st(); $thisMonth = $nextMonths->time(); $nextMonths->addMonth(); $nextMonth = $nextMonths->time(); $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar1stMonth').datepicker({ minDate: '" . date("d.m.Y", $thisMonth) . "'" . ($TC->getCurrent()->time() < $nextMonth ? ",defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t\t\t\n\t\t\$j('.KalenderUser div[class!=backgroundColor1]').hover(function(){ \$j(this).addClass('backgroundColor2'); }, function(){ \$j(this).removeClass('backgroundColor2'); });\n\t\tfitKalender();\n\t\t\t\n\t\t\$j(window).resize(function() {\n\t\t\tfitKalender();\n\t\t});\n\t\t\n\t\t});\n\t\t\n\t\tfunction fitKalender(){\n\t\t\tif(!\$j('#KalenderTitle').length)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t//console.log(\$j('#KalenderTitle').outerHeight());\n\t\t\t//console.log(\$j('#KalenderAuswahl').outerHeight());\n\t\t\tvar height = (contentManager.maxHeight() - \$j('#KalenderAuswahl').outerHeight() - \$j('#KalenderTitle').outerHeight() - \$j('#KalenderHeader').outerHeight()) + 4;\n\t\t\tvar width = contentManager.maxWidth();\n\t\t\t\n\t\t\t\$j('#KalenderWrapper').css('height', height);\n\t\t\t\$j('#KalenderWrapper').css('width', width);\n\n\t\t\tvar cellHeight = (height - \$j('#KalenderTable tr:first th').parent().outerHeight()) / (\$j('#KalenderTable tr').length - " . (($ansicht == "monat" or $ansicht == "jahr") ? "1" : "0") . ") - 1;\n\t\t\t\$j('.cellHeight').css('height', cellHeight+'px');\n\t\t\t\$j('.innerCellHeight').css('height', (cellHeight - \$j('.innerCellTitle:visible').outerHeight())+'px');\n\t\t\t\n\t\t\tif(\$j('#KalenderHeader').length > 0){\n\t\t\t\t//console.log(\$j('#KalenderHeader tr:first th'));\n\t\t\t\t\$j('#KalenderTable tr:first td').each(function(k, v){\n\t\t\t\t\t\n\t\t\t\t\t\$j(\$j('#KalenderHeader tr:first th')[k]).css('width', \$j(v).width());\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif(\$j('#tagDiv').length) {\n\t\t\t\t\$j('#tagDiv').css('width', \$j('#KalenderTable tr').width()+'px');\n\t\t\t\t\$j('#tagDiv').animate({scrollTop: 7*40}, 0);\n\t\t\t\tvar pos = \$j('#tagDiv').offset();\n\t\t\t\tpos.position = 'absolute';\n\n\t\t\t\t\$j('#tagDiv').css(pos)\n\t\t\t}\n\t\t}") . "\n\t\t<style type=\"text/css\">\n\t\t\t" . ($TC->getCurrent()->time() < $thisMonth ? "#calendar1stMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t" . ($TC->getCurrent()->time() < $nextMonth ? "#calendar2ndMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t.ui-datepicker-week-col { color:grey; text-align:left; }\n\t\t\ttr td.ui-datepicker-week-col {text-align:left;font-size:10px; }\n\t\t\t/*.ui-datepicker-week-end { background-color:#DDD; }*/\n\t\t</style>"; $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar2ndMonth').datepicker({ minDate: '" . date("d.m.Y", $nextMonth) . "'" . ($TC->getCurrent()->time() >= $nextMonth ? ", defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t});"); return $html; }
/** * 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, $onAbortFunction = null, $return = false) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $html = ""; $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); $tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>"); if (is_array($data["recipients"])) { 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", isset($data["default"]) ? $data["default"] : "0", $recipients); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } } else { $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />"); $html .= $tab; $html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>"; #$tab->addRow(array("")); #$tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); if ($onSuccessFunction == null) { $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');"; } $BAbort = new Button("Abbrechen", "stop"); if ($onAbortFunction == null) { $BAbort->onclick("Popup.close('Util', 'edit');"); } else { $BAbort->onclick($onAbortFunction); } $BAbort->style("margin-bottom:10px;margin-top:10px;"); $BGo = new Button("E-Mail\nsenden", "okCatch"); $BGo->style("float:right;margin-top:10px;"); if (strpos($data["body"], "<p") !== false) { $BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER"); } $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and 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"); $html .= $tab; if (strpos($data["body"], "<p") !== false) { echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);"); } if ($return) { return $html; } else { echo $html; } }
/** * Creates HTML for several global context menus */ public function getContextMenuHTML($identifier) { $s = explode(":", $identifier); switch ($s[0]) { case "operations": $onDeleteEvent = ""; $onDeleteQuestion = ""; if (PMReflector::implementsInterface($s[1], "iDeletable2")) { $c = $s[1]; $c = new $c(-1); $onDeleteEvent = $c->getOnDeleteEvent(); $onDeleteQuestion = $c->getOnDeleteQuestion(); } $texts = $this->languageClass->getEditTexts(); #$BRepeatable = ""; $T = new HTMLTable(1); $Buttons = ""; if ($s[3][0] == "1") { $B = new Button($texts["Neu mit Werten"], "new", "icon"); $B->onclick(OnEvent::reload("Left", "HTMLGUI;insertAsNew:true")); $B->style("margin-right:10px;"); $Buttons .= $B; } if ($s[3][1] == "1") { $B = new Button($texts["Kopieren"], "seiten", "icon"); $B->rmePCR(str_replace("GUI", "", $s[1]), $s[2], 'cloneMe', "", "function(transport){ lastLoadedLeft = (transport.responseText == '' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight(); }"); #$B->onclick("rme('$s[1]','$s[2]','cloneMe','', 'lastLoadedLeft = (transport.responseText == \'\' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight();');"); $B->style("margin-right:10px;"); $Buttons .= $B; } if ($s[3][2] == "1") { $B = new Button($texts["Löschen"], "trash", "icon"); $B->onclick("deleteClass('" . str_replace("GUI", "", $s[1]) . "','{$s['2']}'," . ($onDeleteEvent == "" ? "function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '{$s['2']}') \$('contentLeft').update(''); }" : $onDeleteEvent) . ",'" . ($onDeleteQuestion == "" ? $texts["Wirklich löschen?"] : $onDeleteQuestion) . "');"); $B->style("margin-right:10px;"); $Buttons .= $B; } if ($s[3][3] == "1") { $BRepeatable = new Button($texts["Repeatable erstellen"], "redo"); $BRepeatable->type("icon"); $BRepeatable->onclick("contentManager.newClassButton('Repeatable','','contentLeft','RepeatableGUI;RepeatablePlugin:{$s['1']};RepeatablePluginElementID:{$s['2']}');"); $Buttons .= $BRepeatable; } if ($s[3][4] == "1") { $B = new Button($texts["XML Export"], "export", "icon"); $B->onclick("windowWithRme('{$s['1']}', '{$s['2']}', 'getXML', '');phynxContextMenu.stop();"); $B->style("margin-right:10px;"); $Buttons .= $B; } $T->addRow(array($Buttons)); $T->addRowClass("backgroundColor0"); echo $T; /*echo " <table style=\"text-align:center;border:0px;\"> <tr> ".($s[3]{0} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/new.png\" title=\"".$texts["Neu mit Werten"]."\" onclick=\"contentManager.reloadFrameLeft('HTMLGUI;insertAsNew:true');\" /></td>" : "")." ".($s[3]{1} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/seiten.png\" title=\"".$texts["Kopieren"]."\" onclick=\"rme('$s[1]','$s[2]','cloneMe','', 'lastLoadedLeft = (transport.responseText == \'\' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight();');\" /></td>" : "")." ".($s[3]{2} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/trash.png\" title=\"".$texts["Löschen"]."\" onclick=\"deleteClass('$s[1]','$s[2]',".($onDeleteEvent == "" ? "function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '$s[2]') $('contentLeft').update(''); }" : $onDeleteEvent).",'".($onDeleteQuestion == "" ? $texts["Wirklich löschen?"] : $onDeleteQuestion)."');\" /></td>" : "")." ".($s[3]{4} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/export.png\" title=\"".$texts["XML Export"]."\" onclick=\"windowWithRme('$s[1]', '$s[2]', 'getXML', '');phynxContextMenu.stop();\" /></td>" : "")." $BRepeatable </tr> </table>";*/ break; case "multiPageSettings": $texts = $this->languageClass->getBrowserTexts(); $mU = new mUserdata(); $entriesPerPage = $mU->getUDValue("entriesPerPage{$s['1']}"); if ($entriesPerPage == null) { $entriesPerPage = 20; } echo "\n\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"backgroundColor3\">" . $texts["Anzahl Einträge pro Seite"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"image\" \n\t\t\t\t\t\t\t\tsrc=\"./images/i2/save.gif\"\n\t\t\t\t\t\t\t\tstyle=\"border: 0px none ; width: 18px;float:right;\" \n\t\t\t\t\t\t\t\tonclick=\"contentManager.rmePCR('HTML','', 'saveContextMenu', Array('multiPageSettings', '{$s['1']}:'+\$('entriesPerPageCM').value), 'phynxContextMenu.stop(); contentManager.reloadFrame(\\'" . (!isset($s[2]) ? "contentRight" : $s[2]) . "\\');');\" />\n\t\t\t\t\t\t<input style=\"width:130px;text-align:right;\" id=\"entriesPerPageCM\" type=\"text\" value=\"{$entriesPerPage}\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"backgroundColor3\">\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; $selectForOrderByField = ""; $n = $s[1] . "GUI"; if (PMReflector::implementsInterface($n, "iOrderByField")) { $mU = new mUserdata(); $HKs = $mU->getUDValue("OrderByFieldInHTMLGUI{$s['1']}"); $selectForOrderByField = "<select onchange=\"rme('HTML','','saveContextMenu',Array('setOrderByField','{$s['1']};:;'+this.value),'if(checkResponse(transport)) { phynxContextMenu.stop(); contentManager.reloadFrameRight(); }');\"><option " . (($HKs == null or $HKs == "default") ? "selected=\"selected\"" : "") . " value=\"default\">Standard-Sortierung</option><optgroup label=\"aufsteigend\">"; $cFOBy = new $n(); $cFOBy = $cFOBy->getOrderByFields(); foreach ($cFOBy as $k => $v) { $selectForOrderByField .= "<option " . ($HKs == "{$k};ASC" ? "selected=\"selected\"" : "") . " value=\"{$k};ASC\">" . $v . "</option>"; } $selectForOrderByField .= "</optgroup><optgroup label=\"absteigend\">"; foreach ($cFOBy as $k => $v) { $selectForOrderByField .= "<option " . ($HKs == "{$k};DESC" ? "selected=\"selected\"" : "") . " value=\"{$k};DESC\">" . $v . "</option>"; } $selectForOrderByField .= "</optgroup></select>"; echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"backgroundColor3\">" . $texts["nach Spalte sortieren"] . ":</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>{$selectForOrderByField}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>"; } try { $n = $s[1] . "GUI"; $c = new $n(); if (PMReflector::implementsInterface($n, "iCategoryFilter")) { $Ks = $c->getAvailableCategories(); if ($Ks == null) { return; } $mU = new mUserdata(); $HKs = $mU->getUDValue("filteredCategoriesInHTMLGUI{$s['1']}"); $HKs = explode(";", $HKs); $checks = ""; foreach ($Ks as $key => $value) { $checks .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><input type=\"checkbox\" id=\"hide{$key}\" value=\"{$key}\" name=\"{$key}\" " . (in_array("{$key}", $HKs) ? "checked=\"checked\"" : "") . " /></td>\n\t\t\t\t\t\t\t\t<td onclick=\"\$('hide{$key}').checked = !\$('hide{$key}').checked;\" style=\"cursor:pointer;\">{$value}</td>\n\t\t\t\t\t\t\t</tr>"; } echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t\t<form id=\"filterCatsOf{$s['1']}\">\n\t\t\t\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t\t<col class=\"backgroundColor2\" style=\"width:20px;\" />\n\t\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"backgroundColor3\">" . $texts["nach Kategorien filtern"] . ":</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{$checks}\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"backgroundColor3\">\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\" \n\t\t\t\t\t\t\t\t\t\t\tvalue=\"" . $texts["speichern"] . "\" \n\t\t\t\t\t\t\t\t\t\t\tstyle=\"background-image:url(./images/i2/save.gif);\" \n\t\t\t\t\t\t\t\t\t\t\tonclick=\"contentManager.rmePCR('HTML','', 'saveContextMenu', Array('filterCategories', '{$s['1']}--'+joinFormFields('filterCatsOf{$s['1']}').replace(/\\&/g,';').replace(/=/g,':')), 'phynxContextMenu.stop(); contentManager.reloadFrame(\\'contentRight\\');');\" />\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</form>"; } } catch (ClassNotFoundException $e) { } if (PMReflector::implementsInterface($n, "iCustomSettings")) { $cFOBy = new $n(); echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>"; echo $cFOBy->getCustomSettings(); } break; /*case "upload": $texts = $this->languageClass->getBrowserTexts(); echo " <form action=\"./interface/set.php\" method=\"post\" enctype=\"multipart/form-data\" id=\"formImage\" onsubmit=\"return AIM.submit($('formImage'), {'onComplete' : function(){ $('uploadImage').src = $('uploadImage').src+'&r2=".rand()."' $('uploadImage').style.display = ''; phynxContextMenu.stop(); }});\" ><p> <input type=\"file\" name=\"datei\" size=\"4\" /><br /><br /> <input type=\"submit\" value=\"".$texts["hochladen"]."\" /> <input type=\"hidden\" name=\"id\" value=\"$s[1]\" /> <input type=\"hidden\" name=\"class\" value=\"$s[2]\" /> <input type=\"hidden\" name=\"saveToAttribute\" value=\"$s[3]\" /></p> <p>".$texts["<=100KB"]."</p> </form>"; break;*/ } }
public function getContextMenuHTML($identifier) { $deTexts = array(); $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!"; $deTexts["selectPlugin"] = "Bitte Plugin wählen"; $deTexts["add"] = "hinzufügen"; $deTexts["selectPluginButton"] = "Plugin auswählen"; $deTexts["save"] = "speichern"; $deTexts["select"] = "auswählen"; $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden"; $deTexts["newFieldName"] = "Neuer Feldname"; $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt."; $ac = new anyC(); $singularLanguageClass = $ac->loadLanguageClass("Userdata"); $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts; $opts = ""; $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins()); $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries(); #print_r($ms); foreach ($ps as $key => $value) { if ($key == "mUserdata") { continue; } if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) { continue; } if ($identifier == "4") { $c = new $key(); if (!$c->getPluginSpecificRestrictions()) { continue; } } if ($identifier == "5" and !in_array($key, $ms)) { continue; } if ($value == "Kunde") { continue; } if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") { $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>"; } } $s = explode(":", $identifier); if (isset($s[1])) { $identifier = $s[0]; } switch ($identifier) { case "1": $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen"; $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten"; $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen"; echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "Edit": case "Delete": case "Create": echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "3": case "2": echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "5": case "4": if ($opts == "") { die("<p>" . $text["noPsOptions"] . "</p>"); } echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>"; break; case "pS": $c = new $s[1](); $pSs = $c->getPluginSpecificRestrictions(); $pSopts = ""; foreach ($pSs as $key => $value) { $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>"; } echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "hide": case "relabel": try { $c = new $s[1](-1); $c = $c->newAttributes(); echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; } catch (ClassNotFoundException $e) { echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>"; } break; case "copyFromUser": $T = new HTMLTable(2); $T->useForSelection(); $T->setColWidth(1, 20); $T->maxHeight(200); $G = new Users(); $G->addAssocV3("isAdmin", "=", "0"); $G->setLimitV3("10"); $G->lCV3(); while ($t = $G->getNextEntry()) { $T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username"))); $T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');"); } echo $T; break; case "login": $T = new HTMLTable(2); $T->useForSelection(); $T->setColWidth(1, 20); $T->maxHeight(200); $apps = Applications::getList(); foreach ($apps as $app) { #rme("mUserdata","-1","setUserdata",new Array("hidePlugin"+$('relabelPlugin').value.split(":")[0],$('relabelPlugin').value.split(":")[0], "pHide", lastLoadedLeft),"contentManager.reloadFrameLeft()"); $T->addRow(array(new Button("", "./plugins/Userdata/login18.png", "icon"), "Kann sich nicht an '{$app}' anmelden")); $T->addRowEvent("click", OnEvent::rme(new mUserdata(-1), "setUserdata", array("'loginTo{$app}'", "'0'", "'loginTo'", "lastLoadedLeft"), OnEvent::closeContext() . OnEvent::reload("Left"))); #$T->addRowEvent("click", "copyFromOtherUser('".$t->getID()."');"); } echo $T; break; } }
function getHTML($id) { $this->addOrderV3("PatchID"); $this->lCV3($id); $gui = new HTMLGUI(); $gui->setName("Updates"); $gui->setAttributes($this->collector); $gui->setCollectionOf($this->collectionOf, "Update"); $gui->setShowAttributes(array("PatchDescription", "PatchExecuted")); $gui->setParser("PatchExecuted", "Util::catchParser"); $gui->setParser("PatchDescription", "mPatchGUI::descriptionParser"); #$gui->setIsDisplayMode(true); #$gui->setEditInDisplayMode(true,"contentLeft"); #$gui->setDeleteInDisplayMode(false); $BXML = new Button("XML\nerzeugen", "empty"); $BXML->style("float:right;"); $BXML->windowRme("mPatch", "-1", "getXML", ""); if (strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") === false) { $BXML = ""; } $BU = new Button("Updates\naktualisieren", "refresh"); $BU->rmePCR("mPatch", "-1", "update", "", "function(transport){ if(transport.responseText != 'error') " . OnEvent::reload("Right") . " else new Effect.BlindDown('errorMessage'); }"); $T = new HTMLTable(1, "Einzelne Aktualisierungen"); $T->addRow(array($BU . $BXML . "\n\t\t\t\t\t<div id=\"errorMessage\" style=\"display:none;color:red;\">Es konnte keine Verbindung zum Updates-Server hergestellt werden.<br />Bitte stellen Sie folgende Voraussetzungen sicher:\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>Der Server mit Ihrer Installation kann eine Verbindung ins Internet aufbauen.</li>\n\t\t\t\t\t\t<li>Sie benutzen die aktuellste Version des Update-Plugins.</li>\n\t\t\t\t\t</ul></div>")); $html = OnEvent::script("var Patch = { popup: { 'width':600, 'hPosition': 'center', hasX: false } }") . $T; /*" <table> <colgroup> <col class=\"backgroundColor3\" /> </colgroup> <tr> <td> ".(strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") !== false ? "<input style=\"float:right;\" onclick=\"windowWithRme('mPatch','','getXML','');\" type=\"button\" class=\"bigButton backgroundColor2\" value=\"XML\nerzeugen\" />" : "")." <input style=\"background-image:url(./images/navi/refresh.png);\" onclick=\"rme('mPatch','','update','','if(transport.responseText != \'error\') contentManager.reloadFrameRight(); else new Effect.BlindDown(\'errorMessage\');');\" type=\"button\" class=\"bigButton backgroundColor2\" value=\"Updates\naktualisieren\" /> </td> </tr> </table>";*/ #else # $html = ""; $F = new HTMLForm("updateForm", array("file"), "Die Anwendung aktualisieren"); $F->getTable()->setColWidth(1, 120); $F->setType("file", "file"); $F->setLabel("file", "Paket"); $F->addJSEvent("file", "onChange", "Overlay.showDark(0.1, 0.8); " . OnEvent::popup("Anwendungsaktualisierung", "mPatch", "-1", "processUpdate", array("fileName"), "", "Patch.popup")); $F->setDescriptionField("file", "Hier aktualisieren Sie Ihre komplette Anwendung mit einem neuen Paket, das Sie von Furtmeier Hard- und Software erhalten haben.<br /><br />Sie können damit sowohl neue Versionen (Update) einspielen als auch eine mit Plugins erweiterte Version (Upgrade) einrichten.<br /><br />Alle Dateien werden vorher gesichert und alle eingetragenen Daten bleiben erhalten."); try { return ($id == -1 ? $F . "<div style=\"height:30px;\"></div>" . $html : "") . $gui->getBrowserHTML($id); } catch (Exception $e) { } return $html; }
/** * 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, $onAbortFunction = null, $return = false) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $html = ""; if (isset($data["attachmentsAlways"])) { /*$B = new Button("Anhänge", "export", "LPBig"); $B->style("margin:10px;float:right;"); $B->sidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'$dataClass'", "'$dataClassID'", "'$callbackParameter'")); $html .= $B;*/ $html .= OnEvent::script(OnEvent::popupSidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'{$dataClass}'", "'{$dataClassID}'", "'{$callbackParameter}'"))); } #$html .= "<p class=\"prettyTitle\">Neue E-Mail</p>"; #$html .= "<div style=\"clear:both;\"></div>"; $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); $tab->addLV("Absender:", "{$data['fromName']}<br /><small style=\"color:grey;\"><{$data['fromAddress']}></small>"); if (is_array($data["recipients"])) { if (count($data["recipients"]) == 1) { $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small style=\"color:grey;\"><" . $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", isset($data["default"]) ? $data["default"] : "0", $recipients); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } } else { $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } if (isset($data["bcc"]) and count($data["bcc"]) > 0) { foreach ($data["bcc"] as $bcc) { $tab->addLV("BCC:", $bcc); } } $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />"); $html .= $tab; $html .= "<div style=\"width:94%;margin:auto;\"><textarea class=\"tinyMCEEditor\" id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>"; #$tab->addRow(array("")); #$tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); if ($onSuccessFunction == null) { $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');"; } $BAbort = new Button("Abbrechen", "stop"); if ($onAbortFunction == null) { $BAbort->onclick("Popup.close('Util', 'edit');"); } else { $BAbort->onclick($onAbortFunction); } $BAbort->style("margin-bottom:10px;margin-top:10px;"); $optional = "var files = '';"; if (isset($data["attachmentsOptional"])) { $optional .= "\$j('#UtilEmailFormAttachments input[type=checkbox]:checked').each(function(k, v){ files += \$j(v).data('value')+'##'; });"; } $BGo = new Button("E-Mail\nsenden", "okCatch"); $BGo->style("float:right;margin-top:10px;"); $BGo->loading(); $BGo->doBefore("{$optional} %AFTER"); if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") { $BGo->doBefore("{$optional} \$j('#EMailBody{$dataClassID}').val(tinyMCE.get('EMailBody{$dataClassID}').getContent()); %AFTER"); } $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$j('#EMailBody{$dataClassID}').val()", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'", "files"), $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"); $html .= $tab; if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") { echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t" . tinyMCEGUI::editorMail("EMailBody{$dataClassID}", null, "undo redo | pastetext | bold italic underline | fullscreen code") . "\n\t\t\t}, 100);"); } if ($return) { return $html; } else { echo $html; } }
public static function getCalendarCategories() { $tabs = array(); $bps = BPS::getAllProperties("mKalenderGUI"); $tabs[] = new stdClass(); $tabs[0]->onclick = OnEvent::reload("Screen", "_mKalenderGUI;KID:" . Session::currentUser()->getID()); $tabs[0]->elementID = "TodoCurrentUser"; $tabs[0]->label = "Mein Kalender"; $tabs[0]->isCurrent = (!isset($bps["KID"]) or $bps["KID"] == Session::currentUser()->getID()); $ACS = anyC::get("Userdata", "name", "shareCalendarTo" . Session::currentUser()->getID()); $ACS->addAssocV3("name", "=", "shareCalendarTo0", "OR"); while ($Share = $ACS->getNextEntry()) { $U = new User($Share->A("UserID")); $C = new stdClass(); $C->onclick = OnEvent::reload("Screen", "_mKalenderGUI;KID:" . $U->getID()); $C->elementID = "TodoCurrentUser"; $C->label = $U->A("name"); $C->isCurrent = $bps["KID"] == $U->getID(); $tabs[] = $C; } return $tabs; }
public function addElementPopup($poolAnzeigeID) { $c = poolAnzeigeControl::get(); $T = new HTMLTable(2); $T->weight("light"); $T->maxHeight(450); foreach ($c as $k => $e) { $B = new Button($e->name, str_replace("./img/", "./poolPi/Anzeige/img/", $e->src), "icon"); $B->rmePCR("mpoolAnzeige", -1, "addElement", array($poolAnzeigeID, $k), OnEvent::reload("Screen")); $T->addRow(array($B, $e->name)); } echo $T; }