public function getOverviewDesktop($DeviceID) { $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID); if ($O == null) { $F = new Factory("fheOverview"); $F->sA("fheOverviewDeviceID", $DeviceID); $F->sA("fheOverviewDesktop", "{}"); $ID = $F->store(); $O = new fheOverview($ID); } $d = json_decode($O->A("fheOverviewDesktop")); $BM = new Button("Desktop bearbeiten", "pen_alt2", "iconicL"); $BM->style("position:absolute;right:0px;z-index:1000;"); $BM->popup("", "Desktop bearbeiten", "mfheOverview", "-1", "popupDesktop", array($DeviceID), "", "{hasX: false}"); echo "\n\t\t\t<div id=\"onfheOverviewPage\"></div>\n\t\t\t<div id=\"OverviewDesktop\" style=\"\">\n\t\t\t\t{$BM}\n\t\t\t"; $Device = new Device($DeviceID); $data = json_decode($O->A("fheOverviewDesktop")); foreach ($data as $plugin => $options) { try { echo $this->pluginShow($Device, $plugin, false, $options); } catch (Exception $e) { } } echo "</div>"; if (isset($d->background)) { echo OnEvent::script("\$j('#wrapper').css('background-image', 'url(./specifics/{$d->background})');"); } echo OnEvent::script("\$j('html').css('overflow-y', 'auto');"); $this->pluginUpdate(); }
public static function getManagerButtonCustomDir($targetClass, $targetID, $subDir, $usePool = false, $fieldDefaultFile = "", $targetFilename = null) { $args = array("{$subDir}", "'{$targetClass}'", "'{$targetID}'", $usePool ? "1" : "0", "'{$fieldDefaultFile}'"); if ($targetFilename != null) { $args[] = "'{$targetFilename}'"; } $BF = new Button("Dateien", "computer"); $BF->popup("", "Datei-Manager", "mFile", "", "getPopupManager", $args); return $BF; }
public function getOverviewContent() { $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemGerichtGUI\"></span><p>Essen</p></div>\n\t\t\t<div style=\"padding:10px;overflow:auto;\">"; $B = new Button("Liste anzeigen", "compass", "touch"); $B->popup("", "Essen", "mGericht", "-1", "showCurrentList", "", "", "{top:20, width:800, hPosition:'center', blackout:true}"); $BF = new Button("Gefrierschrank", "hash", "touch"); $BF->popup("", "Gefrierschrank", "mGericht", "-1", "showCurrentFrozenList", "", "", "{top:20, width:1000, hPosition:'center', blackout:true}"); $html .= "{$B}{$BF}</div>"; echo $html; }
public static function getButton($ibanField, $bicField, $ktoField = null, $blzField = null) { $attr = array("'{$ibanField}'", "'{$bicField}'"); if ($ktoField != null and $blzField != null) { $attr[] = "\$j('[name={$ktoField}]').val()"; $attr[] = "\$j('[name={$blzField}]').val()"; } $B = new Button("IBAN-Rechner", "./images/i2/calc.png", "icon"); $B->popup("", "IBAN-Rechner", "IBANCalc", "-1", "popup", $attr); return $B; }
public static function getHistorieData($ownerClass, $ownerClassID, HistorieTable $Tab) { $AC = anyC::get("Todo", "TodoClass", $ownerClass); $AC->addAssocV3("TodoClassID", "=", $ownerClassID); $AC->addOrderV3("TodoFromDay", "DESC"); $AC->setLimitV3("10"); while ($D = $AC->getNextEntry()) { $B = new Button("Aktivität anzeigen", "./ubiquitous/Todo/Todo.png", "icon"); $B->popup("", "Event", "mKalender", "-1", "getInfo", array("'mTodoGUI'", $D->getID(), $D->A("TodoFromDay"))); $Tab->addHistorie("Aktivität", "./ubiquitous/Todo/Todo.png", $D->A("TodoFromDay"), $D->getOwnerObject()->getCalendarTitle(), $B, $D->A("TodoDescription"), $D->A("TodoCreatorUserID")); } return true; }
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(); }
public static function getButtonGlobal($preset, $label, $icon) { $ID = -1; $LD = self::getU($preset, -1); if ($LD != null) { $ID = $LD->getID(); } #if($name == "GoogleAccountUserPass") # $preset = "googleData"; #else # $preset = $name; $B = new Button($label, $icon); $B->popup("edit", "Benutzerdaten", "LoginData", $ID, "getPopup", "", "LoginDataGUI;preset:{$preset}"); return $B; }
public static function getButtonU($name, $label, $icon) { $LD = self::getU($name); if ($LD == null) { $ID = -1; } else { $ID = $LD->getID(); } $preset = "default"; if ($name == "GoogleAccountUserPass") { $preset = "googleData"; } $B = new Button($label, $icon); $B->popup("edit", "Benutzerdaten", "LoginData", $ID, "getPopup", "", "LoginDataGUI;preset:{$preset}"); return $B; }
public function getOverviewContent($echo = true) { $html = ""; $i = 0; $header = false; $AC = anyC::get("RSSParser", "RSSParserOnCall", "1"); while ($RSS = $AC->getNextEntry()) { if (!$header) { $html .= "<div class=\"touchHeader\"><p>RSS</p></div><div style=\"padding:10px;\">"; $header = true; } $B = new Button($RSS->A("RSSParserName"), "rss", "touch"); $B->popup("", $RSS->A("RSSParserName"), "RSSParser", $RSS->getID(), "showFeed"); $html .= $B; } if ($header) { $html .= "</div>"; } $this->addAssocV3("RSSParserOnCall", "=", "0"); while ($RSS = $this->getNextEntry()) { $html .= "<div class=\"touchHeader\">\n\t\t\t\t<span class=\"lastUpdate\" id=\"lastUpdatemRSSParserGUI\"></span>\n\t\t\t\t<p>" . $RSS->A("RSSParserName") . "</p></div>\n\t\t\t\t\t<div id=\"RSSParserItemText\" class=\"backgroundColor4\" style=\"padding:10px;display:none;font-size:10px;\" onclick=\"\$j(this).hide(); \$j('#RSSParserItemList').show();\">asd</div>\n\t\t\t\t\t<div id=\"RSSParserItemList\" style=\"padding:10px;\">"; $list = new HTMLList(); $list->addListStyle("list-style-type:none;"); $E = $RSS->parseFeed(); foreach ($E as $item) { if ($RSS->A("RSSParserCount") > 0 and $RSS->A("RSSParserCount") <= $i) { break; } #$B = new Button("", "empty", "icon"); # $B = ""; if ($item->icon != null) { $B = $item->icon; $B->style($B->getStyle() . "float:left;margin-right:10px;margin-top:-5px;margin-bottom:10px;"); } $list->addItem($B . "<div id=\"RSSParserItem{$i}\" style=\"display:none;\">" . $item->description . "</div>" . ($item->description != "" ? "<a href=\"#\" onclick=\"\$j('#RSSParserItemList').hide(); \$j('#RSSParserItemText').html(\$j('#RSSParserItem{$i}').html()).show();\" >" : "") . $item->title . ($item->description != "" ? "</a>" : "")); $list->addItemStyle("clear:both;display:block;margin-left:0px;"); $i++; } $html .= $list . "</div>"; } if ($echo) { echo $html; } return $html; }
public function getOverviewContent($DeviceID) { $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemNuntiusGUI\"></span><p>Nuntius</p></div>\n\t\t\t<div style=\"padding:10px;overflow:auto;\">"; $Device = new Device($DeviceID); $BS = new Button("Nachricht senden", "comment_alt2_stroke", "touch"); $BS->popup("", "Nachricht senden", "mNuntius", "-1", "sendMessagePopup", "", "", "{remember: true" . ($Device->A("DeviceType") != "4" ? ", top: 10" : "") . "}"); $AC = anyC::get("Nuntius"); $AC->addAssocV3("NuntiusDeviceID", "=", $DeviceID, "AND", "1"); $AC->addAssocV3("NuntiusDeviceID", "=", "0", "OR", "1"); $AC->addAssocV3("NuntiusRead", "=", "0", "AND", "2"); $AC->setFieldsV3(array("COUNT(*) AS anzahl")); $N = $AC->getNextEntry(); if ($N->A("anzahl") == 0) { $BM = new Button("Keine Nachrichten", "check", "touch"); $BM->style("background-color:transparent;"); } else { $BM = new Button($N->A("anzahl") . " Nachricht" . ($N->A("anzahl") == 1 ? "" : "en"), "info", "touch"); $BM->className("highlight"); } $BM->popup("", "Nachrichten", "mNuntius", "-1", "showMessages", array($DeviceID), "", "{remember: true" . ($Device->A("DeviceType") != "4" ? ", top: 10" : "") . "}"); $html .= "{$BM}{$BS}</div>"; echo $html; }
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);") : ""); }
private function toIcon($clickable, $data) { $icon = OpenWeatherMap::iconPng($data->weather[0]->icon); $B = new Button("", "./ubiquitous/OWM/icons48/" . $icon . ".png", "icon"); if ($clickable) { $B->popup("", "Vorhersage", "mOpenWeatherMap", "-1", "all"); } #".($i == 0 ? "Heute" : "Morgen")." return "<div style=\"display:inline-block;vertical-align:top;width:49%;margin-top:20px;\"><small style=\"color:grey;\">" . Datum::getGerWeekArray(date("w", $data->dt)) . ", " . date("d", $data->dt) . ".</small><br>\n\t\t\t<b style=\"font-size:15px;font-weight:bold;color:#555;\">" . round($data->temp->min) . " - " . round($data->temp->max) . " °C<br>" . $B . "\n\t\t\t</b>\n\t\t\t</div>"; }
public static function getButton() { $B = new Button("xCal Konfiguration", "share", "iconicL"); $B->popup("", "xCal Konfiguration", "mxCal", "-1", "getConfigPopup"); return $B; }
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>"; }
public static function addRestrictionParser($w, $l, $p) { $deText = array(); $deText["Umbenennung"] = "Umbenennung"; $deText["Einschränkung"] = "Einschränkung"; $deText["Ausblenden"] = "Ausblenden"; $deText["Plugin"] = "Plugin"; $ac = new anyC(); $singularLanguageClass = $ac->loadLanguageClass("Userdata"); $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deText; $BA = new Button("Anmeldung", "./plugins/Userdata/login.png"); $BA->contextMenu("mUserdata", "login", "Anmeldung", "right", "up"); $BA->style("float:right;"); $BN = new Button("Einschränkung\nhinzufügen", "restrictions"); $BN->contextMenu("mUserdata", "1", "Einschränkung", "right", "up"); $BS = new Button("Plugin-\nspezifisch", "lieferschein"); $BS->contextMenu("mUserdata", "4", "Plugin-spezifisch", "right", "up"); $BS->style("float:right;"); $BP = new Button("Plugin\nausblenden", "tab"); $BP->contextMenu("mUserdata", "5", "Plugin ausblenden", "right", "up"); $BR = new Button("Rollen", "./plugins/Userdata/role.png"); $BR->popup("", "Rollen", "mUserdata", "-1", "rolesPopup", array("lastLoadedLeft")); return "<p class=\"highlight\">Achtung: Die möglichen Berechtigungen sind von der geladenen Anwendung und ihren Plugins abhängig. Melden Sie sich an einer anderen Anwendung an, um weitere Berechtigungen zu vergeben.</p>" . "\n\t\t<!--<input type=\"button\" class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Feld\numbenennen"]) ? $text["Feld\numbenennen"] : "Feld\numbenennen") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','2','" . $text["Umbenennung"] . ":');\" style=\"float:right;background-image:url(./images/navi/relabel.png);\" />\n\t\t<button class=\"bigButton backgroundColor3\" value=\"" . (isset($text["Einschränkung\nhinzufügen"]) ? $text["Einschränkung\nhinzufügen"] : "") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','1','" . $text["Einschränkung"] . ":');\" style=\"margin-bottom:10px;background-image:url(./images/navi/restrictions.png);\" /><br />-->\n\t\t{$BN}{$BS}<br><br>\n\t\t<!--<input type=\"button\" class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Feld\nausblenden"]) ? $text["Feld\nausblenden"] : "Feld\nausblenden") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','3','" . $text["Ausblenden"] . ":');\" style=\"float:right;background-image:url(./images/navi/clear.png);\" />\n\t\t<button class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Plugin-\nspezifisch"]) ? $text["Plugin-\nspezifisch"] : "Plugin-\nspezifisch") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','4','" . $text["Plugin"] . ":');\" style=\"margin-bottom:10px;background-image:url(./images/navi/lieferschein.png);\" />-->\n\t\t{$BP}{$BA}<br><br>\n\t\t{$BR}\n\t\t<!--<button class=\"bigButton backgroundColor3\" title=\"" . (isset($text["Plugin\nausblenden"]) ? $text["Plugin\nausblenden"] : "Plugin\nausblenden") . "\" onclick=\"phynxContextMenu.start(this, 'mUserdata','5','" . $text["Plugin"] . ":');\" style=\"background-image:url(./images/navi/tab.png);\" />-->"; }
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->onclick("if(confirm('Löschen?')) "); $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); 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->onclick("if(confirm('Löschen?')) "); $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("Termin-\nbestä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('#eventAdditionalContent').html(transport.responseText).slideDown(); }"); } // TODO: Flag für Teilnehmer erstellen // nur anzeigen, wenn es sich um eine ToDo handelt // $buttonInvite = new Button("Teilnehmer einladen", "refresh", "icon"); // $buttonInvite->style("margin: 10px; float: right;"); // $buttonInvite->rmePCR("mKalender", "-1", "getInviteForm", array("'$this->className'", "'$this->classID'", "'getInviteForm'"), "function(transport){ \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }"); $topButtons = ""; foreach ($this->topButtons as $B) { $B->type("icon"); $B->style("margin-top:10px;margin-left:10px;"); $topButtons .= $B; } return $BDS . $BD . $BE . $BN . $topButtons . $BR . $buttonInvite . "<div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div>" . $T; }
public function getTable($GUI) { $bps = BPS::getAllProperties("mKalenderGUI"); $K = $GUI->getData($this->first, $this->last, isset($bps["KID"]) ? $bps["KID"] : Session::currentUser()->getID()); $ansicht = $this->ansicht; $cols = $this->cols; $rows = $this->rows; $html = "<table style=\"margin-left:10px;border-spacing: 0px;\" id=\"KalenderTable\">\n\t\t\t<colgroup>"; for ($j = 0; $j < $cols - 2; $j++) { # $html .= "\n\t\t\t\t<col " . ($ansicht == "woche" ? "class=\"backgroundColor" . ($j % 2 + 2) . "\" " : "") . " style=\"width:" . 100 / $cols . "%;\" />"; } $html .= "\n\t\t\t\t<col style=\"background-color:{$this->colorBgSaturday};width:" . 100 / $cols . "%;\" />\n\t\t\t\t<col style=\"background-color:{$this->colorBgSunday};width:" . 100 / $cols . "%;\" />\n\t\t\t</colgroup>"; if ($ansicht != "tag") { $html .= "\n\t\t\t\t<tr>"; $D2 = clone $this->date; for ($j = 0; $j < $cols; $j++) { $html .= "\n\t\t\t\t\t\t<th style=\"border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#EEE;padding-top:10px;\" class=\"backgroundColor0\">" . Util::CLWeekdayName(date("w", $D2->time())) . "</th>"; $D2->addDay(); } unset($D2); $html .= "\n\t\t\t</tr>"; } $D = clone $this->date; for ($i = 0; $i < $rows; $i++) { $html .= "\n\t\t\t<tr class=\"cellHeight noHover\">"; for ($j = 0; $j < $cols; $j++) { $entry = ""; $events = $K->getEventsOnDay(date("dmY", $D->time())); $holidays = $K->getHolidaysOnDay(date("dmY", $D->time())); $hasMultiDay = $K->hasMultiDayEvents($this->first, $this->last); if ($ansicht == "tag") { #$dayContent = ""; $dayDivs = ""; for ($i = 0; $i < 24; $i++) { $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:40px;z-index:10;\" class=\"backgroundColor" . ($i % 2 == 0 ? "3" : "2") . "\">\n\t\t\t\t\t\t\t"; $BN = ""; if (Session::isPluginLoaded("mTodo")) { $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png", "icon"); $BN->className("KalenderButton"); $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1", $i), "", "Kalender.popupOptions"); $BN->style("float:left;margin-left:5px;margin-top:5px;"); } $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"height:35px;border-right-width:1px;border-right-style:dotted;float:left;width:40px;padding-top:5px;padding-right:5px;font-weight:bold;text-align:right;color:grey;\">" . ($i < 10 ? "0" : "") . "{$i}:00</div>\n\t\t\t\t\t\t{$BN}</div>"; } $eventsDiv = ""; for ($i = 0; $i < 24; $i++) { if (count($events) > 0) { foreach ($events as $time => $ev) { if (substr($time, 0, 2) * 1 != $i) { continue; } foreach ($ev as $KE) { $eventsDiv .= $KE->getDayViewHTML($D->time()); } } } } $entry = "\n\t\t\t\t\t\t<div class=\"cellHeight\" style=\"overflow:auto;width:961px;\" id=\"tagDiv\">\n\t\t\t\t\t\t\t<div style=\"height:961px;\">\n\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-961px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>"; } elseif ($ansicht == "woche") { $dayDivs = ""; for ($k = 0; $k < $hasMultiDay; $k++) { $dayDivs .= "<div style=\"height:22px;z-index:10;\" class=\"borderColor0\"></div>"; } for ($k = 0; $k < 24; $k++) { $bgColor = ""; if ($k < 7 or $k > 19) { $bgColor = "background-color:rgba(255, 255, 255, 0.3)"; } $border = "border-top:1px dotted white;"; if ($k == 23) { $border .= "border-bottom:1px dotted white;"; } if ($k == 12) { $border = "border-top:1px solid white;"; } $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:" . ($k < 6 ? "10" : "21") . "px;z-index:10;{$border}{$bgColor}\" class=\"borderColor0\">\n\t\t\t\t\t\t\t"; if ($k > 5 and $k < 21 and $k % 2 == 0 and $j % 2 == 1) { $dayDivs .= "\n\t\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"color:#777;padding-left:3px;\">" . ($k < 10 ? "0" : "") . "{$k}</div>"; } $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>"; } $eventsDiv = ""; for ($i = 0; $i < 24; $i++) { if (count($events) > 0) { foreach ($events as $time => $ev) { if (substr($time, 0, 2) * 1 != $i) { continue; } foreach ($ev as $KE) { $eventsDiv .= $KE->getWeekViewHTML($D->time(), $hasMultiDay); } } } } $entry = "\n\t\t\t\t\t\t<div style=\"overflow:auto;height:" . (11 * 6 + 22 * 18 + 1 + $hasMultiDay * 22) . "px;width:100%;\">\n\t\t\t\t\t\t\t<div style=\"height:" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>"; } else { if ($events != null) { foreach ($events as $time => $ev) { foreach ($ev as $v) { $entry .= $v->getMinimal($D->time()); } } } if ($holidays != null) { foreach ($holidays as $ev) { foreach ($ev as $v) { $entry .= $v->getMinimal($D->time()); } } } } $BD = new Button("Tagesansicht", "./ubiquitous/Kalender/showDetails.png"); $BD->type("icon"); $BD->rmePCR("mKalender", "-1", "setView", array("'tag'", "'" . $D->time() . "'"), "contentManager.loadFrame('contentScreen','mKalender');"); $BD->style("float:left;"); $BN = ""; if (Session::isPluginLoaded("mTodo")) { $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png"); $BN->type("icon"); $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1"), "", "Kalender.popupOptions"); $BN->style("float:left;margin-left:5px;"); } #".((date("m.Y",$D->time()) != date("m.Y",$currentMonth->time())) ? "color:grey;" : "")." if ($j < $cols) { $html .= "\n\t\t\t\t<td\n\t\t\t\t\tstyle=\"vertical-align:top;padding:0px;\"\n\t\t\t\t\tclass=\"" . ((date("d.m.Y", $D->time()) == date("d.m.Y") and $ansicht != "tag") ? "backgroundColor1" : "") . " Day borderColor1\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle=\"" . ($ansicht == "tag" ? "display:none;" : "") . "height:21px;padding-top:2px;padding-left:5px;text-align:right;padding-right:5px;\"\n\t\t\t\t\t\tclass=\"innerCellTitle\">\n\t\t\t\t\t\t" . ($ansicht != "tag" ? "<span class=\"dayOptions\">{$BD}{$BN}</span>" : "") . "\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tstyle=\"color:grey;\">\n\t\t\t\t\t\t\t" . ($ansicht != "tag" ? date("d", $D->time()) : " ") . "\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"overflow:auto;" . ($ansicht == "monat" ? "margin-top:0px;width:100%;" : "") . "\" class=\"" . ($ansicht == "monat" ? "innerCellHeight" : "") . "\">{$entry}</div>\n\t\t\t\t</td>"; } $D->addDay(); } for ($j = 0; $j < 7 - $cols; $j++) { $D->addDay(); } $html .= "\n\t\t\t</tr>"; } $html .= "\n\t\t</table>"; return $html; }
public function getOverviewContent() { $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemEinkaufszettelGUI\"></span><p>Einkaufen</p></div>\n\t\t\t<div style=\"padding:10px;\">"; $I = new HTMLInput("EinkaufslisteNewEntryOV", "textarea"); $I->placeholder("Neuer Eintrag"); $I->style("width:100px;padding:3px;font-size:20px;font-family:monospace;height:32px;max-height:32px;"); $I->onfocus("fheOverview.noreload.push('mEinkaufszettelGUI::getOverviewContent'); fheOverview.noresize = true;"); $I->onblur("fheOverview.noreload.pop(); fheOverview.noresize = false;"); #$I->onkeyup("var currentContent = \$j(this).val(); ".OnEvent::rme($this, "getACData", array("this.value"), "function(transport){ var json = jQuery.parseJSON(transport.responseText); if(json.length >= 1) \$j('#EinkaufslisteNewEntryAC').html(json[0].EinkaufszettelName.replace(currentContent, '<span style=\'color:white;\'>'+currentContent+'</span>')); else \$j('#EinkaufslisteNewEntryAC').html(''); }")); $I->onEnter(OnEvent::rme($this, "addItem", array("this.value", "1"), "function(transport){ \$j('#EinkaufszettelLastAdded').html(transport.responseText); }") . " \$j(this).val('');"); $B = new Button("Einkaufsliste anzeigen", "list", "touch"); $B->popup("", "Einkaufsliste", "mEinkaufszettel", "-1", "showCurrentList", "", "", "{top:20, width:1000, hPosition:'center', blackout:true}"); $html .= "<div id=\"EinkaufslisteNewEntryContainer\">{$B}</div>\n\t\t\t<!--<div id=\"EinkaufszettelLastAdded\">-->"; #$html .= $this->getOverviewList(); $html .= "<!--</div>--></div>" . OnEvent::script("\$j('[name=EinkaufslisteNewEntryOV]').css('width', (\$j('#EinkaufslisteNewEntryContainer').innerWidth() - 70)+'px');"); echo $html; }
public function __toString() { #$style = ""; if ($this->type == "date" and strpos($this->style, "width:") === false) { $this->style .= "width:calc(100% - 28px)%;"; } #if($this->style != null) $style = " style=\"$this->style\""; switch ($this->type) { /*case "JSONMultiText": $data = json_decode($this->value); print_r($data); $L = new HTMLList(); $L->noDots(); $L->addListStyle("padding:0px;"); foreach($data AS $k => $v){ $IL = new HTMLInput($this->name."_$k", "text", $v); $BL = new Button("Element hinzufügen"); $L->addItem($IL); $L->addItemStyle("margin-left:0px;"); } $I = new HTMLInput($this->name, "textarea", $this->value); $I->id($this->name); return $L.$I; break;*/ case "audio": return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>"; break; case "search": $currentId = $this->id != null ? $this->id : $this->name . rand(100, 100000000); $enter = "if(\$j('#{$currentId}').val() != ''){ \$j('#SB{$currentId}').fadeOut(200, function(){ \$j('#SA{$currentId}').fadeIn();}); } else { \$j('#SA{$currentId}').fadeOut(200, function(){ \$j('#SB{$currentId}').fadeIn(); }); }"; $I = new HTMLInput($this->name, "text", $this->value, $this->options); $I->style($this->style); $I->placeholder($this->placeholder); $I->onEnter($this->onenter . $enter); #$I->onEnter(" "); $I->id($currentId); $BSearch = new Button("Suchen", "question_mark", "iconicG"); $BSearch->style("margin-left:5px;"); $BSearch->id("SB{$currentId}"); $BSearch->onclick($this->onenter . $enter); #$BSearch->id("searchMailsInfo"); $BSearchClear = new Button("Suche beenden", "x_alt", "iconicR"); $BSearchClear->style("margin-left:5px;display:none;"); $BSearchClear->id("SA{$currentId}"); $BSearchClear->onclick("\$j('#{$currentId}').val('').trigger('blur'); {$this->onenter}{$enter}"); #$BSearchClear->id("searchMailsClear"); return $I . $BSearch . $BSearchClear . $this->requestFocus; break; case "HTMLEditor": $B = new Button("in HTML-Editor\nbearbeiten", "editor"); $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}"); $B->className("backgroundColor2"); return $B->__toString(); break; case "TextEditor": #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>"; $B = new Button("in Editor\nbearbeiten", "editor"); $B->className("backgroundColor2"); $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');"); $ITA = new HTMLInput($this->name, "textarea", $this->value); $ITA->id($this->name); $ITA->style("display:none;"); return $B->__toString() . $ITA; break; case "nicEdit": $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'"); if (isset($this->options[2])) { $BO[] = "'{$this->options[2]}'"; } $B = new Button("in Editor\nbearbeiten", "editor"); #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}"); $B->doBefore("Overlay.showDark(); %AFTER"); $B->popup("", "Editor", "nicEdit", "-1", "editInPopup", $BO, "", "Popup.presets.large"); $B->className("backgroundColor2"); $ITA = new HTMLInput($this->name, "hidden", $this->value); return $B->__toString() . $ITA; break; case "tinyMCE": $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'"); if (isset($this->options[2])) { $BO[] = "'{$this->options[2]}'"; } if (isset($this->options[3])) { $BO[] = "'{$this->options[3]}'"; } $B = new Button("in Editor\nbearbeiten", "editor"); #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}"); $B->doBefore("Overlay.showDark(); %AFTER"); $B->popup("", "Editor", "tinyMCE", "-1", "editInPopup", $BO, "", "Popup.presets.large"); $B->className("backgroundColor2"); $ITA = new HTMLInput($this->name, "hidden", $this->value); return $B->__toString() . $ITA; break; case "multiInput": return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>"; break; /*case "customSelection": $B = new Button("Eintrag auswählen...", "gutschrift"); $B->type("LPBig"); $B->style("float:right;margin-left:10px;"); # "contentRight" "callingPluginID" "selectPlugin" $B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]); return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />"; break;*/ /*case "customSelection": $B = new Button("Eintrag auswählen...", "gutschrift"); $B->type("LPBig"); $B->style("float:right;margin-left:10px;"); # "contentRight" "callingPluginID" "selectPlugin" $B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]); return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />"; break;*/ case "textarea": if ($this->isDisplayMode) { return nl2br($this->value); } if ($this->multiEditOptions != null) { $this->id($this->name . "ID" . $this->multiEditOptions[1]); $this->onfocus .= " contentManager.oldValue = this.value;"; $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; $this->onblur .= "if(contentManager.oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; if ($this->hasFocusEvent) { $this->onfocus .= "focusMe(this);"; $this->onblur .= "blurMe(this);"; } $this->hasFocusEvent = false; } return "<textarea\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . (!$this->autocorrect ? "autocorrect=\"off\"" : "") . "\n\t\t\t\t\t" . (!$this->spellcheck ? "spellcheck=\"false\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>"; break; case "file": $physion = Session::physion(); $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000); if (isset($this->options["autoUpload"]) and !$this->options["autoUpload"]) { $this->callback = "QQUploader{$currentId}.uploadStoredFiles();"; } return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;{$this->style}\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tQQUploader{$currentId} = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\tsizeLimit: " . Util::toBytes(ini_get("upload_max_filesize")) . ",\n\t\t\t\t\t\t\telement: \$j('#{$currentId}')[0],\n\t\t\t\t\t\t\taction: '" . (($this->options != null and isset($this->options["action"])) ? $this->options["action"] : "./interface/set.php") . "',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["targetFilename"])) ? ",'targetFilename':'" . $this->options["targetFilename"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . ($physion ? ",'physion':'{$physion['0']}'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t" . (isset($this->options["autoUpload"]) ? "autoUpload: " . ($this->options["autoUpload"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\t" . (isset($this->options["multiple"]) ? "multiple: " . ($this->options["multiple"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$j('#progress_{$currentId}').css('display', 'block');},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$j('progress_{$currentId}').css('display', 'none'); {$this->onchange} },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$j('#progressBar_{$currentId}').css('width', Math.ceil((loaded / total) * 100)+'%'); }});\n\t\t\t\t\t</script>"; break; case "time": $this->type = "text"; if ($this->multiEditOptions != null) { $this->id($this->name . "ID" . $this->multiEditOptions[1]); } if (!$this->id) { $this->id = rand(100000, 9999999) . $this->name; } #$this->onkeyup .= "if(\$j(this).val().length == 2 && \$j(this).val().lastIndexOf(':') == -1) \$j(this).val(\$j(this).val()+':'); "; if ($this->connectTo) { $this->onkeyup .= "contentManager.connectedTimeInput(event, '{$this->id}', '{$this->connectTo}'); "; } else { $this->onkeyup .= "contentManager.timeInput(event, '{$this->id}'); "; } case "time2": if ($this->type == "time2") { $this->type = "time"; } case "radio1": case "date": case "email": case "text": case "hidden": case "submit": case "number": case "button": case "password": case "checkbox": case "readonly": case "fileold": case "color": $JS = ""; if ($this->type == "radio1") { $this->type = "radio"; } if ($this->type == "fileold") { $this->type = "file"; } if ($this->isDisplayMode) { if ($this->type == "checkbox") { return Util::catchParser($this->value); } if ($this->type == "hidden") { return ""; } if ($this->type == "password") { return str_repeat("*", mb_strlen($this->value)); } return $this->value . ""; } if ($this->hasFocusEvent) { $this->onfocus .= "focusMe(this);"; $this->onblur .= "blurMe(this);"; } if ($this->multiEditOptions != null) { $this->id($this->name . "ID" . $this->multiEditOptions[1]); if ($this->type == "checkbox") { $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; } else { $this->onfocus .= " oldValue = this.value;"; $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; } if ($this->type == "date") { $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; } } $cal = ""; $B2 = ""; if ($this->type == "date") { if ($this->id == null) { $this->id = rand(10000, 90000); } $cal = new Button("Kalender anzeigen", "calendar", "iconic"); $cal->onclick("\$j('#{$this->id}').focus();"); $cal->style("float:right;"); $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>"; $this->type = "text"; } $value = "value=\"" . htmlspecialchars($this->value) . "\""; if ($this->type == "checkbox") { $value = $this->value == "1" ? "checked=\"checked\"" : ""; } $data = ""; foreach ($this->data as $k => $v) { $data .= " data-{$k}=\"{$v}\""; } if ($this->autocomplete != null) { if ($this->id == null) { $this->id = $this->name; } /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);"; $this->onblur .= " ACInputHasFocus = false; AC.end(this);"; $this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/ $this->autocompleteBrowser = false; $cal = $this->autocomplete[5]; #new Button("Suche", "./images/i2/details.png"); $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();"); if ($cal->getStyle() == "") { $cal->style("float:right;"); } if ($this->autocomplete[4] != null) { $B2 = $this->autocomplete[4]; $B2->style("float:right;margin-left:5px;"); if (strpos($this->style, "width") === false) { $this->style .= "width:80%"; } } else { if (strpos($this->style, "width") === false) { $this->style .= "width:90%"; } } if ($this->autocomplete[1] == null) { $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}').value = ''; \$('{$this->id}Display').focus();"); $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value)); $IN->id($this->name); if ($this->onchange) { $IN->onchange($this->onchange); $this->onchange = ""; } $JS .= $IN; $this->autocomplete[1] = "function(selection){ if(!selection) return false; var oldVal = \$j('#{$this->id}').val(); \$j('#{$this->id}').val(selection.value); if(\$j('#{$this->id}').val() != oldVal) \$j('#{$this->id}').trigger('change'); \$('{$this->id}Display').value = selection.label; return false; }"; if ($this->value != "") { $C = substr($this->autocomplete[0], 1) . "GUI"; $C = new $C($this->value); $value = "value=\"" . htmlspecialchars($C->ACLabel($this->value, is_array($this->autocomplete[3]) ? $this->autocomplete[3] : array($this->autocomplete[3]))) . "\""; } $this->onkeyup .= "if(\$j('[name={$this->name}Display]').val() == '') { \$j('[name={$this->name}]').val(''); } "; $this->id .= "Display"; $this->name .= "Display"; $this->onkeyup .= "\$j('[name={$this->name}]').val(this.value);"; } $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", is_array($this->autocomplete[3]) ? "'" . json_encode($this->autocomplete[3]) . "'" : $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; },\n\t\t\t\t\t\tchange: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"ui-autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li>\" )\n\t\t\t\t\t\t\t.data( \"item.ui-autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};"); } return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->maxlength != null ? " maxlength=\"{$this->maxlength}\"" : "") . "\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->title != null ? "title=\"{$this->title}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t{$data}\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}"; break; case "option": $data = ""; foreach ($this->data as $k => $v) { $data .= " data-{$k}=\"{$v}\""; } return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " {$data} " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>"; break; case "optgroup": $html = "<optgroup label=\"" . htmlentities($this->name) . "\">"; foreach ($this->options as $k => $v) { if (is_object($v)) { $v->isSelected(false); if ($this->parentValue == $k or $v->getValue() == $this->parentValue) { $v->isSelected(true); } } $html .= $v; } $html .= "</optgroup>"; return $html; break; case "radio": $html = ""; foreach ($this->options as $k => $v) { $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>"; } return $html; break; case "select": case "select-multiple": if ($this->hasFocusEvent) { $this->onfocus .= "focusMe(this);"; $this->onblur .= "blurMe(this);"; } if ($this->type == "select-multiple") { $values = trim($this->value) != "" ? explode(";:;", $this->value) : array(); } if ($this->isDisplayMode) { return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value]; } if ($this->multiEditOptions != null) { $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; $this->id($this->name . "ID" . $this->multiEditOptions[1]); } $html = "<select " . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . " " . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . " " . ($this->size ? "size=\"{$this->size}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">"; if ($this->options != null and is_array($this->options)) { foreach ($this->options as $k => $v) { if (!is_object($v)) { if ($this->type == "select") { $isThisIt = $this->value == $k; if ($this->value . "" === "" and $k . "" === "0") { $isThisIt = false; } } else { $isThisIt = in_array($k, $values); } $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>"; } else { if ($v->getType() == "optgroup") { $v->parentValue($this->value); } $v->isSelected(false); if ($this->value == $k or $v->getValue() == $this->value) { $v->isSelected(true); } $html .= $v; } } } $html .= "</select>"; return $html; break; } }
public static function parserDone($w, $l, $E) { $B = new Button("Termin abschließen", "./images/i2/bestaetigung.png", "icon"); $B->popup("", "Termin abschließen", "mTodo", -1, "getClose", array($E->getID())); return $B . ($w > 0 ? OnEvent::script("\$j('#BrowsermTodo" . $E->getID() . "').addClass('confirm');") : ""); }
public static function getButton($ibanField, $bicField) { $B = new Button("IBAN-Rechner", "./images/i2/calc.png", "icon"); $B->popup("", "IBAN-Rechner", "IBANCalc", "-1", "popup", array("'{$ibanField}'", "'{$bicField}'")); return $B; }
public static function getContactButton($kundennummer) { $BKontakt = new Button("Kontaktdaten anzeigen", "./images/i2/telephone.png", "icon"); $BKontakt->style("float:right;"); $BKontakt->popup("name", "Kontaktdaten", "Adressen", -1, "getContactPopup", $kundennummer); return $BKontakt; }
public function manageMailservers() { $MailServer = LoginData::get("MailServerUserPass"); $MailServerID = $MailServer == null ? -1 : $MailServer->getID(); $BMail = new Button("Standard", "./plugins/Installation/serverMail.png"); $BMail->popup("edit", "Mail-Server", "LoginData", $MailServerID, "getPopup", "", "LoginDataGUI;preset:mailServer"); $BMail->style("margin:10px;float:left;"); echo $BMail . "<p><small style=\"color:grey;\">Über diesen Server werden alle Mails verschickt, wenn weiter unten kein eigener Server für eine Absender-Domain eingetragen wird.</small></p>"; echo "<div style=\"clear:both;height:30px;\"></div><div class=\"Tab backgroundColor1\"><p>Weitere Mailserver</p></div>"; echo "<p><small style=\"color:grey;\">Erfassen Sie einen zusätzlichen Server für eine bestimmte Absender-Domain, wenn der Standard-Server diese nicht verschicken kann.</small></p>"; echo "<p><small style=\"color:grey;\">Ein Beispiel: Sie möchten E-Mails verschicken von den Adressen max.mustermann@<strong>gmx.de</strong> und erika.hatnachname@<strong>web.de</strong>. Über GMX können Sie die web.de-Mails nicht verschicken und web.de verschickt die GMX-E-Mails ebenfalls nicht. Sie müssen daher für jeden Anbieter seinen eigenen Server eintragen.</small></p>"; $MailServer = 1; for ($i = 2; $i <= 5; $i++) { if ($MailServer == null) { break; } $MailServer = LoginData::get("MailServer{$i}UserPass"); $MailServerID = $MailServer == null ? -1 : $MailServer->getID(); $BMail = new Button("Server {$i}", "./plugins/Installation/serverMail.png"); $BMail->popup("edit", "Mail-Server", "LoginData", $MailServerID, "getPopup", "", "LoginDataGUI;preset:mailServerAdditional{$i}"); $BMail->style("margin:10px;display:inline-block;"); echo $BMail; if ($MailServer != null) { echo $MailServer->A("optionen"); } echo "<br />"; } echo "<div style=\"clear:both;\"></div>"; }
/** * This Method activates several features. Possible values are: * * reloadOnNew: * Instantly reloads a newly created entry * * Make sure to call $this->setEchoIDOnNew(true); in the constructor of * the related class. Works on instances of PersistentObject and Collection. * * no parameters are required * * --- * * * replaceSaveButton: * Replaces the default edit save/new-button with a user-defined button of class Button * * par1: Button * * --- * * * addSaveDefaultButton: * Creates a button next to an input element to save the current value which will then be loaded by default * * par1: The name of the input element * * --- * * * addCustomButton: * Adds a custom button next to an input element * * par1: The name of the input element * * par2: The button of class Button * * --- * * * addAnotherLanguageButton: * Creates a button next to an input element to add an alternate language * * par1: The name of the input element * * --- * * * Each par variable may be used differently with each feature * * @param string $feature The feature to activate * @param PersistentObject Collection $class * @param $par1 * @param $par2 * @param $par3 */ public function activateFeature($feature, $class, $par1 = null, $par2 = null, $par3 = null) { switch ($feature) { case "reloadOnNew": if ($class instanceof PersistentObject and $class->getID() == -1) { $this->setJSEvent("onSave", "function(transport){ contentManager.reloadOnNew(transport, '" . $class->getClearClass() . "'); }"); } if ($class instanceof Collection) { $this->setJSEvent("onNew", "function(transport){ contentManager.reloadFrameRight(); }"); } break; case "replaceSaveButton": $this->replaceSaveButton = $par1; break; case "addSaveDefaultButton": $B = new Button("als Standard-Wert speichern", "./images/i2/save.gif"); if ($this->types[$par1] != "checkbox") { $B->rme("mUserdata", "", "setUserdata", array("'DefaultValue" . $class->getClearClass() . "{$par1}'", "\$('{$par1}').value", "''", "0", "1"), "checkResponse(transport);"); } else { $B->rme("mUserdata", "", "setUserdata", array("'DefaultValue" . $class->getClearClass() . "{$par1}'", "\$('{$par1}').checked ? 1 : 0", "''", "0", "1"), "checkResponse(transport);"); } $B->type("icon"); $B->style("float:right;"); if ($this->types[$par1] != "checkbox") { $this->setInputStyle($par1, "width:90%;"); } $this->buttonsNextToFields[$par1] = $B; break; case "addCustomButton": $par2->style("float:right;"); $par2->type("icon"); $this->setInputStyle($par1, "width:90%;"); $this->buttonsNextToFields[$par1] = $par2; break; case "addAnotherLanguageButton": $B = new Button("andere Sprachen", "./images/i2/sprache.png"); if ($class->getID() != -1) { #$B->rme("mMultiLanguage","","getPopupHTML",array("'".$class->getClearClass()."'","'".$class->getID()."'","'".$par1."'"),"Popup.create(\'".$class->getID()."\', \'altLang".$class->getClearClass()."\', \'Alternative Sprachen\'); Popup.update(transport, \'".$class->getID()."\', \'altLang".$class->getClearClass()."\');"); $B->popup("", "Alternative Sprachen", "mMultiLanguage", "", "getPopupHTML", array("'" . $class->getClearClass() . "'", "'" . $class->getID() . "'", "'" . $par1 . "'")); } else { $B->onclick("alert('Sie müssen den Artikel zuerst speichern, bevor Sie Übersetzungen eintragen können')"); } $B->type("icon"); $B->style("float:right;"); $this->setInputStyle($par1, "width:90%;"); $this->buttonsNextToFields[$par1] = $B; break; } }
function activateFeature($feature, $class, $par1 = null, $par2 = null, $par3 = null) { switch ($feature) { case "reloadOnNew": #if($class instanceof PersistentObject AND $class->getID() == -1) #$this->setJSEvent("onSave","function(transport){ contentManager.reloadOnNew(transport, '".$class->getClearClass()."'); }"); if ($class instanceof Collection) { $this->GUIFactory->addToEvent("onNew", "contentManager.reloadFrame('contentRight');"); } break; case "CRMEditAbove": #$this->features["CRMEditAbove"] = ""; $new = "contentManager.loadFrame('subFrameEdit%COLLECTIONNAME', '%CLASSNAME', %CLASSID, 0, '', function(transport) { \$j('#subFrameEdit%COLLECTIONNAME').show(); \$j('#subFrame%COLLECTIONNAME').hide(); });"; if ($par1 != null) { $new = $par1; } $this->GUIFactory->replaceEvent("onNew", $new); $this->GUIFactory->replaceEvent("onDelete", "deleteClass('%CLASSNAME','%CLASSID', function() { contentManager.reloadFrame('contentLeft'); },'Eintrag wirklich löschen?');"); $this->GUIFactory->replaceEvent("onEdit", $new); #$this->functionDelete = ; #$this->functionNew = ; #$this->functionEdit = $this->functionNew; break; case "editInPopup": #$new = "contentManager.editInPopup('%CLASSNAME', %CLASSID, 'Eintrag bearbeiten', ''".($par1 != null ? ", $par1" : "").");"; #$this->GUIFactory->replaceEvent("onNew", $new); #$this->GUIFactory->replaceEvent("onEdit", $new); $this->GUIFactory->editInPopup($par1); break; case "addSaveDefaultButton": $B = new Button("als Standard-Wert speichern", "./images/i2/save.gif", "icon"); $name = "DefaultValue" . $class->getClearClass() . "{$par1}"; if (mb_strlen($name) > 50) { $name = "DV" . sha1($name); } if ($this->types[$par1] != "checkbox") { $B->rme("mUserdata", "", "setUserdata", array("'{$name}'", "\$j('[name={$par1}]').val()", "''", "0", "1"), "checkResponse(transport);"); } else { $B->rme("mUserdata", "", "setUserdata", array("'{$name}'", "\$j('[name={$par1}]').prop('checked') ? 1 : 0", "''", "0", "1"), "checkResponse(transport);"); } $B->style("float:right;"); #$this->inputStyle($par1, "width:90%;"); #$this->buttonsNextToFields[$par1] = $B; $this->addFieldButton($par1, $B); break; case "addAnotherLanguageButton": $B = new Button("andere Sprachen", "./images/i2/sprache.png", "icon"); if ($class->getID() != -1) { $B->popup("", "Alternative Sprachen", "mMultiLanguage", "", "getPopupHTML", array("'" . $class->getClearClass() . "'", "'" . $class->getID() . "'", "'" . $par1 . "'")); } else { $B->onclick("alert('Sie müssen den Artikel zuerst speichern, bevor Sie Übersetzungen eintragen können')"); } $B->style("float:right;"); #$this->setInputStyle($par1,"width:90%;"); $this->addFieldButton($par1, $B); break; } }
public static function getButton() { $AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL"); $AWVButton->popup("", "Müllabfuhr-Daten", "mAWV", "-1", "downloadTrashData"); return $AWVButton; }
public function __toString() { #$style = ""; if ($this->type == "date" and strpos($this->style, "width:") === false) { $this->style .= "width:87%;"; } #if($this->style != null) $style = " style=\"$this->style\""; switch ($this->type) { case "audio": return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>"; break; case "HTMLEditor": $B = new Button("in HTML-Editor\nbearbeiten", "editor"); $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}"); $B->className("backgroundColor2"); return $B->__toString(); break; case "TextEditor": #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>"; $B = new Button("in Editor\nbearbeiten", "editor"); $B->className("backgroundColor2"); $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');"); $ITA = new HTMLInput($this->name, "textarea", $this->value); $ITA->id($this->name); $ITA->style("display:none;"); return $B->__toString() . $ITA; break; case "tinyMCE": $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'"); if (isset($this->options[2])) { $BO[] = "'{$this->options[2]}'"; } $B = new Button("in Editor\nbearbeiten", "editor"); #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}"); $B->popup("", "Editor", "Wysiwyg", "-1", "editInPopup", $BO, "", "Popup.presets.large"); $B->className("backgroundColor2"); $ITA = new HTMLInput($this->name, "textarea", $this->value); return $B->__toString() . $ITA; break; case "multiInput": return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>"; break; /*case "customSelection": $B = new Button("Eintrag auswählen...", "gutschrift"); $B->type("LPBig"); $B->style("float:right;margin-left:10px;"); # "contentRight" "callingPluginID" "selectPlugin" $B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]); return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />"; break;*/ /*case "customSelection": $B = new Button("Eintrag auswählen...", "gutschrift"); $B->type("LPBig"); $B->style("float:right;margin-left:10px;"); # "contentRight" "callingPluginID" "selectPlugin" $B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]); return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />"; break;*/ case "textarea": if ($this->isDisplayMode) { return nl2br($this->value); } if ($this->multiEditOptions != null) { $this->id($this->name . "ID" . $this->multiEditOptions[1]); $this->onfocus .= " oldValue = this.value;"; $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; if ($this->hasFocusEvent) { $this->onfocus .= "focusMe(this);"; $this->onblur .= "blurMe(this);"; } $this->hasFocusEvent = false; } return "<textarea\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>"; break; case "file": $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000); return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar QQUploader = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\telement: \$('{$currentId}'),\n\t\t\t\t\t\t\taction: './interface/set.php',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$('progress_{$currentId}').style.display = 'block';},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$('progress_{$currentId}').style.display = 'none'; if(checkResponse(transport)) { {$this->onchange} } },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$('progressBar_{$currentId}').style.width = Math.ceil((loaded / total) * 100)+'%'; }});\n\t\t\t\t\t</script>"; break; case "radio1": case "date": case "text": case "hidden": case "submit": case "button": case "password": case "checkbox": case "readonly": $JS = ""; if ($this->type == "radio1") { $this->type = "radio"; } if ($this->isDisplayMode) { if ($this->type == "checkbox") { return Util::catchParser($this->value); } if ($this->type == "hidden") { return ""; } return $this->value . ""; } if ($this->hasFocusEvent) { $this->onfocus .= "focusMe(this);"; $this->onblur .= "blurMe(this);"; } $cal = ""; $B2 = ""; if ($this->type == "date") { if ($this->id == null) { $this->id = rand(10000, 90000); } $cal = new Button("", "./images/i2/calendar.gif"); $cal->onclick("\$j('#{$this->id}').focus();"); $cal->type("icon"); $cal->className("calendarIcon"); $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>"; $this->type = "text"; } $value = "value=\"" . htmlspecialchars($this->value) . "\""; if ($this->type == "checkbox") { $value = $this->value == "1" ? "checked=\"checked\"" : ""; } if ($this->multiEditOptions != null) { $this->id($this->name . "ID" . $this->multiEditOptions[1]); if ($this->type == "checkbox") { $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; } else { $this->onfocus .= " oldValue = this.value;"; $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"; } } if ($this->autocomplete != null) { if ($this->id == null) { $this->id = $this->name; } /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);"; $this->onblur .= " ACInputHasFocus = false; AC.end(this);"; $this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/ $this->autocompleteBrowser = false; $cal = new Button("Suche", "./images/i2/details.png"); $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();"); $cal->type("icon"); $cal->className("calendarIcon"); if ($this->autocomplete[4] != null) { $B2 = $this->autocomplete[4]; $B2->style("float:right;margin-left:5px;"); $this->style .= "width:80%"; } else { $this->style .= "width:87%"; } if ($this->autocomplete[1] == null) { $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}Display').focus();"); $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value)); $IN->id($this->name); $JS .= $IN; $this->autocomplete[1] = "function(selection){ \$('{$this->id}').value = selection.value; \$('{$this->id}Display').value = selection.label; return false; }"; if ($this->value != "") { $C = substr($this->autocomplete[0], 1) . "GUI"; $C = new $C($this->value); $value = "value=\"" . htmlspecialchars($C->ACLabel()) . "\""; } $this->id .= "Display"; } $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li></li>\" )\n\t\t\t\t\t\t\t.data( \"item.autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};"); } return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}"; break; case "option": return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>"; break; case "radio": $html = ""; foreach ($this->options as $k => $v) { $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>"; } return $html; break; case "select": case "select-multiple": if ($this->type == "select-multiple") { $values = trim($this->value) != "" ? explode(";:;", $this->value) : array(); } if ($this->isDisplayMode) { return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value]; } if ($this->multiEditOptions != null) { $this->onchange("saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");"); $this->id($this->name . "ID" . $this->multiEditOptions[1]); } $html = "<select " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">"; if ($this->options != null and is_array($this->options)) { foreach ($this->options as $k => $v) { if (!is_object($v)) { if ($this->type == "select") { $isThisIt = $this->value == $k; } else { $isThisIt = in_array($k, $values); } $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>"; } else { if ($this->value == $k or $v->getValue() == $this->value) { $v->isSelected(true); } $html .= $v; } } } $html .= "</select>"; return $html; break; } }
public function directory($ObjectID) { $result = $this->Browse($ObjectID, "BrowseDirectChildren", ""); $xml = new SimpleXMLElement($result["Result"]); #echo "<pre style=\"max-height:300px;overflow:auto;padding:5px;\">"; #$this->prettyfy($result["Result"]); /* $this->prettyfy('<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>0$3$35R1138699</ObjectID><BrowseFlag>BrowseMetadata</BrowseFlag><Filter>*</Filter><StartingIndex>0</StartingIndex><RequestedCount>0</RequestedCount><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>'); $this->prettyfy('<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><Result><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:arib="urn:schemas-arib-or-jp:elements-1-0/" xmlns:dtcp="urn:schemas-dtcp-com:metadata-1-0/" xmlns:pv="http://www.pv.com/pvns/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="0$3$35R1138699" refID="0$3$28I1138699" parentID="0$3$35" restricted="1"><dc:title>ddlsource.com_banshee.s01e10.720p.hdtv.x264-2hd</dc:title><dc:date>2013-03-16</dc:date><upnp:genre>Unknown</upnp:genre><upnp:album>Entertain</upnp:album><upnp:albumArtURI dlna:profileID="JPEG_TN" >http://192.168.7.123:9000/disk/defaultalbumart/nocover_video.jpg/O0$3$28I1138699.jpg?scale=160x160</upnp:albumArtURI><pv:extension>mkv</pv:extension><pv:modificationTime>1363415976</pv:modificationTime><pv:addedTime>1363515970</pv:addedTime><pv:lastUpdated>1363415976</pv:lastUpdated><res duration="0:57:14.496" size="1372420691" resolution="1280x716" protocolInfo="http-get:*:video/x-matroska:DLNA.ORG_PN=MKV;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000" >http://192.168.7.123:9000/disk/DLNA-PNMKV-OP01-FLAGS01700000/O0$3$28I1138699.mkv</res><upnp:class>object.item.videoItem.movie</upnp:class></item></DIDL-Lite></Result><NumberReturned>1</NumberReturned><TotalMatches>1</TotalMatches><UpdateID>0</UpdateID></u:BrowseResponse></s:Body></s:Envelope>'); */ #echo "</pre>"; $L = new HTMLList(); $ex = explode("\$", $ObjectID); array_pop($ex); $B = new Button("Zurück", "back"); $B->popup("", "", "UPnP", $this->getID(), "directory", implode("\$", $ex)); $B->style("margin:10px;"); if (count($ex) == 0) { $B = ""; } $BD = new Button("Als Start-Verzeichn.\nsetzen", "system"); $BD->style("margin:10px;"); $BD->onclick("\$j('[name=UPnPDefaultMediacenterDirectory]').val('{$ObjectID}'); saveClass('UPnPGUI', '" . $this->getID() . "', function(transport){ contentManager.reloadFrame('contentRight'); }, 'editUPnPGUI')"); foreach ($xml->container as $container) { $L->addItem("<a href=\"#\" onclick=\"" . OnEvent::popup("", "UPnP", $this->getID(), "directory", $container->attributes()->id) . " return false;\">" . $container->children("http://purl.org/dc/elements/1.1/") . "</a>"); } foreach ($xml->item as $item) { #".OnEvent::popup("", "UPnP", $this->getID(), "readSetStart", array("'".$item->attributes()->id."'"))." $L->addItem("<a href=\"#\" onclick=\"return false;\">" . $item->children("http://purl.org/dc/elements/1.1/") . "</a>"); } echo $B . $BD . "<div style=\"max-height:450px;overflow:auto;padding:5px;\">" . $L . "</div>"; }
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; }
public static function parserCache($w, $l, $E) { $B = new Button("Cache anzeigen", "./images/i2/details.png", "icon"); $B->style("float:right;"); $B->popup("", "Cache anzeigen", "RSSParser", $E->getID(), "showCache", "", "", "{width:600}"); return $B . Util::formatByte(strlen($w)); }