示例#1
0
 public function getHTML($id, $page)
 {
     $bps = $this->getMyBPSData();
     $LangTab = new HTMLTable(1, "Language selection:");
     $LangTab->addRow("German");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:de');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "de") {
         $LangTab->addRowClass("backgroundColor1");
     }
     $LangTab->addRow("English");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:en');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "en") {
         $LangTab->addRowClass("backgroundColor1");
     }
     if ($bps == -1) {
         return $LangTab;
     }
     $T = new HTMLTable(1);
     $T->setTableStyle("width:370px;float:left;");
     $FeedSerien = array();
     $i = 0;
     $Series = array();
     $RSS = new mRSSFilterGUI();
     while ($R = $RSS->getNextEntry()) {
         $new = $R->filterNew();
         foreach ($new as $S => $v) {
             if ($v->language != $bps["lang"]) {
                 continue;
             }
             $Series[$v->name] = "rmeP('NewSeries', '-1', 'showInfo', ['{$v->name}', '{$v->language}'], 'if(checkResponse(transport)) { \$(\\'Row{$i}\\').className = \\'backgroundColor1\\'; \$(\\'contentLeft\\').update(transport.responseText); }');";
         }
     }
     asort($Series);
     foreach ($Series as $name => $action) {
         $T->addRow(array($name));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", $action);
         $T->setRowID("Row{$i}");
         $i++;
     }
     return $LangTab . "<div style=\"margin-left:0px;height:500px;overflow:auto;\">" . $T . "</div>";
 }
示例#2
0
 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;
 }
示例#3
0
 public function getAuftrag($data)
 {
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $TSumme = new HTMLTable(3);
     $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;");
     $TSumme->setColWidth(1, 26);
     $TSumme->addColStyle(3, "text-align:right;");
     $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>"));
     $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit")));
     $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl"));
     $IBankleitzahl->placeholder("Bankleitzahl");
     $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;");
     $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer"));
     $IKontonummer->placeholder("Kontonummer");
     $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;");
     $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     #$IBIC = new HTMLInput("bic");
     #$IIBAN = new HTMLInput("iban");
     $BCheck = new Button("Prüfung", "question_mark", "iconic");
     $BCheck->id("ktoCheck");
     $BCheck->style("margin-left:8px;");
     $TZahlungsart = new HTMLTable(2, "Zahlungsart");
     $TZahlungsart->setTableStyle("width:100%;");
     $TZahlungsart->setColWidth(1, 26);
     $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart));
     $TZahlungsart->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;");
     $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\">&nbsp;</div>"));
     $TZahlungsart->setRowID("rowZahlungsart");
     if ($Beleg->A("GRLBMpayedVia") != "debit") {
         $TZahlungsart->addRowStyle("display:none;");
     } else {
         echo OnEvent::script("CustomerPage.saveKontodaten();");
     }
     $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten"));
     $IBemerkung->style("width:100%;height:100px;margin-top:40px;");
     $IBemerkung->placeholder("Bemerkungen");
     #$IBemerkung->onblur("");
     $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);");
     $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung));
     $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;");
     #$TZahlungsart->addCellStyle(3, "padding-top:50px;");
     $TFinish = new HTMLTable(1);
     $TFinish->setTableStyle("width:100%;");
     $TFinish->addRow(array($this->buttonCancel($data) . $this->buttonDone($data)));
     $TFinish->addCellStyle(1, "padding-top:50px;");
     $html = "<h1>Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "</h1>";
     $html .= $this->getAdresse($Beleg);
     if ($this->showPosten) {
         $html .= $this->getPosten($Beleg);
     }
     if ($this->showPrices) {
         $html .= $TSumme;
     }
     if ($this->showZahlungsart) {
         $html .= $TZahlungsart;
     }
     $html .= $this->getBottom($Beleg);
     $html .= $TFinish;
     return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung  = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };");
 }
示例#4
0
 function getBrowserHTML($lineWithId = -1)
 {
     $this->texts = $this->languageClass->getBrowserTexts();
     $singularLanguageClass = $this->loadLanguageClass($this->singularClass);
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass);
     $userHiddenFields = mUserdata::getHides($this->singularClass);
     $defaultTarget = "contentRight";
     if ($this->displaySide != "default") {
         $defaultTarget = "content" . ucfirst($this->displaySide);
     }
     if ($this->singularClass == "none") {
         echo "collectionOf is not set. See message log for further details.";
         throw new CollectionOfNotSetException();
     }
     if ($this->name == "Noname") {
         $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that.");
     }
     /**
      * ERROR-TABLE
      */
     $errorTab = new HTMLTable(1);
     if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) {
         $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>");
     }
     /**
      * RETURN-BUTTON
      */
     $returnTab = new HTMLTable(1);
     if ($this->isSelection) {
         $BReturn = new Button("Auswahl\nbeenden", "back");
         $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');");
         #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />";
         $returnTab->addRow($BReturn);
     }
     /**
      * DELETE-BUTTON
      */
     if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) {
         $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>";
     } elseif (!$userCanDelete) {
         $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />";
     }
     /**
      * EDIT-BUTTON
      */
     if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) {
         $EB = new Button("", "./images/i2/edit.png");
         $EB->type("icon");
         $EB->className("editButton");
         if ($this->JSOnEdit == null) {
             $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');");
         } else {
             $EB->onclick($this->JSOnEdit);
         }
         $this->newColsLeft["select"] = $EB;
     }
     $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight);
     $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null);
     $valuesTab->addTableClass("contentBrowser");
     /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right"))
     			$valuesTab->setColClass($cols, "backgroundColor0");
     		if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left")
     			$valuesTab->setColClass(1, "backgroundColor0");*/
     /**
      * QUICKSEARCH
      */
     #$quickSearchRow = "";
     if ($this->quickSearchPlugin != "" and $lineWithId == -1) {
         list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField();
         if ($this->displaySide == "left") {
             $insertRow = array($quickSearchRow);
             for ($i = 1; $i < $cols - 1; $i++) {
                 $insertRow[] = "";
             }
             $insertRow[] = $BSearchInfo;
             $valuesTab->addRow($insertRow);
             $valuesTab->addRowColspan(1, $cols - 1);
         } else {
             $valuesTab->addRow(array($BSearchInfo, $quickSearchRow));
             $valuesTab->addRowColspan(2, $cols - 1);
         }
         $valuesTab->addRowClass("backgroundColorHeader");
     }
     if ($this->headerRow != null) {
         $valuesTab->addHeaderRow($this->headerRow);
     }
     /**
      * PAGE-BROWSER
      */
     #$multiPageRow = "";
     $separator = "";
     $userDefinedEntriesPerPage = false;
     $isMultiPageMode = false;
     if (count($this->multiPageMode) > 0) {
         $isMultiPageMode = true;
         $this->multiPageMode[3] = $defaultTarget;
         if ($this->multiPageMode[2] == 0) {
             $userDefinedEntriesPerPage = true;
             #$mU = new mUserdata();
             #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}");
             #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20;
         }
         /*
         
         if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0;
         
         $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]);
         
         if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\">&nbsp;&lt;&lt;&nbsp;</a> ";
         else $pageLinks = "&nbsp;&lt;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\">&nbsp;&lt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\">&nbsp;&gt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&gt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\">&nbsp;&gt;&gt;&nbsp;</a> | ";
         else $pageLinks .= "&nbsp;&gt;&gt;&nbsp; | ";
         
         $start = $this->multiPageMode[1] - 3;
         if($start < 0) $start = 0;
         
         $end = $this->multiPageMode[1] + 3;
         if($end > $pages - 1) $end = $pages - 1;
         
         for($i=$start; $i<=$end; $i++)
         	if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> ";
         	else $pageLinks .= ($i+1)." ";
         
         	$pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks;
         */
         if ($this->displaySide == "left") {
             $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>";
         } else {
             $pageLinks = $this->getMultiPageButtons();
         }
         /*if($lineWithId == -1) $multiPageRow = "
         					<tr>
         						".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")."
         						<td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td>
         					</tr>
         					<tr>
         						<td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td>
         					</tr>";
         
         
         */
         if ($lineWithId == -1) {
             $BSettings = $this->getPageOptionsButton();
             #$IPage = $this->getPageSelectionField();
             #$IPage->style("width:30px;float:right;text-align:right;");
             $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}";
             if (!$userDefinedEntriesPerPage) {
                 $valuesTab->addRow(array($pageOptions));
                 $valuesTab->addRowColspan(1, $cols);
             } else {
                 if ($this->displaySide == "left") {
                     $insertRow = array($pageOptions);
                     for ($i = 1; $i < $cols - 1; $i++) {
                         $insertRow[] = "";
                     }
                     $insertRow[] = $BSettings;
                     $valuesTab->addRow($insertRow);
                     #$valuesTab->addRow(array($pageOptions,$BSettings));
                     $valuesTab->addRowColspan(1, $cols - 1);
                 } else {
                     /*$insertRow = array($BSettings);
                     		for($i=1; $i<$cols-1; $i++)
                     			$insertRow[] = "";
                     		$insertRow[] = $pageOptions;
                     		$valuesTab->addRow($insertRow);*/
                     $valuesTab->addRow(array($BSettings, $pageOptions));
                     $valuesTab->addRowColspan(2, $cols - 1);
                 }
             }
             $valuesTab->addRowClass("backgroundColorHeader");
             #$valuesTab->addRow(array($pageLinks));
             #$valuesTab->addRowColspan(1, $cols);
             #$valuesTab->addRowClass("backgroundColorHeader");
             $valuesTab->addRow("");
             $valuesTab->addRowColspan(1, $cols);
             $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop");
         }
     }
     $filteredCol = null;
     if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) {
         $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif");
         $dB->style("float:right;");
         $dB->type("icon");
         $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();");
         /*$separator = "
         		<tr>
         			<td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td>
         		</tr>";*/
         $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]);
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     /**
      * NEW-BUTTON
      */
     if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) {
         $BNew = new Button("", "./images/i2/new.gif");
         $BNew->type("icon");
         $BNew->id("buttonNewEntry{$this->singularClass}");
         #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew);
         if ($this->displaySide == "left") {
             #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew));
             #$valuesTab->addRowColspan(1, $cols-1);
         } else {
             $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>"));
             $valuesTab->addRowColspan(2, $cols - 1);
             $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew);
             $valuesTab->addRowStyle("cursor:pointer;");
         }
         #$valuesTab->addRowColspan(2, $cols-1);
     }
     /**
      * TABLE-CONTENT
      */
     $displayGroup = null;
     for ($i = 0; $i < count($this->attributes); $i++) {
         $aid = $this->attributes[$i]->getID();
         // get the id of an object separately
         $sc = $this->attributes[$i]->getA();
         // get the attributes-object from the object
         if ($this->displayGroupBy != null) {
             $displayGroupField = $this->displayGroupBy;
             if ($sc->{$displayGroupField} != $displayGroup and $i > 0) {
                 $valuesTab->addRow("");
                 $valuesTab->addRowClass("backgroundColor0");
             }
         }
         $row = array();
         $styles = array();
         if ($this->displaySide == "left") {
             $colsLeft = $this->newColsRight;
             $colsRight = $this->newColsLeft;
         } else {
             $colsLeft = $this->newColsLeft;
             $colsRight = $this->newColsRight;
         }
         if (count($colsLeft) > 0) {
             foreach ($colsLeft as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         foreach ($this->showAttributes as $key => $value) {
             if (isset($userHiddenFields[$value])) {
                 continue;
             }
             if (isset($this->parsers[$value])) {
                 $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid));
             } else {
                 $t = htmlspecialchars($sc->{$value});
             }
             if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) {
                 $posInArray = array_search($value, $this->multiEditMode);
                 if ($this->multiEditModeInputs[$posInArray] == null) {
                     $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value));
                     if ($this->multiEditModeStyle != null) {
                         $MI->style($this->multiEditModeStyle[$posInArray]);
                     }
                 } else {
                     $MI = clone $this->multiEditModeInputs[$posInArray];
                     $MI->setValue($sc->{$value});
                     $MI->activateMultiEdit($this->singularClass, $aid);
                 }
                 $t = $MI;
             }
             #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>";
             $row[] = $t;
             if (isset($this->colStyles[$value])) {
                 $styles[count($row)] = $this->colStyles[$value];
             }
         }
         if (count($colsRight) > 0) {
             foreach ($colsRight as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         $valuesTab->addRow($row);
         if (count($styles) > 0) {
             foreach ($styles as $col => $s) {
                 $valuesTab->addColStyle($col, $s);
             }
         }
         $valuesTab->setRowID("BrowserMain{$aid}");
         #foreach($this->showAttributes as $key => $value) {
         #	$valuesTab->addCellID($cellNo, "Browser".$value."$aid");
         #}
         if ($this->displayGroupBy != null) {
             $displayGroup = $sc->{$displayGroupField};
         }
     }
     if ($filteredCol !== null) {
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     if ($lineWithId == -1 and $isMultiPageMode) {
         $valuesTab->addRow("");
         $valuesTab->addRowColspan(1, $cols);
         $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom");
         if (!$userDefinedEntriesPerPage) {
             $valuesTab->addRow(array($pageOptions));
             $valuesTab->addRowColspan(1, $cols);
         } else {
             if ($this->displaySide == "left") {
                 $valuesTab->addRow(array($pageOptions, $BSettings));
                 $valuesTab->addRowColspan(1, $cols - 1);
             } else {
                 $valuesTab->addRow(array($BSettings, $pageOptions));
                 $valuesTab->addRowColspan(2, $cols - 1);
             }
         }
         $valuesTab->addRowClass("backgroundColorHeader");
         #$valuesTab->addRow(array($pageLinks));
         #$valuesTab->addRowColspan(1, $cols);
         #$valuesTab->addRowClass("backgroundColorHeader");
     }
     if (count($this->attributes) == 0) {
         $valuesTab->addRow(array("keine Einträge"));
         $valuesTab->addRowColspan(1, $cols);
     }
     if ($lineWithId != -1) {
         $valuesTab = $valuesTab->getHTMLForUpdate();
     }
     return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : "");
 }
示例#5
0
 public function rightFrame($R = null)
 {
     if ($R == null) {
         $R = new GSRaumgruppe($_GET["RGID"]);
     }
     $GSTG = anyC::get("GSTaetigkeit", "GSTaetigkeitGSRaumgruppeID", "0");
     $GSTG->addOrderV3("GSTaetigkeitName");
     $GST = $this->getTaetigkeiten($R);
     $used = array();
     while ($T = $GST->getNextEntry()) {
         $used[$T->A("GSTaetigkeitParentID")] = true;
     }
     $Tab = new HTMLTable(1);
     $Tab->setColWidth(1, 500);
     $Tab->maxHeight(300);
     while ($T = $GSTG->getNextEntry()) {
         if (isset($used[$T->getID()])) {
             continue;
         }
         $Tab->addRow(array($T->A("GSTaetigkeitName")));
         $Tab->setRowID("GST_" . $R->getID() . "_" . $T->getID());
         $Tab->addRowEvent("click", "CustomerPage.rme('addTaetigkeit', [" . $R->getID() . ", " . $T->getID() . "], function(transport) { \$('#frameLeft" . $R->getID() . "').html(transport); \$('#GST_" . $R->getID() . "_" . $T->getID() . "').hide(); });");
     }
     $GSTG->resetPointer();
     return "<h4>Verfügbare Tätigkeiten</h4>{$Tab}";
 }
示例#6
0
 public function getAuftrag($data)
 {
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $Auftrag = new Auftrag($Beleg->A("AuftragID"));
     $Adresse = new Adresse($Auftrag->A("AdresseID"));
     $BCheckK = "";
     if (Session::isPluginLoaded("mklickTel")) {
         $BCheckK = new Button("Adresse mit klickTel prüfen", "compass", "iconic");
         $BCheckK->style("float:right;font-size:30px;margin-right:15px;");
         $BCheckK->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressKlickTel', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
         $BCheckK->id("BCheckKT");
         Aspect::joinPoint("modButtonKlickTel", $this, __METHOD__, array($BCheckK, $Auftrag));
     }
     $BUpdate = new Button("Adresse ändern", "pen_alt2", "iconic");
     $BUpdate->style("float:right;font-size:30px;margin-right:15px;");
     $BUpdate->onclick("CustomerPage.popup('Adresse ändern', 'alterAddress', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG = new Button("Adresse mit Google prüfen", "compass", "iconic");
     $BCheckG->style("float:right;font-size:30px;");
     $BCheckG->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressGoogle', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG->id("BCheckG");
     Aspect::joinPoint("modButtonGoogle", $this, __METHOD__, array($BCheckG, $Auftrag));
     $TAdresse = new HTMLTable(2, "Kundenadresse");
     $TAdresse->setColWidth(1, 26);
     $TAdresse->setTableStyle("width:100%;");
     $TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $BCheckG . $BCheckK . $BUpdate . $Adresse->getHTMLFormattedAddress()));
     $TAdresse->setColStyle(1, "vertical-align:top;");
     $TPosten = new HTMLTable(7, "Auftragspositionen");
     $TPosten->setTableStyle("width:100%;");
     #$TPosten->addColStyle(3, "text-align:right;");
     $TPosten->addColStyle(4, "text-align:right;");
     $TPosten->addColStyle(5, "text-align:right;");
     $TPosten->addColStyle(6, "text-align:right;color:grey;");
     $TPosten->setColWidth(1, 26);
     $TPosten->setColWidth(2, 80);
     $TPosten->setColWidth(4, 80);
     $TPosten->setColWidth(5, 80);
     $TPosten->setColWidth(6, 80);
     $TPosten->setColWidth(7, 20);
     $AC = anyC::get("Posten", "GRLBMID", $Beleg->getID());
     $AC->addOrderV3("PostenID");
     $i = 0;
     $O = new Button("Positionen", "list", "iconic");
     while ($P = $AC->getNextEntry()) {
         $B = new Button("Position löschen", "trash_stroke", "iconic");
         $B->onclick("CustomerPage.rme('delPosten', {PostenID: '" . $P->getID() . "'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $I = new HTMLInput("mwst", "text", Util::CLNumberParserZ($P->A("menge")));
         $I->style("text-align:right;width:80px;");
         $I->onEnter("\$j(this).trigger('blur');");
         $I->onblur("CustomerPage.rme('setMenge', {PostenID: '" . $P->getID() . "', menge: this.value}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $TPosten->addRow(array($i == 0 ? $O : "", $I, $P->A("name"), Util::CLNumberParserZ($P->A("preis")), Util::CLNumberParserZ($P->A("menge") * $P->A("preis")), Util::CLNumberParserZ($P->A("mwst")) . "%", $B));
         $i++;
     }
     if ($AC->numLoaded() == 0) {
         $TPosten->addRow(array($O, "Bitte fügen Sie einen Artikel hinzu."));
         $TPosten->addRowColspan(2, 6);
         $TPosten->setColWidth(2, "100%");
         $TPosten->setColStyle(2, "text-align:left;");
     }
     $TSumme = new HTMLTable(3);
     $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;");
     $TSumme->setColWidth(1, 26);
     $TSumme->addColStyle(3, "text-align:right;");
     $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>"));
     $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit")));
     $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl"));
     $IBankleitzahl->placeholder("Bankleitzahl");
     $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;");
     $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer"));
     $IKontonummer->placeholder("Kontonummer");
     $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;");
     $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     #$IBIC = new HTMLInput("bic");
     #$IIBAN = new HTMLInput("iban");
     $BCheck = new Button("Prüfung", "question_mark", "iconic");
     $BCheck->id("ktoCheck");
     $BCheck->style("margin-left:8px;");
     $TZahlungsart = new HTMLTable(2, "Zahlungsart");
     $TZahlungsart->setTableStyle("width:100%;");
     $TZahlungsart->setColWidth(1, 26);
     $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart));
     $TZahlungsart->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;");
     $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\">&nbsp;</div>"));
     $TZahlungsart->setRowID("rowZahlungsart");
     if ($Beleg->A("GRLBMpayedVia") != "debit") {
         $TZahlungsart->addRowStyle("display:none;");
     } else {
         echo OnEvent::script("CustomerPage.saveKontodaten();");
     }
     $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten"));
     $IBemerkung->style("width:100%;height:100px;margin-top:40px;");
     $IBemerkung->placeholder("Bemerkungen");
     #$IBemerkung->onblur("");
     $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);");
     $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung));
     #$TSumme->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;");
     $IOK = new Button("Abschließen");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$(window).unbind('beforeunload'); document.location.href='?CC=Auftrag&page=1';");
     $IC = new Button("Abbrechen");
     $IC->className("submitFormButton");
     $IC->style("background-color:#DDD;color:grey;float:none;");
     $IC->onclick("\$(window).unbind('beforeunload'); CustomerPage.rme('cancelAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(){ document.location.href='?CC=Auftrag&page=2'; });");
     $TZahlungsart->addRow(array("", $IC . $IOK));
     $TZahlungsart->addCellStyle(2, "padding-top:50px;");
     #$TZahlungsart->addCellStyle(3, "padding-top:50px;");
     $html = "<h1>Auftrag</h1>\n\t\t\t\t{$TAdresse}\n\t\t\t\t{$TPosten}\n\t\t\t\t{$TSumme}\n\t\t\t\t{$TZahlungsart}";
     return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung  = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };");
 }