当前位置: 首页>>代码示例>>PHP>>正文


PHP Button::windowRme方法代码示例

本文整理汇总了PHP中Button::windowRme方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::windowRme方法的具体用法?PHP Button::windowRme怎么用?PHP Button::windowRme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Button的用法示例。


在下文中一共展示了Button::windowRme方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getHTML

 public function getHTML($id)
 {
     if ($_SESSION["S"]->isUserAdmin() == "0") {
         throw new AccessDeniedException();
     }
     $TB = new HTMLTable(4, "Backup wählen");
     $TB->addColStyle(2, "text-align:right;");
     $TB->setColWidth(2, "80px");
     $TB->setColWidth(3, "20px");
     $TB->setColWidth(4, "20px");
     $gesamt = 0;
     foreach ($this->getBackupsList() as $name => $size) {
         $RB = new Button("Backup wiederherstellen", "./images/i2/okCatch.png");
         $RB->type("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}", "Popup.displayNamed('BackupManagerGUI','Backup-Manager', transport);");
         $RD = new Button("Backup anzeigen", "./images/i2/search.png");
         $RD->type("icon");
         $RD->windowRme("BackupManager", "", "displayBackup", "{$name}");
         $TB->addRow(array($name, Util::formatByte($size, 2), $RD, $RB));
         $gesamt += $size;
     }
     $TB->addRow("");
     $TB->addRowClass("backgroundColor0");
     $TB->addRow(array("<b>Gesamt:</b>", "<b>" . Util::formatByte($gesamt, 2) . "</b>"));
     $TB->addCellStyle(1, "text-align:right");
     $ST = new HTMLSideTable("right");
     $FTPServer = LoginData::get("BackupFTPServerUserPass");
     $FTPServerID = $FTPServer == null ? -1 : $FTPServer->getID();
     $BFTP = $ST->addButton("FTP-Server\neintragen", "./plugins/Installation/serverMail.png");
     $BFTP->popup("edit", "FTP-Server", "LoginData", $FTPServerID, "getPopup", "", "LoginDataGUI;preset:backupFTPServer");
     return $ST . $TB;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:33,代码来源:BackupManagerGUI.class.php

示例2: 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;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:27,代码来源:BackupManagerGUI.class.php

示例3: textParser

 public static function textParser($w, $E)
 {
     $B = new Button("in HTML-Editor bearbeiten", "./multiCMS/Content/html.png");
     $B->type("icon");
     $B->style("float:left;margin-right:5px;");
     $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:Content;FieldClassID:" . $E->getID() . ";FieldName:text");
     return $B . substr(strip_tags($w, "<a><i><b><strong><img>"), 0, 150);
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:8,代码来源:mContentGUI.class.php

示例4: getHTML

 public function getHTML($id, $page)
 {
     $B = new Button("AWV für\nExport", "./lightCRM/AWV/AWV.png");
     $B->style("float:right;margin-right:10px;");
     $B->windowRme("mAWV", "-1", "downloadTrashExport");
     echo $B;
     $B = new Button("AWV in\nKalender", "./lightCRM/AWV/AWV.png");
     $B->popup("", "Müllabfuhr-Daten", "mAWV", "-1", "downloadTrashData");
     echo $B;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:10,代码来源:mAWVGUI.class.php

示例5: getHTML

 function getHTML($id)
 {
     $this->addOrderV3("PatchID");
     $this->lCV3($id);
     $gui = new HTMLGUI();
     $gui->setName("Updates");
     $gui->setAttributes($this->collector);
     $gui->setCollectionOf($this->collectionOf, "Update");
     $gui->setShowAttributes(array("PatchDescription", "PatchExecuted"));
     $gui->setParser("PatchExecuted", "Util::catchParser");
     $gui->setParser("PatchDescription", "mPatchGUI::descriptionParser");
     #$gui->setIsDisplayMode(true);
     #$gui->setEditInDisplayMode(true,"contentLeft");
     #$gui->setDeleteInDisplayMode(false);
     $BXML = new Button("XML\nerzeugen", "empty");
     $BXML->style("float:right;");
     $BXML->windowRme("mPatch", "-1", "getXML", "");
     if (strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") === false) {
         $BXML = "";
     }
     $BU = new Button("Updates\naktualisieren", "refresh");
     $BU->rmePCR("mPatch", "-1", "update", "", "function(transport){ if(transport.responseText != 'error') " . OnEvent::reload("Right") . " else new Effect.BlindDown('errorMessage'); }");
     $T = new HTMLTable(1, "Einzelne Aktualisierungen");
     $T->addRow(array($BU . $BXML . "\n\t\t\t\t\t<div id=\"errorMessage\" style=\"display:none;color:red;\">Es konnte keine Verbindung zum Updates-Server hergestellt werden.<br />Bitte stellen Sie folgende Voraussetzungen sicher:\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>Der Server mit Ihrer Installation kann eine Verbindung ins Internet aufbauen.</li>\n\t\t\t\t\t\t<li>Sie benutzen die aktuellste Version des Update-Plugins.</li>\n\t\t\t\t\t</ul></div>"));
     $html = OnEvent::script("var Patch = { popup: { 'width':600, 'hPosition': 'center', hasX: false } }") . $T;
     /*"
     		<table>
     			<colgroup>
     				<col class=\"backgroundColor3\" />
     			</colgroup>
     			<tr>
     				<td>
     					".(strpos($_SERVER["SCRIPT_FILENAME"], "/nemiah") !== false ? "<input
     						style=\"float:right;\"
     						onclick=\"windowWithRme('mPatch','','getXML','');\"
     						type=\"button\"
     						class=\"bigButton backgroundColor2\"
     						value=\"XML\nerzeugen\"
     					/>" : "")."
     					<input
     						style=\"background-image:url(./images/navi/refresh.png);\"
     						onclick=\"rme('mPatch','','update','','if(transport.responseText != \'error\') contentManager.reloadFrameRight(); else new Effect.BlindDown(\'errorMessage\');');\"
     						type=\"button\"
     						class=\"bigButton backgroundColor2\"
     						value=\"Updates\naktualisieren\"
     					/>
     				</td>
     			</tr>
     		</table>";*/
     #else
     #	$html = "";
     $F = new HTMLForm("updateForm", array("file"), "Die Anwendung aktualisieren");
     $F->getTable()->setColWidth(1, 120);
     $F->setType("file", "file");
     $F->setLabel("file", "Paket");
     $F->addJSEvent("file", "onChange", "Overlay.showDark(0.1, 0.8); " . OnEvent::popup("Anwendungsaktualisierung", "mPatch", "-1", "processUpdate", array("fileName"), "", "Patch.popup"));
     $F->setDescriptionField("file", "Hier aktualisieren Sie Ihre komplette Anwendung mit einem neuen Paket, das Sie von Furtmeier Hard- und Software erhalten haben.<br /><br />Sie können damit sowohl neue Versionen (Update) einspielen als auch eine mit Plugins erweiterte Version (Upgrade) einrichten.<br /><br />Alle Dateien werden vorher gesichert und alle eingetragenen Daten bleiben erhalten.");
     try {
         return ($id == -1 ? $F . "<div style=\"height:30px;\"></div>" . $html : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
     return $html;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:63,代码来源:mPatchGUI.class.php

示例6: rightCol

 public function rightCol($return = false)
 {
     $useDir = realpath(FileStorage::getFilesDir());
     $path = BPS::getProperty("mFileGUI", "path", false);
     if ($path) {
         $path = preg_replace("/^([A-Z])%/", "\\1:", $path);
         if (strpos($path, realpath(FileStorage::getFilesDir())) === 0) {
             $useDir = $path;
         }
     }
     $writable = is_writable($useDir);
     $readable = is_readable($useDir);
     $this->setDir($useDir);
     $this->loadMultiPageMode(-1, 0, 10000);
     $showPath = str_replace(realpath(FileStorage::getFilesDir()), "", $useDir);
     $BH = new Button("Root", "home", "iconicL");
     $BH->onclick($this->pather(FileStorage::getFilesDir()));
     $BH->style("float:left;");
     $way = realpath(FileStorage::getFilesDir());
     $bread = "<div style=\"vertical-align:top;display:inline-block;border-right:1px solid #aaa;\" class=\"isFolder\" data-path=\"{$way}\">{$BH}&nbsp;</div>";
     foreach (explode(DIRECTORY_SEPARATOR, $showPath) as $k => $v) {
         if ($k == 0) {
             continue;
         }
         $way .= DIRECTORY_SEPARATOR . "{$v}";
         $bread .= "<div class=\"selectionRow isFolder\" data-path=\"{$way}\" onclick=\"" . $this->pather($way) . "\" style=\"padding:8px;cursor:pointer;border-right:1px solid #aaa;color:#555;vertical-align:top;display:inline-block;padding-left:20px;padding-right:20px;border-bottom:0px;\">{$v}</div>";
     }
     $I = new HTMLInput("upload", "file", null, array("path" => $way, "class" => "File"));
     $I->style("width:250px;");
     $I->onchange($this->pather($way));
     $IN = new HTMLInput("newDir", "text");
     $IN->placeholder("Neues Verzeichnis");
     $IN->style("width:250px;margin-right:20px;");
     $IN->onEnter(OnEvent::rme($this, "makeDir", array("'{$way}'", "\$j(this).val()"), "function(){ " . $this->pather($way) . " }"));
     $ISA = new HTMLInput("selectAll", "checkbox");
     $ISA->onchange("console.log(\$j(this).prop('checked')); \$j('.selectFile').prop('checked', \$j(this).prop('checked'));");
     if (!$writable or !$readable) {
         $I = "";
         $IN = "";
     }
     $html = "\n\t\t\t<div style=\"background-color:#F7F7F7;border-bottom:1px solid #ddd;\">\n\t\t\t\t{$bread}\n\t\t\t\t<div style=\"display:inline-block;margin-top:2px;float:right;\">{$IN}</div>\n\t\t\t\t<div style=\"display:inline-block;margin-top:1px;float:right;\">{$I}</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div id=\"filesFrame\" style=\"overflow:auto;\">\n\t\t\t<form id=\"dlFiles\">\n\t\t\t<div style=\"border-bottom:1px solid #ddd;color:#777;\">\n\t\t\t\t<div style=\"display:inline-block;float:right;padding:5px;\">\n\t\t\t\t\tGröße\n\t\t\t\t\t<div style=\"display:inline-block;width:64px;\">&nbsp;</div>\n\t\t\t\t</div>\n\t\t\t\t<!--<div style=\"display:inline-block;width:57px;float:left;padding-left:5px;\">{$ISA}</div>-->\n\t\t\t\t<div style=\"display:inline-block;width:26px;float:left;padding-left:5px;\">&nbsp;</div>\n\t\t\t\t<div style=\"padding:5px;\">Dateiname</div>\n\t\t\t</div>";
     if (!$readable) {
         $html .= "<div style=\"padding:5px;\" class=\"highlight\">Das Verzeichnis <code>{$useDir}</code> ist nicht lesbar.</div>";
         return $html;
     }
     if (!$writable) {
         $html .= "<div style=\"padding:5px;\" class=\"highlight\">Das Verzeichnis {$useDir} ist nicht beschreibbar.<br />\n\t\t\t\tEs können keine Unterverzeichnisse angelegt oder Dateien hochgeladen werden.<br />\n\t\t\t\tBitte machen Sie das Verzeichnis mit <code>chmod 777 " . basename($useDir) . "</code> durch den Webserver beschreibbar.</div>";
     }
     $i = 0;
     while ($F = $this->getNextEntry()) {
         if ($F->A("FileName") == "." or $F->A("FileName") == "..") {
             continue;
         }
         $ext = Util::ext($F->A("FileName"));
         $B = "";
         if ($F->A("FileIsDir")) {
             $B = new Button("Verzeichnis öffnen", "./plugins/Files/icons/folder.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         } elseif (!$F->A("FileIsDir") and file_exists(dirname(__FILE__) . "/icons/file_extension_{$ext}.png")) {
             $B = new Button("", "./plugins/Files/icons/file_extension_{$ext}.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         } elseif (!$F->A("FileIsDir") and !file_exists(dirname(__FILE__) . "/icons/file_extension_{$ext}.png")) {
             $B = new Button("", "./plugins/Files/icons/file_extension_unknown.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         }
         $BDL = new Button("Datei herunterladen", "download", "iconic");
         $BDL->style("margin-right:10px;");
         $BDL->windowRme("File", $F->getID(), "download");
         $size = "<div style=\"display:inline-block;margin-right:20px;color:grey;width:60px;text-align:right;\"></div>";
         if ($F->A("FileIsDir")) {
             $onclick = $this->pather($F->getID());
             $BDL = "";
         } else {
             $onclick = OnEvent::popup("Vorschau", "File", $F->getID(), "previewWindow", "", "", "{width:600, hPosition: 'center'}");
             $size = "<div style=\"display:inline-block;margin-right:20px;color:grey;width:60px;text-align:right;\">" . Util::formatByte($F->A("FileSize")) . "</div>";
         }
         $onRename = OnEvent::rme($F, "rename", array("\$j('input[name=renameFile{$i}]').val()"), "function(t){ \$j('.fileName{$i}').html(t.responseText); \$j('#default{$i}').show(); \$j('#rename{$i}').hide(); }");
         $BD = new Button("Element löschen", "trash_stroke", "iconic");
         #$BD->style("float:right;");
         $BD->onclick("deleteClass('File','" . $F->getID() . "', function() { " . $this->pather(realpath(dirname($F->getID()))) . " },'Element wirklich löschen?');");
         $BR = new Button("Element umbenennen", "pen_alt2", "iconic");
         $BR->style("margin-right:10px;");
         $BR->onclick("\$j('.fileDefault').show(); \$j('.fileRename, #default{$i}').hide(); \$j('#rename{$i}').show();");
         $IR = new HTMLInput("renameFile{$i}", "text", $F->A("FileName"));
         $IR->style("width:350px;");
         $IR->onEnter($onRename);
         $BC = new Button("Umbenennen abbrechen", "x", "iconic");
         $BC->onclick("\$j('#default{$i}').show(); \$j('#rename{$i}').hide();");
         $BC->style("margin-left:10px;");
         $BO = new Button("Umbenennen abschließen", "check", "iconic");
         $BO->onclick($onRename);
         $BO->style("margin-left:10px;");
         $IC = new HTMLInput("select{$i}", "checkbox");
         $IC->setClass("selectFile");
         $IC->style("margin-top:2px;margin-right:10px;display:none;");
         $html .= "\n\t\t\t<div data-path=\"" . $F->getID() . "\" class=\"selectionRow " . ($F->A("FileIsDir") ? "isFolder" : "") . "\" style=\"\">\n\t\t\t\t<div class=\"selectionRowHeightSetter\" style=\"display:inline-block;float:left;\">{$IC}{$B}</div>\n\t\t\t\t<div class=\"selectionRowHeightSetter\" style=\"display:inline-block;float:right;\">{$BDL}{$BR}{$size}{$BD}</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"rename{$i}\" class=\"fileRename selectionRowHeightSetter\" style=\"display:none;margin-bottom:-3px;\">{$IR}{$BC}{$BO}</div>\n\t\t\t\t<div id=\"default{$i}\" class=\"selectionRowHeightSetter fileDefault\" onclick=\"" . $onclick . "\" style=\"padding:5px;padding-top:9px;cursor:pointer;\">\n\t\t\t\t\t<span class=\"fileName{$i}\">" . str_replace(".{$ext}", "<span style=\"color:grey;\">.{$ext}</span>", $F->A("FileName")) . "</span>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>";
         $i++;
     }
     $html .= "</form></div>" . OnEvent::script("\n\$j('.selectionRow').draggable({\n\trevert: true,\n\thelper: function(v){\n\t\tvar newE = \$j(v.target).closest('.selectionRow').clone();\n\t\tnewE.css('width', '400px').css('opacity', '0.7').addClass('selectionRow');\n\t\tnewE.find('.iconic').remove();\n\t\treturn newE;\n\t}/*,\n\tstart: function (event, ui) {\n\t\t \$j(ui.helper).css('margin-left', event.clientX - \$j(event.target).offset().left + 10);\n\t\t \$j(ui.helper).css('margin-top', event.clientY - \$j(event.target).offset().top + 10);\n\t }*/\n});\n\n\$j('.isFolder').droppable({\n\thoverClass: 'highlight',\n\taccept: '.selectionRow',\n\ttolerance: 'pointer',\n\tdrop: function(event, ui) {\n\t\tvar newE = ui.helper.clone();\n\t\tui.helper.remove();\n\t\t" . OnEvent::rme($this, "moveFile", array("\$j(ui.draggable).data('path')", "\$j(this).data('path')"), "function(){ \n\t\t\t\$j(ui.draggable).fadeOut(400, function(){ \$j(this).remove(); }); \n\t\t\t\$j('body').append(newE);\n\t\t\t\$j(newE).fadeOut(400, function(){ \$j(this).remove(); }); \n\t\t}") . "\n\t}\n});\n");
     if (!$return) {
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:trinityDB,代码行数:101,代码来源:mFileGUI.class.php

示例7: __toString

 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 "";
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:projectMankind,代码行数:101,代码来源:HTMLInput.class.php

示例8: __toString

 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] . "');\"/>";
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:poolPi,代码行数:101,代码来源:HTMLInput.class.php

示例9: previewWindow

 public function previewWindow()
 {
     #echo $this->getID();
     #$relPath = $this->getRelPath();
     #echo $this->A("FileMimetype");
     $BD = new Button("Datei\nherunterladen", "save");
     $BD->style("margin:10px;float:right;");
     $BD->windowRme("File", $this->getID(), "download");
     $BD->onclick("" . OnEvent::closePopup("File"));
     $display = "";
     if ($this->A("FileIsDir") == "0") {
         switch ($this->A("FileMimetype")) {
             case "image/jpeg":
             case "image/png":
             case "image/gif":
             case "image/svg":
             case "image/svg+xml":
                 $display .= "{$BD}<div style=\"clear:both;width:600px;max-height:450px;overflow:auto;\"><img style=\"margin:10px;max-width:560px;\" src=\"data:" . $this->A("FileMimetype") . ";base64," . base64_encode(file_get_contents($this->getID())) . "\" /></div>";
                 break;
             case "text/plain":
             case "text/x-php":
             case "text/x-c++":
                 $display = "{$BD}<div style=\"clear:both;width:600px;max-height:450px;overflow:auto;\"><p>" . highlight_file($this->ID, true) . "</p></div>";
                 break;
             case "application/pdf":
                 $display = "<script type=\"text/javascript\">" . OnEvent::window($this, "previewPDF") . OnEvent::closePopup("File") . "</script>";
                 break;
             default:
                 $display = "<div  class=\"highlight\">{$BD}<p style=\"padding-top:10px;\">Es steht leider keine Vorschau<br />für diesen Dateityp zur Verfügung.</p><div style=\"clear:both;\"></div>";
         }
     } else {
         $display = "Verzeichnis";
     }
     echo $display;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:35,代码来源:FileGUI.class.php


注:本文中的Button::windowRme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。