本文整理汇总了PHP中OnEvent::rme方法的典型用法代码示例。如果您正苦于以下问题:PHP OnEvent::rme方法的具体用法?PHP OnEvent::rme怎么用?PHP OnEvent::rme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OnEvent
的用法示例。
在下文中一共展示了OnEvent::rme方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTML
function getHTML($id)
{
#$p = mUserdata::getPluginSpecificData("mStatistik");
#if(!isset($p["pluginSpecificCanUseControlling"]))
# return;
$html = "";
#parent::getHTML($id);
$tab = new HTMLTable(1);
$tab->addRow("<div id=\"my_chartTodo\" style=\"height:200px;width:470px;\"></div>");
$tab->addRowClass("backgroundColor0");
$AC = $this->data();
$U = Users::getUsersArray(null, true);
$U[-1] = "Allgemein";
$T = new HTMLTable(6);
$T->addColStyle(2, "text-align:right;");
$T->addColStyle(3, "text-align:right;");
$T->addColStyle(4, "text-align:right;");
$T->addColStyle(5, "text-align:right;");
$T->addColStyle(6, "text-align:right;");
$T->addHeaderRow(array("Benutzer", "Gesamt", "Abgesch.", "Kalt", "Erst", "Folge"));
while ($A = $AC->n()) {
$T->addRow(array(isset($U[$A->A("TodoUserID")]) ? $U[$A->A("TodoUserID")] : "Benutzer ID " . $A->A("TodoUserID"), $A->A("gesamt"), $A->A("gesamtDM") . " (" . Util::CLNumberParserZ($A->A("gesamt") != 0 ? round($A->A("gesamtDM") / $A->A("gesamt") * 100, 2) : 0) . "%)", $A->A("gesamtKalt"), $A->A("gesamtErst"), $A->A("gesamtFolge")));
$T->addRowStyle("cursor:pointer;");
$T->addRowEvent("click", OnEvent::rme($this, "details", array($A->A("TodoUserID")), "function(t){ \$j('#contentScreenLeft').html(t.responseText); }"));
}
if ($AC->numLoaded() == 0) {
$T->addRow(array("Es liegen keine Daten vor"));
$T->addRowColspan(1, 4);
}
return "<p class=\"prettySubtitle\">Termine</p>" . $tab . $html . $T . OnEvent::script("\n\t\t\tvar plot = \$j.plot(\$j('#my_chartTodo'), " . $this->chart() . ", {\n\t\t\tseries: {\n\t\t\t\tpie: { show: true, innerRadius: 0.4 }\n\t\t\t}\n\t\t\t});" . OnEvent::rme($this, "getHeaderCenter", "", "function(transport){ \$j('#contentScreenCenterHeader').html(transport.responseText); }"));
}
示例2: message
function message()
{
$BS = new Button("Nachricht", "comment_alt2_stroke", "iconicL");
$BS->style("float:left;");
$read = false;
$message = $this->messageParser();
#$this->A("NuntiusMessage");
if ($this->A("NuntiusRead") > "0") {
$read = true;
$BS = new Button("Nachricht", "check", "iconicL");
$BS->style("float:left;color:darkgreen;");
$ex = explode("\n", $message);
$message = "<span style=\"color:grey;\">" . $ex[0];
if (isset($ex[1])) {
$message .= " …";
}
$message .= "</span>";
}
$from = "";
$ex = explode(":", $this->A("NuntiusSender"));
if ($ex[0] == "Device") {
$D = new Device($ex[1]);
$from = $D->A("DeviceName");
}
if ($ex[0] == "FritzBox") {
$from = $this->A("NuntiusSender");
}
if ($ex[0] == "Mobile") {
$from = $this->A("NuntiusSender");
}
return "\n\t\t\t<div id=\"Nuntius" . $this->getID() . "\" style=\"cursor:pointer;" . ($read ? "" : "background-color:#efefef;") . "min-height:40px;margin-bottom:10px;margin-top:10px;\" onclick=\"" . OnEvent::rme($this, "read", "", "function(t){ \$j('#Nuntius" . $this->getID() . "').replaceWith(t.responseText); fheOverview.loadContent('mNuntiusGUI::getOverviewContent'); }") . "\">\n\t\t\t\t{$BS}\n\t\t\t\t<div style=\"margin-left:40px;\" class=\"\">\n\t\t\t\t\t<p><small style=\"float:right;color:grey;\">Von {$from}, " . Util::CLDateTimeParser($this->A("NuntiusTime")) . "</small>" . nl2br($message) . "</p>\n\t\t\t\t</div>\n\t\t\t</div>";
}
示例3: inPopup
public function inPopup()
{
if ($_SESSION["S"]->isUserAdmin() == "0") {
throw new AccessDeniedException();
}
$TB = new HTMLTable(3);
$TB->addColStyle(2, "text-align:right;");
$TB->setColWidth(2, "80px");
$TB->setColWidth(3, "32px");
$gesamt = 0;
$list = $this->getBackupsList();
foreach ($list as $name => $size) {
$RB = new Button("Diese Sicherung wiederherstellen", "bestaetigung", "icon");
$RB->onclick("if(confirm('Sind Sie sicher, dass dieses Backup wiederhergestellt werden soll? Es werden dabei alle Daten in der Datenbank überschrieben!')) ");
$RB->rmePCR("BackupManager", "", "restoreBackup", $name, OnEvent::rme(new mInstallationGUI(), "getActions", "", "function(transport){ contentManager.contentBelow(transport.responseText); }") . OnEvent::closePopup("BackupManager") . " Popup.displayNamed('BackupManagerGUI','Backup-Manager', transport);");
$RD = new Button("Backup anzeigen", "./images/i2/search.png", "icon");
$RD->windowRme("BackupManager", "", "displayBackup", $name);
$RD->style("float:left;margin-right:5px;");
$TB->addRow(array($RD . $name, Util::formatByte($size, 2), $RB));
$gesamt += $size;
}
#$ST = new HTMLSideTable("right");
if (count($list) == 0) {
return "<p>Es wurden noch keine Sicherungen angelegt.</p>";
}
echo $TB;
}
示例4: sortable
public static function sortable($selector, $handle, $saveTo = null, $axis = "y", $connectWith = null, $placeholder = null, $onUpdateComplete = "", $additionalParameters = array())
{
if ($saveTo != null) {
$ex = explode("::", $saveTo);
$saveTo = OnEvent::rme($ex[0], $ex[1], array_merge(array("Sortable.serialize('{$selector}')"), $additionalParameters), $onUpdateComplete);
}
return "\n\t\t\$j('{$selector}').sortable({\n\t\t\t" . ($axis != "" ? "axis: '{$axis}', " : "") . "\n\t\t\tupdate: function(){" . ($saveTo == null ? "" : $saveTo) . "},\n\t\t\t" . ($connectWith != null ? "connectWith: \$j('{$connectWith}')," : "") . "\n\t\t\tdropOnEmpty: true,\n\t\t\t" . ($placeholder != null ? "placeholder: '{$placeholder}', " : "") . "\n\t\t\t" . ($handle != null ? "handle: \$j('{$handle}')" : "") . "\n\t\t});";
}
示例5: openInPopup
public function openInPopup($className, $classID, $fieldName)
{
$C = new $className($classID);
$ITA = new HTMLInput("nicEditor", "textarea");
$ITA->id("nicEditor");
$ITA->style("width:998px;height:300px;");
echo $ITA;
echo OnEvent::script("\n\$j('#nicEditor').val('" . addslashes($C->A($fieldName)) . "'.makeHTML());\n\nsetTimeout(function(){\n\tnew nicEditor({\n\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\tbuttonList : ['save','bold','italic','underline','hr'],\n\t\tmaxHeight : 400,\n\n\t\tonSave : function(content, id, instance) {\n\t\t\tif(content.substr(0, 3) != '<p ' && content.substr(0, 3) != '<p>')\n\t\t\t\tcontent = '<p>'+content+'</p>';\n\t\t\t\n\t\t\t" . OnEvent::rme($C, "saveMultiEditField", array("'{$fieldName}'", "content.replace(/<br>/g, '<br />')")) . "\n\n\t\t\t" . OnEvent::closePopup("nicEdit") . "\n\t\t}\n\t}).panelInstance('nicEditor');}, 100);");
}
示例6: getContextMenuHTML
public function getContextMenuHTML($identifier)
{
$I = new HTMLInput("CalculatorRechner");
$I->onEnter(OnEvent::rme($this, "calculate", array("\$j('input[name=CalculatorRechner]').val()"), "function(t){ if(t.responseText != '##') { \$j('{$identifier}').val(t.responseText); " . OnEvent::closeContext() . " } }"));
$I->requestFocus(true);
echo $I;
echo "<div id=\"CalculatorErgebnisse\"></div>";
echo "<p>Dieser Rechner unterstützt +, -, *, / sowie Klammern.</p>";
echo OnEvent::script("\$j('input[name=CalculatorRechner]').val(\$j('{$identifier}').val());");
}
示例7: addSettingPopup
public function addSettingPopup()
{
$T = new HTMLTable(2);
$T->setColWidth(1, 20);
$T->useForSelection(false);
$S = new System(1);
$B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon");
foreach ($S->types as $k => $v) {
$T->addRow(array($B, $v->name));
$T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }"));
}
echo $T;
}
示例8: tipJS
public static function tipJS($plugin)
{
$targetClass = $plugin;
if (mUserdata::getUDValueS("hideTooltips", "0")) {
return;
}
$hide = mUserdata::getUDValueS("hideTooltip{$targetClass}", "0");
if ($hide) {
return;
}
$xml = SpellbookGUI::getSpell($targetClass);
$entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
return OnEvent::script("\$j('#{$targetClass}MenuImage').qtip(\$j.extend({}, qTipSharedRed, {\n\t\tcontent: {\n\t\t\ttext: '" . $xml->plugin[0]->description . "<br /><div style=\"margin-top:10px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltip{$targetClass}'", "'1'", "''", "0", "1"))) . " return false;\">Diesen Tipp nicht mehr anzeigen</a></div><div style=\"clear:both;margin-top:5px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltips'", "'1'", "''", "0", "1"))) . " return false;\">Keine Tipps mehr anzeigen</a></div>', \n\t\t\ttitle: {\n\t\t\t\ttext: '" . array_search($targetClass, $entries) . "',\n\t\t\t\tbutton: true\n\t\t\t}\n\t\t}\n\t}));");
}
示例9: getSortable
public function getSortable($echo)
{
$entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
#$appMenuHidden = MenuGUI::getAppMenuOrder("appMenuHidden");
$appMenuDisplayed = MenuGUI::getAppMenuOrder("appMenuDisplayed");
if ($appMenuDisplayed == "") {
$appMenuDisplayed = implode(";", $_SESSION["CurrentAppPlugins"]->getMenuEntries());
}
$es = MenuGUI::sort($entries, $appMenuDisplayed);
#, $appMenuHidden);
$appMenuDisplayed = explode(";", $appMenuDisplayed);
$L = new HTMLList();
$L->addListStyle("list-style-type:none;margin-left:0px;margin-top:10px;");
$es = array_reverse($es, true);
foreach ($es as $key => $value) {
if (!in_array($value, $appMenuDisplayed)) {
continue;
}
$L->addItem($key);
$L->addItemClass("containerSortTabsHandle");
$L->addItemStyle("padding:5px;cursor:move;margin:0px;");
$L->setItemID("appMenu_{$value}");
}
#$I = new HTMLInput("showAgain", "checkbox");
#$I->style("float:left;margin-right:5px;");
#$I->onclick(addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltipDashboard'", "'1'"))));
$L .= OnEvent::script(OnEvent::sortable("#containerSortTabs ul", ".containerSortTabsHandle", "Spellbook::updateOrder", "y", null, null, "Menu.refresh();") . "\$j('#containerSortTabs ul li').hover(function() {\n \$j(this).addClass('backgroundColor2');\n }, function() {\n \$j(this).removeClass('backgroundColor2');\n });\n\t" . ((mUserdata::getUDValueS("hideTooltipDashboard", "0") == "0" and mUserdata::getUDValueS("hideTooltips", "0") == "0") ? "\n\t\$j('#SpellbookMenuEntry img').qtip(\$j.extend({}, qTipSharedRed, {\n\t\tcontent: {\n\t\t\ttext: 'Klicken Sie auf die Weltkugel, um die angezeigten Plugins und ihre Reihenfolge zu ändern.<br /><div style=\"margin-top:10px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltipDashboard'", "'1'", "''", "0", "1"))) . " return false;\">Diesen Tipp nicht mehr anzeigen</a></div><div style=\"clear:both;margin-top:5px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltips'", "'1'", "''", "0", "1"))) . " return false;\">Keine Tipps mehr anzeigen</a></div>', \n\t\t\ttitle: {\n\t\t\t\ttext: 'Dashboard',\n\t\t\t\tbutton: true\n\t\t\t}\n\t\t}\n\t}));" : ""));
$L = "<h2 style=\"padding-left:0px;\">Reihenfolge</h2>{$L}";
if ($echo) {
echo $L;
}
return $L;
}
示例10: getSetTable
function getSetTable($DeviceID, $values)
{
$controls = new HTMLTable(1);
$controls->setTableStyle("width:100%;border:0px;");
$i = 0;
foreach ($values as $v => $l) {
$controls->addRow(array($l));
$controls->addRowClass("backgroundColor0");
$controls->addCellStyle(1, "padding-top:10px;padding-bottom:10px;cursor:pointer;");
if ($i != count($values) - 1) {
$controls->addCellStyle(1, "border-bottom-style:solid;border-bottom-width:1px;");
$controls->addCellClass(1, "borderColor1");
}
$controls->addCellEvent(1, "click", OnEvent::rme($this, "setDevice", array(str_replace(array("D", "H"), "", $DeviceID), "'{$v}'"), "function(){ \$j('#controls_{$DeviceID}').hide(); if(Fhem.doAutoUpdate) Fhem.requestUpdate(); }"));
$i++;
}
$controls = "<div id=\"controls_{$DeviceID}\" style=\"display:none;width:50px;position:absolute;margin-left:150px;border-style:solid;border-width:1px;padding:3px;\" class=\"borderColor1 backgroundColor0 fhemeControl\">{$controls}</div>";
return $controls;
}
示例11: popupSearchCity
public function popupSearchCity()
{
$I = new HTMLInput("city");
$I->onEnter(OnEvent::rme($this, "searchCity", array("this.value"), "function(t){ \$j('#searchCityResults').html(t.responseText); }"));
echo $I . "<div id=\"searchCityResults\"></div>";
}
示例12: popupDesktop
public function popupDesktop($DeviceID)
{
$O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
$d = json_decode($O->A("fheOverviewDesktop"));
$BD = new Button("Fertig", "bestaetigung");
$BD->onclick("fheOverview.draggableStop(); " . OnEvent::closePopup("mfheOverview"));
$BD->style("float:right;margin:10px;");
echo $BD . "<div style=\"clear:both;\"></div>";
$T = new HTMLTable(2, "Plugins");
$T->useForSelection();
$T->weight("light");
while ($callback = Registry::callNext("Overview")) {
$c = $callback->className();
$B = new Button("Plugin hinzufügen", "arrow_left", "iconic");
$T->addRow(array($B, $callback->name()));
$T->addRowEvent("click", OnEvent::rme("mfheOverview", "pluginLoad", array($DeviceID, "'" . $callback->className() . "'"), "function(t){ \$j('#addPlugin{$c}').hide(); \$j('#OverviewDesktop').append(t.responseText); }"));
$T->setRowID("addPlugin{$c}");
if (isset($d->{$c})) {
$T->addRowStyle("display:none;");
}
}
Registry::reset("Overview");
echo $T;
echo OnEvent::script("fheOverview.draggableStart({$DeviceID});");
$T = new HTMLTable(1, "Hintergrundbild");
$T->weight("light");
$ID = new Button("Bild löschen", "trash_stroke", "iconicL");
$ID->style("float:right;");
$ID->rmePCR("mfheOverview", "-1", "backgroundDelete", $DeviceID, "function(t){\$j('#OverviewDesktop').append(t.responseText); }");
$I = new HTMLInput("upload", "file", null, array("multiple" => false));
$I->onchange(OnEvent::rme($this, "backgroudUpload", array($DeviceID, "fileName"), "function(t){\$j('#OverviewDesktop').append(t.responseText); }"));
$T->addRow($ID . "<div style=\"margin-right:30px;\">" . $I . "</div>");
echo $T;
}
示例13: getContextMenuHTML
//.........这里部分代码省略.........
foreach ($ps as $key => $value) {
if ($key == "mUserdata") {
continue;
}
if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) {
continue;
}
if ($identifier == "4") {
$c = new $key();
if (!$c->getPluginSpecificRestrictions()) {
continue;
}
}
if ($identifier == "5" and !in_array($key, $ms)) {
continue;
}
if ($value == "Kunde") {
continue;
}
if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") {
$opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>";
}
}
$s = explode(":", $identifier);
if (isset($s[1])) {
$identifier = $s[0];
}
switch ($identifier) {
case "1":
$c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen";
$b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten";
$l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen";
echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
break;
case "Edit":
case "Delete":
case "Create":
echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
break;
case "3":
case "2":
echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
break;
case "5":
case "4":
if ($opts == "") {
die("<p>" . $text["noPsOptions"] . "</p>");
}
echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>";
break;
case "pS":
$c = new $s[1]();
$pSs = $c->getPluginSpecificRestrictions();
$pSopts = "";
foreach ($pSs as $key => $value) {
$pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>";
}
echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
break;
case "hide":
case "relabel":
try {
$c = new $s[1](-1);
$c = $c->newAttributes();
echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
} catch (ClassNotFoundException $e) {
echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>";
}
break;
case "copyFromUser":
$T = new HTMLTable(2);
$T->useForSelection();
$T->setColWidth(1, 20);
$T->maxHeight(200);
$G = new Users();
$G->addAssocV3("isAdmin", "=", "0");
$G->setLimitV3("10");
$G->lCV3();
while ($t = $G->getNextEntry()) {
$T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username")));
$T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');");
}
echo $T;
break;
case "login":
$T = new HTMLTable(2);
$T->useForSelection();
$T->setColWidth(1, 20);
$T->maxHeight(200);
$apps = Applications::getList();
foreach ($apps as $app) {
#rme("mUserdata","-1","setUserdata",new Array("hidePlugin"+$('relabelPlugin').value.split(":")[0],$('relabelPlugin').value.split(":")[0], "pHide", lastLoadedLeft),"contentManager.reloadFrameLeft()");
$T->addRow(array(new Button("", "./plugins/Userdata/login18.png", "icon"), "Kann sich nicht an '{$app}' anmelden"));
$T->addRowEvent("click", OnEvent::rme(new mUserdata(-1), "setUserdata", array("'loginTo{$app}'", "'0'", "'loginTo'", "lastLoadedLeft"), OnEvent::closeContext() . OnEvent::reload("Left")));
#$T->addRowEvent("click", "copyFromOtherUser('".$t->getID()."');");
}
echo $T;
break;
}
}
示例14: sidePanelAttachments
public function sidePanelAttachments($filesDir)
{
$I = new HTMLInput("TBAttachments", "file");
$I->onchange(OnEvent::rme($this, "processAttachmentUpload", array("'{$filesDir}'", "fileName"), " " . OnEvent::reloadSidePanel("tinyMCE")));
echo "<div style=\"padding:5px;height:50px;\">" . $I . "</div></div>";
if (!file_exists(FileStorage::getFilesDir() . "{$filesDir}")) {
mkdir(FileStorage::getFilesDir() . "{$filesDir}");
}
$T = new HTMLTable(2, "Bilder");
$dir = new DirectoryIterator(FileStorage::getFilesDir() . "{$filesDir}");
foreach ($dir as $file) {
if ($file->isDot()) {
continue;
}
if ($file->isDir()) {
continue;
}
$BI = new Button("Datei löschen", "./images/i2/insert.png", "icon");
$BD = new Button("Datei löschen", "./images/i2/delete.gif", "icon");
$BD->style("float:right;margin-left:5px;");
$BD->rmePCR("tinyMCE", "", "deleteAttachment", array("'{$filesDir}'", "'" . $file->getFilename() . "'"), OnEvent::reloadSidePanel("tinyMCE"));
$T->addRow(array($BI, "{$BD}<small style=\"color:grey;float:right;margin-top:4px;\">" . Util::formatByte($file->getSize()) . " </small>" . (strlen($file->getFilename()) > 15 ? substr($file->getFilename(), 0, 15) . "..." : $file->getFilename())));
$T->addRowStyle("cursor:pointer;");
$T->addRowEvent("click", "contentManager.tinyMCEAddImage('" . DBImageGUI::imageLink("tinyMCEGUI", $filesDir, $file->getFilename(), true) . "');");
}
echo $T;
}
示例15: reminderContent
public function reminderContent()
{
$html = "\n\t\t\t<div style=\"padding:5px;background-color:white;\">\n\t\t\t\t<div style=\"width:15%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tQuelle\n\t\t\t\t</div><div style=\"width:45%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tName\n\t\t\t\t</div><div style=\"width:33%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tZeit\n\t\t\t\t</div><div style=\"width:7%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"top\" style=\"height:124px;overflow:auto;\">\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<div id=\"bottom\" style=\"padding:5px;height:150px;box-sizing:border-box;background-color:white;overflow:auto;\">\n\t\t\t\n\t\t\t</div>";
echo self::getBasicHTML($html . OnEvent::script("function reloadList(){\n\t\t\t" . OnEvent::rme(new UtilGUI(), "reminderList", array(), "function(t){\n\t\t\t\tvar data = jQuery.parseJSON(t.responseText);\n\t\t\t\tfor(var i = 0; i < data.length; i++){\n\t\t\t\t\tif(\$j('#'+data[i][0]).length)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\$j('#top').append(data[i][1]);\n\t\t\t\t}\n\t\t\t\t//\$j('#top').html(t.responseText);\n\t\t\t}") . "\n\t\t};\n\t\tcontentManager.setRoot('../');\n\t\treloadList();"), "Erinnerungen");
}