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 newInput($number) { $htmlTable = new HTMLTable(2); $input = new HTMLInput("adress_" . ++$number, "text"); $input->autocomplete("mTodo", "function(selection) { (typeof selection.email != 'undefined')? \$j('input[name=adress_" . $number . "]').val(selection.email) : \$j('input[name=adress_" . $number . "]').val(selection.value); return false; }"); $input->onfocus(OnEvent::rme($this, "newInput", $number, "function(transport) {\$j('input[name=adress_" . $number . "]').closest('tr').after(transport.responseText); \$j('input[name=adress_" . $number . "]').attr('onfocus', ''); }")); $htmlTable->addLV("Teilnehmer " . ($number + 1) . ":", $input); echo $htmlTable->getHTMLForUpdate(true); }
public function getAuftrag($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $html = ""; if ($data["GRLBMID"] == 0) { $html .= "<p class=\"highlight\" style=\"margin-top:10px;\">Bitte wählen Sie rechts einen Lieferschein.</p>"; return $html; } $Beleg = new GRLBM($data["GRLBMID"]); #$this->createAuftrag(new Adresse(1), "W"); $Auftrag = new Auftrag($Beleg->A("AuftragID")); $Adresse = new Adresse($Auftrag->A("AdresseID")); #$TAdresse = new HTMLTable(2, "Kundenadresse"); #$TAdresse->setColWidth(1, 26); #$TAdresse->setTableStyle("width:100%;"); #$TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $Adresse->getHTMLFormattedAddress())); #$TAdresse->setColStyle(1, "vertical-align:top;"); $TPosten = new HTMLTable(3, "Lieferung"); $TPosten->setTableStyle("width:100%;"); $TPosten->setColWidth(1, 26); $TPosten->setColWidth(2, 80); $TPosten->setColWidth(3, "100%"); $ACP = anyC::get("Posten", "GRLBMID", $Beleg->getID()); $ACP->addOrderV3("PostenID"); $ACP->addAssocV3("useForLieferung", "=", "1"); $i = 0; $O = new Button("Positionen", "list", "iconic"); /*while($P = $AC->getNextEntry()){ $I = new HTMLInput("mwst", "text", Util::CLNumberParser($P->A("menge"))); $I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;"); #$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });"); $I->onfocus("this.select();"); $TPosten->addRow(array( $i == 0 ? $O : "", $I, "<span style=\"font-size:15px;\">".$P->A("name")."</span>")); $i++; }*/ $AC = anyC::get("Artikel"); $AC->addOrderV3("name"); $AC->addAssocV3("useForLieferung", "=", "1"); while ($A = $AC->getNextEntry()) { $menge = 0; while ($P = $ACP->n()) { if ($P->A("oldArtikelID") == $A->getID()) { $menge = abs($P->A("menge")); } } $ACP->resetPointer(); $I = new HTMLInput("Artikel_" . $A->getID(), "text", Util::CLNumberParser($menge)); $I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;"); #$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });"); $I->onfocus("this.select();"); $TPosten->addRow(array($i == 0 ? $O : "", $I, "<span style=\"font-size:15px;\">" . $A->A("name") . "</span>")); $i++; } if ($AC->numLoaded() == 0) { $TPosten->addRow(array($O, "Keine Artikel")); $TPosten->addRowColspan(2, 6); $TPosten->setColWidth(2, "100%"); $TPosten->setColStyle(2, "text-align:left;"); } $IOK = new Button("Speichern"); $IOK->className("submitFormButton"); $IOK->onclick("CustomerPage.rme('handleLieferung', \$('#posten').serialize(), function(transport){ \$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); \$('#contentLeft .content').html(transport); })"); #$IOK->onclick("$('#contentLeft h1').html('Auftrag'); $('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ $('#contentLeft .content').html(transport); }, function(){}, 'POST');"); $IC = new Button("Abbrechen"); $IC->className("submitFormButton"); $IC->style("background-color:#DDD;color:grey;float:none;"); $IC->onclick("\$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ \$('#contentLeft .content').html(transport); }, function(){}, 'POST');"); #$TZahlungsart = new HTMLTable(2); #$TZahlungsart->setTableStyle("width:100%;margin-top:50px;"); #$TZahlungsart->setColWidth(1, 26); #$TZahlungsart->addRow(array("", $IOK)); $IA = new HTMLInput("action", "hidden", "handleLieferung"); $IA = new HTMLInput("GRLBMID", "hidden", $Beleg->getID()); $html .= "\n\t\t\t<form id=\"posten\" style=\"border:0px;padding:0px;width:100%;\" >\n\t\t\t\t{$TPosten}\n\t\t\t\t{$IOK}{$IC}\n\t\t\t\t{$IA}\n\t\t\t</form>"; return $html . OnEvent::script("\$('#contentLeft h1').html('Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "');"); }
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; }