private function getInput($v) { if (!isset($this->types[$v]) or $this->types[$v] != "parser") { if (isset($this->types[$v]) and ($this->types[$v] == "tinyMCE" or $this->types[$v] == "TextEditor" or $this->types[$v] == "nicEdit")) { $options = array($this->id, $v); if (isset($this->options[$v])) { foreach ($this->options[$v] as $ov) { $options[] = $ov; } } $this->options[$v] = $options; } $Input = new HTMLInput($v, isset($this->types[$v]) ? $this->types[$v] : "text", isset($this->values[$v]) ? $this->values[$v] : null, isset($this->options[$v]) ? $this->options[$v] : null); if (isset($this->onChange[$v])) { $Input->onchange($this->onChange[$v]); } if (isset($this->onBlur[$v])) { $Input->onblur($this->onBlur[$v]); } if (isset($this->onFocus[$v])) { $Input->onfocus($this->onFocus[$v]); } if (isset($this->onKeyup[$v])) { $Input->onkeyup($this->onKeyup[$v]); } if (isset($this->inputStyle[$v])) { $Input->style($this->inputStyle[$v]); } if (isset($this->autocomplete[$v])) { $Input->autocomplete($this->autocomplete[$v][0], $this->autocomplete[$v][1], false, $this->autocomplete[$v][2]); } if (isset($this->placeholders[$v])) { $Input->placeholder($this->placeholders[$v]); } $Input->isDisplayMode(!$this->editable); } else { $method = explode("::", $this->options[$v][0]); $Input = Util::invokeStaticMethod($method[0], $method[1], array(isset($this->values[$v]) ? $this->values[$v] : null, "", isset($this->options[$v][1]) ? $this->options[$v][1] : null)); } return $Input; }
public function getQuicksearchInput() { $I = new HTMLInput("quickSearch", "text", ""); #$I->hasFocusEvent(true); $I->id("quickSearch{$this->collectionName}"); $I->onkeyup("AC.update(event.keyCode, this, '{$this->collectionName}','quickSearchLoadFrame');"); $I->autocompleteBrowser(false); $I->onfocus("focusMe(this); ACInputHasFocus=true; AC.start(this); if(this.value != '') AC.update('10', this, '{$this->collectionName}', 'quickSearchLoadFrame');"); $I->onblur("blurMe(this); ACInputHasFocus=false; AC.end(this);"); return $I; }
public function getQuicksearchInput() { $I = new HTMLInput("quickSearch", "text", ""); #$I->hasFocusEvent(true); $I->id("quickSearch{$this->collectionName}"); $I->onkeyup("AC.update(event.keyCode, this, '{$this->collectionName}','quickSearchLoadFrame');"); $I->autocompleteBrowser(false); $I->onfocus("focusMe(this); ACInputHasFocus=true; AC.start(this); if(this.value != '') AC.update('10', this, '{$this->collectionName}', 'quickSearchLoadFrame');"); $I->onblur("blurMe(this); ACInputHasFocus=false; AC.end(this);"); $I->placeholder("Suche"); $B = ""; $showSF = PMReflector::implementsInterface($this->collectionName . "GUI", "iSearchFilter"); if ($showSF) { $B = new Button("Suche als Filter anwenden", "./images/i2/searchFilter.png", "icon"); $B->style("float:right;"); $B->rme("HTML", "", "saveContextMenu", array("'searchFilter'", "'{$this->collectionName};:;'+\$('quickSearch{$this->collectionName}').value"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); $mU = new mUserdata(); $K = $mU->getUDValue("searchFilterInHTMLGUI" . $this->collectionName); $I->setValue($K); $I->style("width:90%;"); } return $B . $I; }
public function getPosten(GRLBM $Beleg) { $TPosten = new HTMLTable(8, "Auftragspositionen"); $TPosten->setTableStyle("width:100%;"); #$TPosten->addColStyle(3, "text-align:right;"); $TPosten->addColStyle(5, "text-align:right;"); $TPosten->addColStyle(6, "text-align:right;"); $TPosten->addColStyle(7, "text-align:right;color:grey;"); $TPosten->addColStyle(8, "text-align:right;"); $TPosten->setColWidth(1, 26); $TPosten->setColWidth(2, 80); $TPosten->setColWidth(5, 80); $TPosten->setColWidth(6, 80); $TPosten->setColWidth(7, 80); $TPosten->setColWidth(8, 20); Aspect::joinPoint("alterTable", $this, __METHOD__, array($TPosten)); $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: " . $Beleg->getID() . "}, 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->onfocus("CCAuftrag.lastValue = this.value; CCAuftrag.allowSave = true;"); $I->onblur("if(CCAuftrag.lastValue != this.value && CCAuftrag.allowSave) CustomerPage.rme('setMenge', {PostenID: '" . $P->getID() . "', menge: this.value}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: " . $Beleg->getID() . "}, function(transport){ \$('#contentLeft').html(transport); }); }); CCAuftrag.allowSave = false;"); $name = Aspect::joinPoint("alterName", $this, __METHOD__, array($P, $P->A("name")), $P->A("name")); $buttons = Aspect::joinPoint("alterButtons", $this, __METHOD__, array($P, $B), $B); $TPosten->addRow(array($i == 0 ? $O : "", $I, $P->A("gebinde"), $name, $this->showPrices ? Util::CLNumberParserZ($P->A("preis")) : "", $this->showPrices ? Util::CLNumberParserZ($P->A("menge") * $P->A("preis")) : "", $this->showPrices ? Util::CLNumberParserZ($P->A("mwst")) . "%" : "", $buttons)); $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;"); } return $TPosten; }
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;\"> </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); }); };"); }
public function getOverviewContent() { $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemEinkaufszettelGUI\"></span><p>Einkaufen</p></div>\n\t\t\t<div style=\"padding:10px;\">"; $I = new HTMLInput("EinkaufslisteNewEntryOV", "textarea"); $I->placeholder("Neuer Eintrag"); $I->style("width:100px;padding:3px;font-size:20px;font-family:monospace;height:32px;max-height:32px;"); $I->onfocus("fheOverview.noreload.push('mEinkaufszettelGUI::getOverviewContent'); fheOverview.noresize = true;"); $I->onblur("fheOverview.noreload.pop(); fheOverview.noresize = false;"); #$I->onkeyup("var currentContent = \$j(this).val(); ".OnEvent::rme($this, "getACData", array("this.value"), "function(transport){ var json = jQuery.parseJSON(transport.responseText); if(json.length >= 1) \$j('#EinkaufslisteNewEntryAC').html(json[0].EinkaufszettelName.replace(currentContent, '<span style=\'color:white;\'>'+currentContent+'</span>')); else \$j('#EinkaufslisteNewEntryAC').html(''); }")); $I->onEnter(OnEvent::rme($this, "addItem", array("this.value", "1"), "function(transport){ \$j('#EinkaufszettelLastAdded').html(transport.responseText); }") . " \$j(this).val('');"); $B = new Button("Einkaufsliste anzeigen", "list", "touch"); $B->popup("", "Einkaufsliste", "mEinkaufszettel", "-1", "showCurrentList", "", "", "{top:20, width:1000, hPosition:'center', blackout:true}"); $html .= "<div id=\"EinkaufslisteNewEntryContainer\">{$B}</div>\n\t\t\t<!--<div id=\"EinkaufszettelLastAdded\">-->"; #$html .= $this->getOverviewList(); $html .= "<!--</div>--></div>" . OnEvent::script("\$j('[name=EinkaufslisteNewEntryOV]').css('width', (\$j('#EinkaufslisteNewEntryContainer').innerWidth() - 70)+'px');"); echo $html; }