本文整理汇总了PHP中Button::doBefore方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::doBefore方法的具体用法?PHP Button::doBefore怎么用?PHP Button::doBefore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::doBefore方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: row
private function row(poolAnzeige $A)
{
$html = "\n\t\t\t<div style=\"height:auto;padding-top:30px;padding-bottom:25px;border-bottom: 1px solid #ddd;\">";
$I = new HTMLInput("poolAnzeigeName", "text", $A->A("poolAnzeigeName"));
$I->activateMultiEdit("poolAnzeige", $A->getID());
$I->style("text-align: right;width:90%;");
$I->placeholder("Beschriftung");
$B = new Button("Zeile löschen", "trash_stroke", "iconicL");
$B->style("margin-top:10px;");
$B->doBefore("if(confirm('Die Zeile löschen?')) %AFTER");
$B->rmePCR("poolAnzeige", $A->getID(), "deleteMe", "", OnEvent::reload("Screen"));
$html .= "\n\t\t\t\t<div style=\"text-align: right;color: #777;font-size: 1.5em;display: inline-block;width: 195px;height: auto;vertical-align: top;margin-top: 7px;margin-right: 21px;\">\n\t\t\t\t\t{$I}{$B}\n\t\t\t\t</div>";
$close = 0;
$AC = anyC::get("poolAnzeigeControl", "poolAnzeigeControlpoolAnzeigeID", $A->getID());
$AC->addOrderV3("poolAnzeigeControlOrder");
$AC->addOrderV3("poolAnzeigeControlID");
while ($C = $AC->n()) {
if ($C->A("poolAnzeigeControlNewLine")) {
$html .= "<div style=\"margin-top:15px;\">\n\t\t\t\t\t<div style=\"display: inline-block;width: 195px;height: 120px;vertical-align: top;margin-top: 7px;margin-right: 21px;\"></div>";
$close++;
}
$html .= $this->control($C);
}
$B = new Button("Element\nhinzufügen", "new");
$B->style("margin:10px;display:inline-block;vertical-align:top;");
$B->popup("", "Element hinzufügen", "mpoolAnzeige", "-1", "addElementPopup", array($A->getID()));
$html .= $B;
for ($i = 0; $i < $close; $i++) {
$html .= "</div>";
}
$html .= "</div>";
return $html;
}
示例2: browser
public function browser()
{
$BA = new Button("Eintrag\nhinzufügen", "new");
$BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
$BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
$BA->style("margin:10px;");
$cols = 3 + count($this->colsLeft) + count($this->colsRight);
$TE = new HTMLTable($cols, "Einträge");
$TE->setColWidth(1, 20);
$TE->setColWidth($cols, 20);
$TE->useForSelection(false);
$TE->maxHeight(400);
$TE->weight("light");
$BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
$autoLoad = false;
while ($A = $this->object->getNextEntry()) {
$BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
$BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
$BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
$isEmpty = false;
if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") {
$autoLoad = $A->getID();
$isEmpty = true;
}
if (!$isEmpty) {
$div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A));
} else {
$div = "Neuer Eintrag";
}
$row = array();
$row[] = $BD;
$row[] = $div;
foreach ($this->colsRight as $col) {
$c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A));
$row[] = $c;
}
$row[] = $BE;
$TE->addRow($row);
$action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
$TE->addCellEvent(2, "click", $action);
$TE->addCellID(2, "popupEntryID" . $A->getID());
$TE->addCellEvent(count($row), "click", $action);
}
if ($this->object->numLoaded() == 0) {
$TE->addRow("Keine Einträge");
$TE->addRowColspan(1, 3);
}
return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" 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('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : "");
}
示例3: bricklets
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);") : "");
}
示例4: EMailPopup
/**
* Method to display an E-Mail popup for easy E-Mail sending
*
* Requires a method named "getEMailData" in $dataClass which returns an array:
* array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
*
* Will call $dataClass($dataClassID)::sendEmail afterwards
*
* @param string $dataClass
* @param string $dataClassID
*/
public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false)
{
$c = new $dataClass($dataClassID);
$data = $c->getEMailData($callbackParameter);
$html = "";
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
$tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>");
if (is_array($data["recipients"])) {
if (count($data["recipients"]) == 1) {
$tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small><" . $data["recipients"][0][1] . "></small>");
} else {
$recipients = array();
foreach ($data["recipients"] as $ID => $Rec) {
$recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID);
}
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
} else {
$IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]);
$IS->id("EMailRecipient{$dataClassID}");
$tab->addLV("Empfänger:", $IS);
}
$tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
$html .= $tab;
$html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>";
#$tab->addRow(array(""));
#$tab->addRowColspan(1, 2);
#$tab->addRowClass("backgroundColor0");
$tab = new HTMLTable(2);
$tab->setColWidth(1, "120px;");
if ($onSuccessFunction == null) {
$onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
}
$BAbort = new Button("Abbrechen", "stop");
if ($onAbortFunction == null) {
$BAbort->onclick("Popup.close('Util', 'edit');");
} else {
$BAbort->onclick($onAbortFunction);
}
$BAbort->style("margin-bottom:10px;margin-top:10px;");
$BGo = new Button("E-Mail\nsenden", "okCatch");
$BGo->style("float:right;margin-top:10px;");
if (strpos($data["body"], "<p") !== false) {
$BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER");
}
$BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
#$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
$tab->addRow(array($BGo . $BAbort));
$tab->addRowColspan(1, 2);
#$tab->addRowClass("backgroundColor0");
$html .= $tab;
if (strpos($data["body"], "<p") !== false) {
echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);");
}
if ($return) {
return $html;
} else {
echo $html;
}
}
示例5: pluginShow
public function pluginShow(Device $Device, $plugin, $isLast = false, $options = null)
{
try {
$C = new $plugin();
} catch (ClassNotFoundException $e) {
return "Laden des Plugins fehlgeschlagen!";
}
$E = $C->getOverviewPlugin();
$styles = "";
if ($options != null) {
$styles = "position:absolute;top:{$options->top}px;left:{$options->left}px;";
}
$html = "<div id=\"fheOverviewContent" . $plugin . "_getOverviewContent\" data-plugin=\"{$plugin}\" class=\"desktopDraggable\" style=\"" . (($isLast or $E->minHeight() === 0) ? "" : ($Device->A("DeviceType") == 4 ? "min-" : "") . "height:" . $E->minHeight() . "px;overflow:hidden;") . ($Device->A("DeviceType") == 4 ? "width:300px;" : "") . "{$styles}\">";
$BM = new Button("Plugin verschieben", "move", "iconicL");
$BM->style("cursor:move;");
$BM->addClass("handleMove");
$BC = new Button("Plugin schließen", "x", "iconicL");
$BC->addClass("handleClose");
$BC->doBefore("var currentPlugin = this; %AFTER");
$BC->rmePCR("mfheOverview", "-1", "pluginDelete", array($Device->getID(), "'{$plugin}'"), "function(){ \$j(currentPlugin).closest('.desktopDraggable').remove(); \$j('#addPlugin{$plugin}').show(); }");
$html .= "<div class=\"desktopAlterIcons\">{$BM}{$BC}</div>";
ob_start();
$C->getOverviewContent($Device->getID());
$html .= ob_get_contents();
ob_end_clean();
$html .= "</div>";
if ($E->updateInterval()) {
$this->addPlugin($E->className(), $E->updateInterval(), $E->updateFunction());
}
return $html;
}
示例6: getInfo
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>";
}
示例7: browser
public function browser()
{
$BA = new Button("Eintrag\nhinzufügen", "new");
$BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
$BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
$BA->style("margin:10px;");
if (!$this->showNew) {
$BA = "";
}
$cols = ($this->showTrash ? 1 : 0) + ($this->showEdit ? 1 : 0) + 1 + count($this->colsLeft) + count($this->colsRight);
$TE = new HTMLTable($cols, "Einträge");
if ($this->showTrash) {
$TE->setColWidth(1, 20);
}
if ($this->showEdit) {
$TE->setColWidth($cols, 20);
$TE->useForSelection(false);
}
$TE->maxHeight(400);
$TE->weight("light");
$BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
$autoLoad = false;
while ($A = $this->object->getNextEntry()) {
$action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
$BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
$BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
$BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
$isEmpty = false;
if ($this->emptyCheckField != null and !is_array($this->emptyCheckField) and $A->A($this->emptyCheckField) == $this->emptyCheckValue) {
$autoLoad = $action;
$isEmpty = true;
}
if ($this->emptyCheckField != null and is_array($this->emptyCheckField)) {
$ec = 0;
foreach ($this->emptyCheckField as $field) {
if ($A->A($field) != "") {
continue;
}
$autoLoad = $action;
$isEmpty = true;
$ec++;
}
$isEmpty = $ec == count($this->emptyCheckField);
}
if (!$isEmpty) {
$obj = get_class($this->object);
$meth = $this->parsers["main"];
if (strpos($this->parsers["main"], "::")) {
$ex = explode("::", $this->parsers["main"]);
$obj = $ex[0];
$meth = $ex[1];
}
$div = Util::invokeStaticMethod($obj, $meth, array($A));
#($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neuer Eintrag");
} else {
$div = "Neuer Eintrag";
}
$row = array();
if ($this->showTrash) {
$row[] = $BD;
}
$row[] = $div;
foreach ($this->colsRight as $col) {
$obj = get_class($this->object);
$meth = $col[0];
if (strpos($col[0], "::")) {
$ex = explode("::", $col[0]);
$obj = $ex[0];
$meth = $ex[1];
}
$row[] = Util::invokeStaticMethod($obj, $meth, array($A));
}
if ($this->showEdit) {
$row[] = $BE;
}
$TE->addRow($row);
if ($this->showTrash) {
$TE->addCellStyle(1, "vertical-align:top;");
}
#$TE->addCellEvent(2, "click", $action);
if ($this->showEdit) {
$TE->addCellID(count($row), "popupEntryID" . $A->getID());
$TE->addCellStyle(count($row), "vertical-align:top;");
$TE->addCellEvent(count($row), "click", $action);
}
}
if ($this->object->numLoaded() == 0) {
$TE->addRow("Keine Einträge");
$TE->addRowColspan(1, $cols);
}
return "{$BA}\n\t\t\t<div style=\"float:right;width:calc(100% - 400px);height:500px;display:none;background-color:#f4f4f4;overflow:auto;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" 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($autoLoad) : "");
}
示例8: __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 "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]}'";
}
$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]);
//.........这里部分代码省略.........
示例9: editIcon
private function editIcon($aid)
{
$B = new Button("", "./images/i2/edit.png", "icon");
$B->className("editButton");
$onSuccessFunction = $this->JSOnEdit != null ? str_replace("%%VALUE%%", "{$aid}", "{$this->JSOnEdit}") : "";
$B->doBefore("contentManager.selectRow(this); %AFTER");
$B->loadFrame($this->editInDisplayModeTarget, $this->singularClass, $aid, 0, "", $onSuccessFunction);
return "<td>{$B}</td>";
/*
* <img
onclick=\"
".($this->editInDisplayModeTarget == "contentLeft" ? "lastLoadedLeft = $aid;lastLoadedLeftPlugin = '$this->singularClass';" : "")."
new Ajax.Request('./interface/loadFrame.php?p=".$this->singularClass."&id=$aid'".($this->JSOnEdit != null ? str_replace("%%VALUE%%","$aid",",{onSuccess: $this->JSOnEdit}") : ",{onSuccess: function(transport){ if(checkResponse(transport)) $('$this->editInDisplayModeTarget').update(transport.responseText); }}").");\" src=\"./images/i2/edit.png\" class=\"mouseoverFade\" />
*/
}
示例10: reminderList
public function reminderList()
{
#$T = new HTMLTable(2);
#$T->setTableStyle("width:100%;");
#$T->setColWidth(1, "30%");
$B = $this->reminderCheck();
$R = array();
$Kal = new Kalender();
foreach ($B as $E) {
switch (get_class($E)) {
case "KalenderEvent":
$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'" . $E->UID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", $E->summary() != "" ? addslashes($E->summary()) : "Keine Beschreibung") . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tKalender\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . $E->title() . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($Kal->parseTime($E->getTime())) . " - " . Util::CLTimeParser($Kal->parseTime($E->getEndTime())) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
break;
case "Aufgabe":
$id = "Aufgabe_" . $E->getID();
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'Aufgabe'", "'" . $E->getID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", addslashes(nl2br($E->A("AufgabeText")))) . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tAufgabe\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . mb_substr($E->A("AufgabeText"), 0, 30) . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($E->A("AufgabeUhrzeitVon")) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
/*$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'".$E->UID()."'"), "function(){ \$j('#bottom').html(''); \$j('#$id').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array(
$id,
"<div class=\"event\" id=\"$id\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('".str_replace("\n", "", addslashes($E->summary()))."');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">
<div style=\"width:15%;display:inline-block;vertical-align:top;\">
Kalender
</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">
".$E->title()."
</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">
".Util::CLTimeParser($Kal->parseTime($E->getTime()))." - ".Util::CLTimeParser($Kal->parseTime($E->getEndTime()))." Uhr"."
</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">
$BD
</div>
</div>"
);*/
break;
}
}
echo json_encode($R, JSON_UNESCAPED_UNICODE);
}
示例11: getCalendarDetails
public static function getCalendarDetails($className, $classID, $T = null)
{
$K = new Kalender();
if ($T == null) {
$T = new Todo($classID);
}
$name = "";
if ($T->A("TodoClass") == "Projekt" or $T->A("TodoClass") == "GRLBM") {
$O = $T->getOwnerObject();
$name = $O->getCalendarTitle();
} else {
$name = $T->A("TodoName");
}
$day = $T->A("TodoTillDay");
if ($T->A("TodoFromDay") != "0") {
$day = $T->A("TodoFromDay");
}
$time = $T->A("TodoTillTime");
if ($T->A("TodoFromTime") != "0") {
$time = $T->A("TodoFromTime");
}
$KE = new KalenderEvent($className, $classID, $K->formatDay($day), $K->formatTime($time), $name);
#echo $T->A("TodoOrt");
if ($T->A("TodoClass") == "WAdresse") {
$O = $T->getOwnerObject();
$KE->value("Kunde", $O->getHTMLFormattedAddress());
}
$KE->value("Typ", TodoGUI::types($T->A("TodoType")));
$KE->value("Ort", $T->A("TodoLocation"));
#$KE->value("Status", TodoGUI::getStatus($T->A("TodoStatus")));
$KE->owner($T->A("TodoUserID"));
if ($T->A("TodoClass") == "WAdresse") {
$KE->value("Telefon", $O->A("tel"));
$KE->value("Notiz", nl2br($O->A("bemerkung")));
$KE->canNotify(true, $T->A("TodoNotified") == "1");
if ($T->A("TodoType") == "1" and Session::isPluginLoaded("mAkquise")) {
$B = new Button("Akquise", "./lightCRM/Akquise/callTel.png");
#$B->doBefore(OnEvent::rme($T, "setStatus", array("'2'"), OnEvent::closePopup("mKalender").OnEvent::reload("Screen"))." %AFTER");
$B->doBefore(OnEvent::closePopup("mKalender") . "contentManager.emptyFrame('contentScreen'); %AFTER");
$B->loadFrame("contentLeft", "WAdresse", $T->A("TodoClassID"), 0, "mWAdresseGUI;Akquise:1;from:mKalender");
#$B->popup("", "Akquise", "mAkquise", "-1", "showTelPopup", array($T->A("TodoClassID")), "", "{width: 950, top:20, hPosition:'center'}");
$KE->addTopButton($B);
}
}
$KE->allDay($T->A("TodoAllDay") == "1");
if ($T->A("TodoClass") == "Projekt" and $O->A("ProjektKunde") != "0") {
$Adresse = new Adresse($O->A("ProjektKunde"));
$KE->value("Telefon", $Adresse->A("tel"));
}
if ($T->A("TodoClass") == "GRLBM") {
$Auftrag = new Auftrag($O->A("AuftragID"));
$Adresse = new Adresse($Auftrag->A("AdresseID"));
$KE->value("Telefon", $Adresse->A("tel"));
}
$KE->status($T->A("TodoStatus"));
$KE->endDay($K->formatDay($T->A("TodoTillDay")));
$KE->endTime($K->formatTime($T->A("TodoTillTime")));
$KE->icon(TodoGUI::typesImage($T->A("TodoType"), true));
$KE->summary(nl2br($T->A("TodoDescription")));
if ($T->A("TodoExceptionForID") != "0") {
$KE->exception($T->A("TodoExceptionStarttime"), $T->A("TodoIsDeleted") == "1", $T->A("TodoExceptionForID"));
}
if ($T->A("TodoRemind") != "-1") {
$KE->remind($T->A("TodoRemind") / 60, $T->A("TodoReminded"));
}
$editMethod = "editInPopup";
if ($T->A("TodoOrganizer") != "") {
$editMethod = null;
$KE->organizer($T->A("TodoOrganizer"));
}
if (!$T->A("TodoDoneTime")) {
$KE->editable($editMethod, "deleteFromCalendar");
}
if ($T->A("TodoOrganizer") == "" and !$T->A("TodoDoneTime")) {
$KE->repeatable("editRepeatable");
}
$KE->location($T->A("TodoLocation"));
$KE->repeat($T->A("TodoRepeat") != "", $T->A("TodoRepeat"), $T->A("TodoRepeatWeekOfMonth") * 1, $T->A("TodoRepeatDayOfWeek"), $T->A("TodoRepeatInterval"), $T->A("TodoRepeatUntil"));
$KE->UID("TodoID" . $T->getID() . "@" . substr(Util::eK(), 0, 20));
$KE->closeable($T->A("TodoDoneTime"), $T->A("TodoReport"));
if (!$T->A("TodoDoneTime")) {
$KE->canInvite();
}
return $KE;
}