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


PHP HTMLForm::addJSEvent方法代码示例

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


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

示例1: getForm

 function getForm()
 {
     if ($this->form != null) {
         return $this->form;
     }
     if ($this->formID == null) {
         $this->formID = "edit" . get_class($this->object);
     }
     $F = new HTMLForm($this->formID == null ? "edit" . get_class($this->object) : $this->formID, $this->attributes == null ? $this->object : $this->attributes, strpos($this->displayMode, "popup") === false ? $this->operationsButton() . $this->name : null);
     $F->getTable()->setColWidth(1, 120);
     $F->getTable()->addTableClass("contentEdit");
     $ID = $this->object->getID();
     if (BPS::getProperty("HTMLGUI", "insertAsNew", false)) {
         $ID = -1;
         BPS::unsetProperty("HTMLGUI", "insertAsNew");
     }
     if ($this->showSave) {
         $F->setSaveClass(get_class($this->object), $ID, $this->functionEntrySave, $this->name);
     }
     $F->isEditable($this->showInputs);
     foreach ($this->object->getA() as $n => $v) {
         $F->setValue($n, $v);
         $F->setLabel($n, str_replace($this->object->getClearClass(), "", $n));
     }
     foreach ($this->types as $n => $l) {
         $F->setType($n, $l, null, isset($this->options[$n]) ? $this->options[$n] : null);
     }
     foreach ($this->labels as $n => $l) {
         $F->setLabel($n, T::_($l));
     }
     foreach ($this->placeholders as $n => $l) {
         $F->setPlaceholder($n, $l);
     }
     foreach ($this->descriptionsField as $n => $l) {
         $F->setDescriptionField($n, T::_($l));
     }
     foreach ($this->parsers as $n => $l) {
         $F->setType($n, "parser", null, array($l, $this->object));
     }
     foreach ($this->spaces as $n => $l) {
         $F->insertSpaceAbove($n, T::_($l));
     }
     foreach ($this->fieldButtons as $n => $B) {
         $F->addFieldButton($n, $B);
     }
     foreach ($this->fieldEvents as $k => $v) {
         $F->addJSEvent($v[0], $v[1], $v[2]);
     }
     foreach ($this->hiddenLines as $n) {
         $F->inputLineStyle($n, "display:none;");
     }
     foreach ($this->inputStyles as $k => $n) {
         $F->setInputStyle($k, $n);
     }
     foreach ($this->autocomplete as $k => $a) {
         $F->setAutoComplete($k, $a[0], $a[1], $a[2]);
     }
     $this->form = $F;
     return $F;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:60,代码来源:HTMLGUIX.class.php

示例2: getPopupManager

 public function getPopupManager($rootDir = null, $class = null, $classID = null, $usePool = false, $fieldDefaultFile = "", $uploadTargetFilename = null)
 {
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "$rootDir";
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("mFileGUI", "path", $root);
         $_SESSION["BPS"]->setProperty("mFileGUI", "root", $root);
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root, 0777, true);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rootDir}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 die($T);
             }
         }
     }
     $bps = $this->getMyBPSData();
     if (strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = $bps["root"];
     }
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir($bps["path"]);
     }
     $this->hideDirs(true);
     $gui = new HTMLGUIX();
     $gui->object($this);
     $cols = array();
     if ($fieldDefaultFile != "") {
         $C = new $class($classID);
         self::$fieldDefaultFile = array($C, $C->A($fieldDefaultFile), $fieldDefaultFile);
         $cols[] = "isDefault";
         $gui->colWidth("isDefault", 20);
         $gui->parser("isDefault", "mFileGUI::parserDefault");
     }
     $cols[] = "FileName";
     $gui->attributes($cols);
     $gui->parser("FileName", "mFileGUI::nameParser2");
     $gui->options(true, false, false);
     $gui->name("Datei");
     $gui->addToEvent("onDelete", OnEvent::reloadPopup("mFile"));
     $oldFiles = "";
     if ($class != null and $classID != null) {
         $AC = anyC::get("Datei", "DateiClassID", $classID);
         $AC->addAssocV3("DateiClass", "=", $class);
         $oldFiles = new HTMLTable(2, "Verknüpfte Dateien");
         while ($F = $AC->getNextEntry()) {
             $BDL = new Button("Datei herunterladen", "./plugins/Files/download.png", "icon");
             $BDL->onclick("windowWithRme('File','" . $F->A("DateiPath") . "','download','');");
             $BDL->style("float:right;");
             $oldFiles->addRow(array($BDL . $F->A("DateiName")));
         }
     }
     $BPool = new Button("Pool\nanzeigen", "./lightCRM/Mail/images/attach.png");
     $BPool->style("float:right;margin:10px;");
     $BPool->onclick(OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")));
     if ($usePool and $rootDir) {
         echo $BPool . "<div style=\"clear:both;\"></div>";
         if (file_exists(FileStorage::getFilesDir() . "{$class}Pool")) {
             echo OnEvent::script("window.setTimeout(function(){ if(\$j('#editDetailsmFileSidePanel').length > 0) return; " . OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")) . "}, 100);");
         }
     }
     $F = new HTMLForm("fileUpload", array("datei"));
     $s = array("path" => $bps["path"], "class" => "File");
     if ($uploadTargetFilename != null) {
         $s["targetFilename"] = $uploadTargetFilename;
     }
     $F->setType("datei", "file", null, $s);
     $F->addJSEvent("datei", "onChange", OnEvent::reloadPopup("mFile"));
     $F->getTable()->setColWidth(1, 120);
     echo "<p class=\"prettyTitle\">/" . basename($bps["path"]) . "</p><p style=\"color:grey;margin-top:-15px;margin-bottom:10px;\"><small>" . dirname(realpath($bps["path"])) . "</small></p>" . $F . $gui->getBrowserHTML(-1) . $oldFiles;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:77,代码来源:mFileGUI.class.php

示例3: 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

示例4: getEditHTML

 function getEditHTML()
 {
     $this->object->loadMeOrEmpty();
     if ($this->object->getID() == -1) {
         $this->addToEvent("onSave", "\$('contentLeft').update('');");
     }
     $F = new HTMLForm($this->formID == null ? "edit" . get_class($this->object) : $this->formID, $this->attributes == null ? $this->object : $this->attributes, strpos($this->displayMode, "popup") === false ? $this->operationsButton() . $this->name : null);
     $F->getTable()->setColWidth(1, 120);
     if ($this->showSave) {
         $F->setSaveClass(get_class($this->object), $this->object->getID(), $this->functionEntrySave, $this->name);
     }
     $F->isEditable($this->showInputs);
     foreach ($this->object->getA() as $n => $v) {
         $F->setValue($n, $v);
         $F->setLabel($n, str_replace($this->object->getClearClass(), "", $n));
     }
     foreach ($this->types as $n => $l) {
         $F->setType($n, $l, null, isset($this->options[$n]) ? $this->options[$n] : null);
     }
     foreach ($this->labels as $n => $l) {
         $F->setLabel($n, $l);
     }
     foreach ($this->descriptionsField as $n => $l) {
         $F->setDescriptionField($n, $l);
     }
     foreach ($this->parsers as $n => $l) {
         $F->setType($n, "parser", null, array($l, $this->object));
     }
     foreach ($this->spaces as $n => $l) {
         $F->insertSpaceAbove($n, $l);
     }
     foreach ($this->fieldButtons as $n => $B) {
         $F->addFieldButton($n, $B);
     }
     foreach ($this->fieldEvents as $k => $v) {
         $F->addJSEvent($v[0], $v[1], $v[2]);
     }
     foreach ($this->hiddenLines as $n) {
         $F->inputLineStyle($n, "display:none;");
     }
     foreach ($this->inputStyles as $k => $n) {
         $F->setInputStyle($k, $n);
     }
     foreach ($this->autocomplete as $k => $a) {
         $F->setAutoComplete($k, $a[0], $a[1]);
     }
     return $this->topButtons() . $this->sideButtons() . $F;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:48,代码来源:HTMLGUIX.class.php


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