function login() { if ($username == null) { echo "E-Mail is a required field."; } else { if ($password == null) { echo "Password is a required field."; } else { ProgressIndicator::Show(); $url = "http://demo.kikapptools.com/Gastos/crud/Login.php"; $httpClient_post = new httpClient(); $inputMetodo = new InputText(); $inputMetodo->setValue("login"); $httpClient_post->addVariable('username', $username); $httpClient_post->addVariable('password', $password); $result = $httpClient_post->Execute('POST', $url); $id_user = new InputText(); $struct = array("response" => DataType::Character(50)); Data::FromJson($struct, $result); $id_user = $struct['response']; ProgressIndicator::Hide(); if ($id_user != "0") { StorageAPI::Set("token", $id_user); AndroidAction::GoHome(); } else { echo "Wrong user or password"; } } } }
function save() { if ($username == null) { echo "E-Mail is a required field."; } else { if ($password == null) { echo "Password is a required field."; } else { if ($password != $password2) { echo "Please make sure your passwords match."; } else { ProgressIndicator::Show(); $url = "http://demo.kikapptools.com/Gastos/crud/updateUser.php"; $httpClient_post = new httpClient(); $inputMetodo = new InputText(); $inputMetodo->setValue("login"); $httpClient_post->addVariable('username', $username); $httpClient_post->addVariable('password', $password); $httpClient_post->addVariable('id', $token); $result = $httpClient_post->Execute('POST', $url); $id_user = new InputText(); $struct = array("response" => DataType::Character(50)); Data::FromJson($struct, $result); $id_user = $struct['response']; ProgressIndicator::Hide(); AndroidAction::GoHome(); } } } }
/** * Read array meta data, and store to meta object * * @param array $xmlArr * @return void */ protected function readMetaData($xmlArr) { parent::readMetaData($xmlArr); $this->m_cssClass = isset($xmlArr["ATTRIBUTES"]["CSSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSCLASS"] : "input_text_s"; $this->m_cssErrorClass = isset($xmlArr["ATTRIBUTES"]["CSSERRORCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSERRORCLASS"] : $this->m_cssClass . "_error"; $this->m_cssFocusClass = isset($xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"] : $this->m_cssClass . "_focus"; $this->m_Mode = isset($xmlArr["ATTRIBUTES"]["MODE"]) ? $xmlArr["ATTRIBUTES"]["MODE"] : null; $this->m_Config = isset($xmlArr["ATTRIBUTES"]["CONFIG"]) ? $xmlArr["ATTRIBUTES"]["CONFIG"] : null; }
/** * Render / draw the element according to the mode * * @return string HTML text */ public function render() { BizSystem::clientProxy()->includeCalendarScripts(); $format = $this->m_DateFormat ? $this->m_DateFormat : "%Y-%m-%d"; $sHTML = parent::render(); $showTime = 'false'; //$image = "<img src=\"".Resource::getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>"; $sHTML .= "<a class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('{$this->m_Name}','{$format}',{$showTime},true);\"></a>"; return $sHTML; }
/** * Render, draw the control according to the mode * * @return string HTML text */ public function render() { $sHTML = parent::render(); // sample picker call CallFunction('easy.f_AttendeeListChild.LoadPicker(view,form,elem)','Prop_Window'); if ($this->m_ValuePicker != null) { $function = $this->m_FormName . ".LoadPicker({$this->m_ValuePicker},{$this->m_Name})"; $sHTML .= " <input type=button onClick=\"Openbiz.CallFunction('{$function}');\" value=\"...\" style='width:20px;' />"; } return $sHTML; }
/** * Augment whatever classes the user is supplying manually with * Boostrap's form-control class. * * @param array $options * @return string */ public function directArray(array $options) { if (!isset($options['classes'])) { $options['classes'] = array(); } elseif (!is_array($options['classes'])) { $options['classes'] = array($options['classes']); } $options['classes'][] = 'form-control'; return parent::directArray($options); }
/** * Render / draw the element according to the mode * * @return string HTML text */ public function render() { BizSystem::clientProxy()->includeCalendarScripts(); $format = $this->m_DateFormat ? $this->m_DateFormat : "%Y-%m-%d %H:%M:%S"; $sHTML = parent::render(); $showTime = "'24'"; //$image = "<img src=\"".Resource::getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>"; $sHTML .= "<a title=\"Select date...\" class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('" . $this->m_Name . "', '" . $format . "', " . $showTime . ", true); return false;\" onmousemove='window.status=\"Select a datetime\"' onmouseout='window.status=\"\"'></a>"; return $sHTML; }
public function init() { parent::init(); $this->addValidator(function (Field $field) { if (strlen($field->value) && !is_numeric($field->value)) { $field->addError(Lang::trans('NUMERIC_VALUE')); } elseif (strlen($field->value) && $field->min && $field->value < $field->min) { $field->addError(Lang::trans('MIN_VALUE', $field->min)); } elseif (strlen($field->value) && $field->max && $field->value > $field->max) { $field->addError(Lang::trans('MAX_VALUE', $field->max)); } }); }
$btn_delete->setCaption("Delete"); $btn_delete->onTap(delete()); $acb->addControl($btn_update); $acb->addControl($btn_delete); $win->addControl($acb); $mainTable = new Table(); $mainTable->setEnableHeaderRowPattern(true); $mainTable->setHeaderRowApplicationBarsClass("applicationBars.transparent"); $mainTable->setRowsStyle("150dip;pd"); $tableImg = new Table(); $tableImg->setClass("table.image"); $tableImg->setRowsStyle("pd;150dip;pd"); $image = new InputImage(); $image->setReadOnly(true); $image->setClass("image.roundBorder"); $name = new InputText(); $name->setReadOnly(true); $name->setClass("input.title"); $address = new InputAddress(); $address->setReadOnly(true); $phone = new InputPhone(); $phone->setReadOnly(true); $tableImg->addControl($image, 2, 1, 1, 1, "Center", "Middle"); $tableImg->addControl($name, 3, 1, 1, 1, "Center", "Middle"); $tableDesc = new Table(); $tableDesc->setClass("table.margin"); $tableDesc->addControl($address, 1, 1); $tableDesc->addControl($phone, 2, 1); $mainTable->addControl($tableImg, 1, 1); $mainTable->addControl($tableDesc, 2, 1); $win->addControl($mainTable);
//Get var sent from main screen $id = new InputNumeric(); $id->setClass("input.Common"); Data::getParm($id); //Define the acrtion bar $bar = new ActionBar(); $btn_delete = new ButtonBar(); $btn_delete->setCaption("Delete"); $btn_delete->onTap(removeTask()); $btn_delete->setImage("img/deleteBar.png"); $bar->addControl($btn_delete); $win->addControl($bar); //Items definition $name = new InputText(); $name->setClass("input.Common"); $description = new InputText(); $description->setClass("input.Common"); $date = new InputDate(); $date->setLabelCaption("Task date"); $date->setClass("input.Common"); $addToCalendar = new InputBoolean(); $addToCalendar->setLabelCaption("Add to my calendar"); $addToCalendar->setLabelPosition("Right"); //Main table definition $table = new Table(); $table->setClass("table.Background"); $table_form = new Table(); $table_form->setClass("table.Form"); $table_form->setRowsStyle("65dip;65dip;120dip;55dip"); $table_form->setHeight("90%"); $table_form->addControl($name, 1, 1, 1, 2);
/*** * Edit my data. */ $win = new SDPanel(); $win->setCaption("My Account"); $token = new InputText(80); Data::getParm($token); $table = new Table(); $table->setClass("tablebackground"); $table_form = new Table(); $table_form->setClass("tableforms"); $table_form->setRowsStyle("76dip;76dip;76dip"); $name = new InputText(); $name->setClass("inputForm"); $last_name = new InputText(); $last_name->setClass("inputForm"); $email = new InputEmail(); $email->setClass("inputForm"); $btn_save = new Button(); $btn_save->setCaption("Save"); $btn_save->setClass("buttonform"); $btn_save->onTap(save()); $table_form->addControl($name, 1, 1); $table_form->addControl($last_name, 2, 1); $table_form->addControl($email, 3, 1); $table_button = new Table(); $table_button->addControl($btn_save, 1, 1); $table->addControl($table_form, 1, 1); $table->addControl($table_button, 2, 1); $win->addControl($table);
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Interop"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $input_message = new InputText(); $input_message->setLabelCaption("Write the message"); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Write the phone number"); $button_sms = new Button(); $button_sms->setCaption("Send SMS!"); $button_sms->onTap(sms()); $mainTable->addControl($input_message, 1, 1); $mainTable->addControl($input_phone, 2, 1); $mainTable->addControl($button_sms, 3, 1); $win->addControl($mainTable); function sms() { Interop::SendSMS($input_phone, $input_message); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Hello world!"); $mainTable = new Table(); $input = new InputText(); $input->setLabelCaption("Write your name"); $button = new Button(); $button->setCaption("Click me!"); $button->onTap(clickme()); $mainTable->addControl($input, 1, 1); $mainTable->addControl($button, 2, 1); $win->addControl($mainTable); function clickme() { StorageAPI::Set("token", $input); $name = new InputText(); $name = StorageAPI::Get("token"); echo "Your name is: " . $name; }
$btn_email->setImage("img/ic_email.png"); $btn_email->onTap(email()); $acg1->addControl($btn_facebook); $acg1->addControl($btn_tw); $acg1->addControl($btn_sms); $acg1->addControl($btn_email); $apb1->addControl($acg1); //Add action bar to a SDPanel. $win->addControl($apb1); $tableItemDetail = new Table(); $tableItemDetail->setClass("table.TableDetailMain"); $title = new InputText(150); $title->setClass("inputtitleblack"); $title->setAutoGrow(true); $title->setReadOnly(true); $desc = new InputText(300); $desc->setClass("attributeTextGray"); $desc->setReadOnly(true); $desc->setAutoGrow(true); $price = new InputText(10); $price->setClass("inputTextPrice"); $price->setReadOnly(true); $stock = new InputText(); $stock->setClass("input.textStock"); $stock->setReadOnly(true); $grid = new HorizontalGrid(); $grid->setRowsPerPagePortrait(1); $grid->setShowPageController(true); //$grid -> setPageControllerBackColor("#FFFFFF"); $grid->addData(load_image()); //$grid -> onTap(view_image());
$token = new InputText(80); $moveType = new InputText(); Data::getParm($moveType); $table = new Table(); $table->setRowsStyle("100%"); $table->setWidth("100%"); $table->setHeight("100%"); $table->setClass("table.white"); $table_form = new Table(); $table_form->setRowsStyle("76dip;76dip;76dip;76dip"); $table_form->setClass("table.forms"); $input_value = new InputNumeric(15); $input_value->setClass("input.form"); $input_date = new InputDate(); $input_date->setClass("input.form"); $input_desc = new InputText(); $input_desc->setLabelCaption("Description"); $input_desc->setClass("input.form"); $dc_cat = new DynamicComboBox(); $dc_cat->setValues(load_cat()); $dc_cat->setAddEmptyItem(false); $dc_cat->setClass("input.form"); $button = new Button(); $button->setCaption("Confirm"); $button->onTap(confirm()); $button->setClass("button.blue"); $table_form->addControl($input_value, 1, 1, 1, 1, "Center", "Middle"); $table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle"); $table_form->addControl($input_desc, 3, 1, 1, 1, "Center", "Middle"); $table_form->addControl($dc_cat, 4, 1, 1, 1, "Center", "Middle"); $table_button = new Table();
function getValue($filtered = true) { return implode('-', array_reverse(explode('/', parent::getValue($filtered)))); }
$actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $grid_home = new HorizontalGrid(); $grid_home->setRowsPerPagePortrait(1); $grid_home->setShowPageController(false); $table_grid = new Canvas(); $grid_home->addData(grid_load()); //inputs and controls $title = new InputText(150); $title->setClass("inputtextTitlewhite"); $title->setAutoGrow(true); $image = new InputImage(); $image->setClass("imageImageList"); $desc = new InputText(300); $desc->setClass("inputtextwhite"); $price = new InputText(10); $price->setClass("inputtextPrice"); $table_desc = new Table(); $table_desc->setRowsStyle("25dip;35dip;25dip"); $table_desc->setClass("tableProductThumb"); $table_desc->addControl($title, 1, 1); $table_desc->addControl($desc, 2, 1); $table_desc->addControl($price, 3, 1); $table_grid->addPosition($image, "0%", "100%", "0", "230dip", "0%", "100%"); $table_grid->addPosition($table_desc, "0%", "100%", "140dip", "83dip", "0", "0"); $grid_home->addControl($table_grid); $mainTable->setRowsStyle("230dip;100%"); $mainTable->addControl($grid_home, 1, 1); $win->addControl($mainTable); function grid_load() {
$btn_update->onTap(save()); $btn_cancel = new ButtonBar(); $btn_cancel->setCaption("Delete"); $btn_cancel->onTap(delete()); $acb->addControl($btn_update); $acb->addControl($btn_cancel); $win->addControl($acb); $mainTable = new Table(); $mainTable->setRowsStyle("100%"); $mainTable->setWidth("100%"); $mainTable->setHeight("100%"); $mainTable->setClass("table.white"); $table = new Table(); $table->setRowsStyle("76dip;76dip;76dip;76dip;76dip"); $table->setClass("table.forms"); $move_type = new InputText(); $move_type->setClass("input.form"); $move_type->setReadOnly(true); $value = new InputNumeric(10); $value->setClass("input.form"); $date = new InputDate(); $date->setClass("input.form"); $description = new InputText(); $description->setClass("input.form"); $dc_cat = new DynamicComboBox(); $dc_cat->setValues(load_cat()); $dc_cat->setAddEmptyItem(false); $dc_cat->setClass("input.form"); $label_type = new Label(); $label_type->setCaption("Move type:"); $label_type->setClass("label.black");
*/ $win = new SDPanel(); $win->setCaption("Login"); $table = new Table(); $table->setRowsStyle("80dip;100%"); $table->setClass("table.background"); $lbl_home = new Label(); $lbl_home->setClass("label.Titlelogin"); $lbl_home->setCaption("Login to KikApp Store"); $table_form = new Table(); $table_form->setRowsStyle("76dip;76dip"); $table_form->setClass("tableforms"); $email = new InputEmail(); $email->setClass("inputForm"); $email->setInviteMessage("E-Mail"); $pass = new InputText(); $pass->setClass("inputForm"); $pass->setInviteMessage("Password"); $pass->setIsPassword(true); $btn_save = new Button(); $btn_save->setCaption("LOG IN"); $btn_save->setClass("buttonform"); $btn_save->onTap(login()); $lbl_signup = new Label(); $lbl_signup->setClass("label.SubTitlelogin"); $lbl_signup->setCaption("Not a store member?"); $btn_register = new Button(); $btn_register->setCaption("SIGN UP NOW"); $btn_register->setClass("button.Small"); $btn_register->onTap(register()); $table_form->addControl($email, 1, 1);
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("First Facebook Post!"); $mainTable = new Table(); $input = new InputText(); $input->setLabelCaption(""); $button = new Button(); $button->setCaption("Post on Facebook"); $button->onTap(PostOnFacebook()); $mainTable->addControl($input, 1, 1); $mainTable->addControl($button, 2, 1); $win->addControl($mainTable); function PostOnFacebook() { Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", ""); }
$win->setCaption("Create an account"); $table = new Table(); $table->setWidth("100%"); $table->setHeight("100%"); $table->setClass("table.white"); $table_form = new Table(); $table_form->setRowsStyle("76dip;76dip;76dip"); $table_form->setClass("table.forms"); $email = new InputEmail(); $email->setInviteMessage("E-Mail"); $email->setClass("input.form"); $password = new InputText(); $password->setClass("input.form"); $password->setInviteMessage("Password"); $password->setIsPassword(true); $password_2 = new InputText(); $password_2->setClass("input.form"); $password_2->setInviteMessage("Confirm your Password"); $password_2->setIsPassword(true); $table_form->addControl($email, 1, 1); $table_form->addControl($password, 2, 1); $table_form->addControl($password_2, 3, 1); $btn_save = new Button(); $btn_save->setCaption("SIGN UP"); $btn_save->setClass("button.blue"); $btn_save->onTap(save()); $table_button = new Table(); $table_button->addControl($btn_save, 1, 1); $table->addControl($table_form, 1, 1); $table->addControl($table_button, 2, 1); $win->addControl($table);
$mainTable->setRowsStyle("100%"); $mainTable->setWidth("100%"); $mainTable->setHeight("100%"); $canvas = new Canvas(); $canvas->setWidth("100%"); $canvas->setHeight("100%"); $img_add = new Image(); $img_add->setImage("img/Android/hdpi/plus_circle.png"); $img_add->onTap(insert()); $list = new Grid(); $table_list = new Table(); $table_list->setColumnsStyle("86dip;100%"); //Controls in grid. $image = new InputImage(); $image->setClass("image.List"); $name = new InputText(); $name->setClass("input.title"); $address = new InputText(); $table_info = new Table(); $table_info->addControl($name, 1, 1, 1, 1, "Left", "Bottom"); $table_info->addControl($address, 2, 1); $table_list->addControl($image, 1, 1); $table_list->addControl($table_info, 1, 2); $list->addData(load_companies()); $list->addSearch($name); $list->addControl($table_list, 1, 1); $list->onTap(action()); $canvas->addPosition($list, "0", "100%", "0", "100%", "0", "0", 0); $canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 1); $mainTable->addControl($canvas, 1, 1); $win->addControl($mainTable);
/** * * Show/handle feedback form */ public function showFeedback() { $form = new Form(); $inputName = new InputText('name'); $inputName->addValidator(new Validator()); $form->addElement($inputName, 'Naam (verplicht)'); $inputEmail = new InputText('email'); $inputEmail->addValidator(new EmailValidator(false)); $form->addElement($inputEmail, 'E-mailadres (niet verplicht)'); $inputMessage = new TextArea('comment'); $inputMessage->addValidator(new LengthValidator(true, 20, 1000)); $form->addElement($inputMessage, 'Feedback (verplicht)'); $this->assign('form', $form); $this->template = '/feedback/feedback.form.tpl'; // Validate if this form has just been posted if ($form->isPosted()) { $form->validate(); if ($form->getErrors()) { $this->assign('hasErrors', true); $this->assign('errors', $form->getErrors()); } else { // Save feedback $oFeedback = new Feedback(); $oFeedback->name = htmlentities($inputName->getValue()); $oFeedback->email = htmlentities($inputEmail->getValue()); $oFeedback->message = htmlentities($inputMessage->getValue()); $oFeedback->ip = $_SERVER['REMOTE_ADDR']; $oFeedback->save(); $this->assign('feedback', $oFeedback); $this->template = '/feedback/feedback.confirm.tpl'; } } $this->assignSettings(); $this->smarty->display('templates' . $this->template); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Twitter API!"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); //$mainTable-> setClass("table.general"); $input = new InputText(); $input->setLabelCaption("Write what you want to tweet!"); $button = new Button(); $button->setCaption("Tweet!"); $button->onTap(twitter()); $button->setClass("button.blue"); $mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle"); $mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle"); $win->addControl($mainTable); function twitter() { Twitter::Tweet($input); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("First Facebook Post!"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $input = new InputText(); //create input $input->setLabelCaption("Write your thoughts"); $button = new Button(); $button->setCaption("Post on Facebook"); $button->onTap(facebook()); $button->setClass("button.blue"); $mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle"); $mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle"); $win->addControl($mainTable); function facebook() { Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", ""); }
$btn_contact_add->setCaption("Add Contact"); $btn_contact_add->onTap(addContact()); $btn_contact_viewAll = new Button(); $btn_contact_viewAll->setCaption("View All Contact"); $btn_contact_viewAll->onTap(viewAllContact()); $input_name = new InputText(); $input_name->setLabelCaption("Name"); $input_lastname = new InputText(); $input_lastname->setLabelCaption("Last Name"); $input_email = new InputEmail(); $input_email->setLabelCaption("E-mail"); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Phone"); $input_work = new InputText(); $input_work->setLabelCaption("Work"); $input_message = new InputText(); $input_message->setLabelCaption("Message"); $mainTable->addControl($input_name, 1, 1); $mainTable->addControl($input_lastname, 2, 1); $mainTable->addControl($input_email, 3, 1); $mainTable->addControl($input_phone, 4, 1); $mainTable->addControl($input_work, 5, 1); $mainTable->addControl($input_message, 6, 1); $mainTable->addControl($btn_contact_add, 7, 1); $mainTable->addControl($btn_contact_viewAll, 8, 1); $win->addControl($mainTable); function addContact() { $isOk = new InputBoolean(); $isOk = AddressBook::AddContact($input_name, $input_lastname, $input_email, $input_phone, $input_work, "", $input_message); if ($isOk == true) {
function outcome() { $moveType = new InputText(); $moveType->setValue("1"); $win->Open("IncomeOutcome", $moveType); }
$input1 = new InputText(); $input1->setReadOnly(true); $input1->setClass("label.black"); $label_green_bis = new Label(); $label_green_bis->setClass("label.income"); $label_red_bis = new Label(); $label_red_bis->setClass("label.outcome"); $table_income_month = new Table(); $table_income_month->setColumnsStyle("5dip;50%;50%"); $table_income_month->addControl($label_green_bis, 1, 1, 1, 1, "", "Middle"); $table_income_month->addControl($label_income_month, 1, 2, 1, 1, "Center", "Middle"); $table_income_month->addControl($input1, 1, 3, 1, 1, "Right", "Middle"); $label_outcome_month = new Label(); $label_outcome_month->setCaption("Outcome: "); $label_outcome_month->setClass("label.black"); $input2 = new InputText(); $input2->setReadOnly(true); $input2->setClass("label.black"); $table_outcome_month = new Table(); $table_outcome_month->setColumnsStyle("5dip;50%;50%"); $table_outcome_month->addControl($label_red_bis, 1, 1, 1, 1, "", "Middle"); $table_outcome_month->addControl($label_outcome_month, 1, 2, 1, 1, "Center", "Middle"); $table_outcome_month->addControl($input2, 1, 3, 1, 1, "Right", "Middle"); $table_first->addControl($table_account, 1, 1); $table_first->addControl($table_income, 2, 1); $table_first->addControl($table_outcome, 3, 1); $table_second->addControl($table_title_month, 1, 1); $table_second->addControl($table_income_month, 2, 1); $table_second->addControl($table_outcome_month, 3, 1); //addPosition(control, left, width, top, height, right, bottom, zorder) $canvas->addPosition($table_first, "10dip", "100%", "15dip", "60dip", "10dip", "0%", 1);
public static function Factory($name, $value = '', $label = '', $required = false, $attrList = array()) { $element = new InputText($name); $element->setValue($value); $element->setLabel($label); $element->setRequired($required); $element->setOptionList($attrList); return $element; }
$barGroup->addControl($btn_fifteen_days); $barGroup->addControl($btn_thirty_days); $bar->addControl($barGroup); $win->addControl($bar); //Items List definition $table = new Table(); $table->setClass("table.Menu"); $list = new Grid(); $list->addData(load_grid()); $list->setEmptyGridText("Your list is empty"); $list->addSearch($name); $table_grid = new Table(); $table_grid->setClass("table.DetailMain"); //Items definition $id = new InputNumeric(); $name = new InputText(); $name->setClass("input.Title"); $date = new InputDate(); $date->setClass("input.Common"); $statusIcon = new Image(); $statusIcon->setImage("img/tick.png"); $statusIcon->setClass("image.ListIcon"); $statusIcon->onTap(changeToDone()); $table_list = new Table(); $table_list->addControl($name, 1, 1, 1, 6, "Left", "Middle"); $table_list->addControl($date, 1, 2, 1, 2, "Left", "Middle"); $table_list->addControl($statusIcon, 1, 3, 1, 1, "Middle", "Middle"); $table_grid->addControl($table_list, 1, 1); $table_grid->onTap(detail()); //Add controls to main screen $list->addControl($table_grid);