Beispiel #1
0
<?php

$win = new SDPanel();
$win->setCaption("Add Budget");
$token = new InputText(80);
$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");
$table_form->setClass("table.forms");
$money_value = new InputNumeric(15);
$money_value->setClass("input.form");
$input_date = new InputDate();
$input_date->setClass("input.form");
$button = new Button();
$button->setCaption("Confirm");
$button->onTap(confirm());
$button->setClass("button.blue");
$table_form->addControl($money_value, 1, 1, 1, 1, "Center", "Middle");
$table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle");
$table_button = new Table();
$table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function confirm()
{
    $token = StorageAPI::Get("token");
$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");
$label_value = new Label();
$label_value->setCaption("Value:");
$label_value->setClass("label.black");
$label_date = new Label();
$label_date->setCaption("Date:");
Beispiel #3
0
$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);
$table_form->addControl($date, 2, 1, 1, 2);
$table_form->addControl($description, 3, 1, 1, 2, "Left", "Top");
Beispiel #4
0
$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);
$table->addControl($list);
$win->addControl($table);