Example #1
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$mainTable->setRowsStyle("300dip");
$video = new InputVideo();
$video->setReadOnly(true);
$mainTable->addControl($video, 1, 1);
$win->addControl($mainTable);
function clientStart()
{
    $video->setValue("https://www.youtube.com/watch?v=anywfG-X2b8");
}
Example #2
0
<?php

/***
 * 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);
Example #3
0
<?php

$win = new SDPanel();
$win->setCaption("Movements");
$maintable = new Table();
$maintable->setRowsStyle("100%");
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$maintable->setClass("table.white");
$label_budget = new Label();
$label_budget->setCaption("Add Budget");
$label_budget->setClass("label.blue");
$label_budget->onTap(budget());
$label_income = new Label();
$label_income->setCaption("Income");
$label_income->setClass("label.green");
$label_income->onTap(income());
$label_outcome = new Label();
$label_outcome->setCaption("Outcome");
$label_outcome->setClass("label.red");
$label_outcome->onTap(outcome());
$maintable->addControl($label_budget, 1, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_income, 2, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_outcome, 3, 1, 1, 1, "Center", "Middle");
$win->addControl($maintable);
function budget()
{
    $win->Open("Budget");
}
function income()
{
Example #4
0
$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");
$table_form->addControl($addToCalendar, 4, 1, 1, 1, "Left", "Top");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("button.Form");
$btn_save->onTap(save());
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->setHeight("10%");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1, 1, 1, "Center", "Bottom");
//Add controls to main screen
Example #5
0
Data::getParm($id);
//Action bar and buttons bar
$acb = new ActionBar();
$btn_update = new ButtonBar();
$btn_update->setCaption("Update");
$btn_update->onTap(update());
$btn_delete = new ButtonBar();
$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");
Example #6
0
$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()
{
    $url = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?display=home";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
        $price = $product['pirce'];
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$btnAdd = new Button();
$btnAdd->setClass("buttonred");
$btnAdd->setCaption("Add to Cart");
$btnAdd->onTap(add_cart());
$tableButtons = new Table();
$tableButtons->addControl($btnAdd, 1, 1);
$tableItemDetail->addControl($title, 1, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($price, 2, 1, 1, 1, "Left", "Middle");
$tableItemDetail->addControl($stock, 2, 2, 1, 1, "Center", "Middle");
$tableItemDetail->addControl($desc, 3, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($tableButtons, 4, 1, 1, 2, "Left", "Middle");
$table->addControl($grid, 1, 1);
$table->addControl($tableItemDetail, 2, 1);
$table->setRowsStyle("250dip;100%");
$win->addControl($table, 1, 1, 1, 2);
function load_image()
{
    $url = "http://www.demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $str_images = array(array("url" => DataType::Character(350)));
    Data::FromJson($str_images, $result);
    foreach ($str_images as $img) {
        $image = $img['url'];
    }
}
function facebook()
{
    Facebook::PostToWall($title, $title, $productUrl, '', $image);
Example #8
0
<?php

/*
 * Main menu
 */
$win = new SDPanel();
$win->setCaption("Tasks list");
$table = new Table();
$table->setClass("table.Menu");
$table->setRowsStyle("150dip;56dip;56dip;56dip");
//Menu Header
$table_header = new Table();
$table_header->setClass("table.Header");
$lbl_header = new Image();
$lbl_header->setClass("image.MenuHeader");
$lbl_header->setImage("img/headerTitle.png");
$table_header->addControl($lbl_header, 2, 1, 1, 1, "Left", "Bottom");
//Home button
$table_home = new Table();
$table_home->setClass("table.MenuItem");
$table_home->setColumnsStyle("20%;80%");
$img_home = new Image();
$img_home->setImage("img/ic_action.png");
$img_home->setClass("image.MenuItem");
$lbl_home = new Label();
$lbl_home->setCaption("To Do");
$lbl_home->setClass("label.MenuItem");
$table_home->onTap(openTodoLits());
$table_home->addControl($img_home, 1, 1, 1, 1, "Center", "Middle");
$table_home->addControl($lbl_home, 1, 2, 1, 1, "Left", "Middle");
//Add button
Example #9
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Radio Button!");
$mainTable = new Table();
$mainTable->setRowsStyle("200dip;pd;pd;pd;66dip");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$radio_button = new RadioButton();
$radio_button->setValues("Uruguay:1,US:2,Canada:3");
$radio_button->setAddEmptyItem(false);
$radio_button->setTitle("Where are you from?");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($radio_button, 1, 1);
$mainTable->addControl($button, 5, 1);
$win->addControl($mainTable);
function clickme()
{
    if ($radio_button->getValue() == "1") {
        echo "You are from Uruguay!";
    }
    if ($radio_button->getValue() == "2") {
        echo "You are from US!";
    }
Example #10
0
/***
 * My shopping cart
 */
$win = new SDPanel();
$win->setCaption("My cart");
$token = new InputText(80);
Data::getParm($token);
$acb = new ActionBar();
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(delete());
$acb->addControl($btn_delete);
$win->addControl($acb);
$table = new Table();
$table->setClass("table.cartMain");
$table->setRowsStyle("93%;160dip");
$list = new Grid();
$list->setEmptyGridBackgroundClass("table.gray");
$list->setEmptyGridText("Your cart is empty");
//$list->setPullToRefresh(true);
$list->addData(load_grid());
//$list->onTap(view_image());
$id = new InputNumeric();
$image = new InputImage();
$image->setClass("image.checkout");
$name = new InputText();
$name->setClass("input.titleProductNameWhite");
$qty = new InputText();
$qty->setClass("inputtextTitlewhite");
$price = new InputNumeric(12, 4);
$price->setClass("inputtextTitlewhite");
Example #11
0
Data::getParm($cat);
//Action Bar and Action Group.
$acb = new ActionBar();
$btn_img = new ButtonBar();
$btn_img->setCaption("");
$btn_img->setImage("img/ic_view_stream_white.png");
$btn_img->onTap(changeView());
$acb->addControl($btn_img);
$win->addControl($acb);
//Add action bar in panel.
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid = new Table();
$table_grid->setClass("tableGrid");
$table_grid->setRowsStyle("80dip");
$table_grid->setColumnsStyle("35%;65%;15dip");
$table_grid->setHeight("85dip");
$grid->addSearch($title);
$grid->addData(grid_load());
$grid->onTap(action());
$grid->setEmptyGridText("No items available");
//inputs and controls
$title = new InputText(150);
$title->setClass("input.titleList");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("image.roundedListImage");
$desc = new InputText(300);
$desc->setClass("input.textDescription");
$price = new InputText(10);
$grid->addSearch($title);
$grid->addData(grid_load());
$grid->onTap(action());
$grid->setEmptyGridText("No items available");
//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", "185dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "95dip", "70dip", "0", "0");
$grid->addControl($table_grid);
$table->addControl($grid);
$win->addControl($table);
$win->Render();
function lista()
{
    $win->Open("ProductList", $cat);
}
//Grid load function